Subject: CVE-2024-46731: drm/amd/pm: fix the Out-of-bounds read warning

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

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

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

drm/amd/pm: fix the Out-of-bounds read warning

using index i - 1U may beyond element index
for mc_data[] when i = 0.

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

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

	Fixed in 5.10.226 with commit 38e32a0d8374
	Fixed in 5.15.167 with commit 3317966efcdc
	Fixed in 6.1.109 with commit 20c6373a6be9
	Fixed in 6.6.50 with commit f1e261ced9bc
	Fixed in 6.10.9 with commit d83fb9f9f63e
	Fixed in 6.11 with commit 12c6967428a0

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-46731
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/pm/powerplay/hwmgr/ppatomctrl.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/38e32a0d837443c91c4b615a067b976cfb925376
	https://git.kernel.org/stable/c/3317966efcdc5101e93db21514b68917e7eb34ea
	https://git.kernel.org/stable/c/20c6373a6be93039f9d66029bb1e21038a060be1
	https://git.kernel.org/stable/c/f1e261ced9bcad772a45a2fcdf413c3490e87299
	https://git.kernel.org/stable/c/d83fb9f9f63e9a120bf405b078f829f0b2e58934
	https://git.kernel.org/stable/c/12c6967428a099bbba9dfd247bb4322a984fcc0b