Subject: CVE-2024-49896: drm/amd/display: Check stream before comparing them

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

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

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

drm/amd/display: Check stream before comparing them

[WHAT & HOW]
amdgpu_dm can pass a null stream to dc_is_stream_unchanged. It is
necessary to check for null before dereferencing them.

This fixes 1 FORWARD_NULL issue reported by Coverity.

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

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

	Fixed in 5.10.227 with commit 0167d570f6a0
	Fixed in 5.15.168 with commit 14db8692afe1
	Fixed in 6.1.113 with commit e8da54b7f8a1
	Fixed in 6.6.55 with commit 42d31a336438
	Fixed in 6.10.14 with commit 5b4b13e678b1
	Fixed in 6.11.3 with commit e41a291e1bef
	Fixed in 6.12-rc1 with commit 35ff747c8676

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-49896
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/0167d570f6a0b38689c4a0e50bf79c518d827500
	https://git.kernel.org/stable/c/14db8692afe1aa2143b673856bb603713d8ea93f
	https://git.kernel.org/stable/c/e8da54b7f8a17e44e67ea6d1037f35450af28115
	https://git.kernel.org/stable/c/42d31a33643813cce55ee1ebbad3a2d0d24a08e0
	https://git.kernel.org/stable/c/5b4b13e678b15975055f4ff1ce4cf0ce4c19b6c4
	https://git.kernel.org/stable/c/e41a291e1bef1153bba091b6580ecc7affc53c82
	https://git.kernel.org/stable/c/35ff747c86767937ee1e0ca987545b7eed7a0810