Subject: CVE-2024-40988: drm/radeon: fix UBSAN warning in kv_dpm.c

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

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

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

drm/radeon: fix UBSAN warning in kv_dpm.c

Adds bounds check for sumo_vid_mapping_entry.

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

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

	Fixed in 4.19.317 with commit 07e8f15fa166
	Fixed in 5.4.279 with commit a8c6df9fe5bc
	Fixed in 5.10.221 with commit febe794b8369
	Fixed in 5.15.162 with commit cf1cc8fcfe51
	Fixed in 6.1.96 with commit f803532bc382
	Fixed in 6.6.36 with commit 9e57611182a8
	Fixed in 6.9.7 with commit 468a50fd46a0
	Fixed in 6.10 with commit a498df5421fd

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-40988
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/radeon/sumo_dpm.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/07e8f15fa16695cf4c90e89854e59af4a760055b
	https://git.kernel.org/stable/c/a8c6df9fe5bc390645d1e96eff14ffe414951aad
	https://git.kernel.org/stable/c/febe794b83693257f21a23d2e03ea695a62449c8
	https://git.kernel.org/stable/c/cf1cc8fcfe517e108794fb711f7faabfca0dc855
	https://git.kernel.org/stable/c/f803532bc3825384100dfc58873e035d77248447
	https://git.kernel.org/stable/c/9e57611182a817824a17b1c3dd300ee74a174b42
	https://git.kernel.org/stable/c/468a50fd46a09bba7ba18a11054ae64b6479ecdc
	https://git.kernel.org/stable/c/a498df5421fd737d11bfd152428ba6b1c8538321