Subject: CVE-2024-46871: drm/amd/display: Correct the defined value for AMDGPU_DMUB_NOTIFICATION_MAX

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

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

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

drm/amd/display: Correct the defined value for AMDGPU_DMUB_NOTIFICATION_MAX

[Why & How]
It actually exposes '6' types in enum dmub_notification_type. Not 5. Using smaller
number to create array dmub_callback & dmub_thread_offload has potential to access
item out of array bound. Fix it.

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

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

	Fixed in 6.1.109 with commit 9f404b0bc2df
	Fixed in 6.6.50 with commit 800a5ab673c4
	Fixed in 6.10.9 with commit c592b6355b9b
	Fixed in 6.11 with commit ad28d7c3d989

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-46871
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/display/amdgpu_dm/amdgpu_dm.h

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/9f404b0bc2df3880758fb3c3bc7496f596f347d7
	https://git.kernel.org/stable/c/800a5ab673c4a61ca220cce177386723d91bdb37
	https://git.kernel.org/stable/c/c592b6355b9b57b8e59fc5978ce1e14f64488a98
	https://git.kernel.org/stable/c/ad28d7c3d989fc5689581664653879d664da76f0