Subject: CVE-2024-46817: drm/amd/display: Stop amdgpu_dm initialize when stream nums greater than 6

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

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

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

drm/amd/display: Stop amdgpu_dm initialize when stream nums greater than 6

[Why]
Coverity reports OVERRUN warning. Should abort amdgpu_dm
initialize.

[How]
Return failure to amdgpu_dm_init.

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

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

	Fixed in 5.4.284 with commit d619b91d3c4a
	Fixed in 5.10.226 with commit 754321ed63f0
	Fixed in 5.15.167 with commit 21bbb39863f1
	Fixed in 6.1.109 with commit 28b515c458aa
	Fixed in 6.6.50 with commit 94cb77700fa4
	Fixed in 6.10.9 with commit d398c74c881d
	Fixed in 6.11 with commit 84723eb6068c

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-46817
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.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/d619b91d3c4af60ac422f1763ce53d721fb91262
	https://git.kernel.org/stable/c/754321ed63f0a4a31252ca72e0bd89a9e1888018
	https://git.kernel.org/stable/c/21bbb39863f10f5fb4bf772d15b07d5d13590e9d
	https://git.kernel.org/stable/c/28b515c458aa9c92bfcb99884c94713a5f471cea
	https://git.kernel.org/stable/c/94cb77700fa4ae6200486bfa0ba2ac547534afd2
	https://git.kernel.org/stable/c/d398c74c881dee695f6eb6138c9891644e1c3d9d
	https://git.kernel.org/stable/c/84723eb6068c50610c5c0893980d230d7afa2105