Subject: CVE-2024-36949: amd/amdkfd: sync all devices to wait all processes being evicted

From: Greg Kroah-Hartman <[email-masked]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

amd/amdkfd: sync all devices to wait all processes being evicted

If there are more than one device doing reset in parallel, the first
device will call kfd_suspend_all_processes() to evict all processes
on all devices, this call takes time to finish. other device will
start reset and recover without waiting. if the process has not been
evicted before doing recover, it will be restored, then caused page
fault.

The Linux kernel CVE team has assigned CVE-2024-36949 to this issue.

Affected and fixed versions
===========================

	Fixed in 6.6.31 with commit b6f6626528fe
	Fixed in 6.8.10 with commit ed28ef3840bb
	Fixed in 6.9 with commit d06af584be5a

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2024-36949
will be updated if fixes are backported, please check that for the most
up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
	drivers/gpu/drm/amd/amdkfd/kfd_device.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/b6f6626528fe724b512c34f3fb5946c36a135f58
	https://git.kernel.org/stable/c/ed28ef3840bbf93a64376ea7814ce39f86352e14
	https://git.kernel.org/stable/c/d06af584be5a769d124b7302b32a033e9559761d