Subject: CVE-2024-49912: drm/amd/display: Handle null 'stream_status' in 'planes_changed_for_existing_stream'

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

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

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

drm/amd/display: Handle null 'stream_status' in 'planes_changed_for_existing_stream'

This commit adds a null check for 'stream_status' in the function
'planes_changed_for_existing_stream'. Previously, the code assumed
'stream_status' could be null, but did not handle the case where it was
actually null. This could lead to a null pointer dereference.

Reported by smatch:
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c:3784 planes_changed_for_existing_stream() error: we previously assumed 'stream_status' could be null (see line 3774)

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

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

	Fixed in 6.1.113 with commit c4b699b93496
	Fixed in 6.6.55 with commit 4778982c73d6
	Fixed in 6.10.14 with commit ec6c32b58e6c
	Fixed in 6.11.3 with commit 0ffd9fb03bbc
	Fixed in 6.12-rc1 with commit 8141f21b9417

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-49912
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/dc/core/dc_resource.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/c4b699b93496c423b0e5b584d4eb4ab849313bcf
	https://git.kernel.org/stable/c/4778982c73d6c9f3fdbdbc6b6c8aa18df98251af
	https://git.kernel.org/stable/c/ec6c32b58e6c4e87760e797c525e99a460c82bcb
	https://git.kernel.org/stable/c/0ffd9fb03bbc99ed1eb5dc989d5c7da2faac0659
	https://git.kernel.org/stable/c/8141f21b941710ecebe49220b69822cab3abd23d