Subject: CVE-2024-39505: drm/komeda: check for error-valued pointer

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

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

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

drm/komeda: check for error-valued pointer

komeda_pipeline_get_state() may return an error-valued pointer, thus
check the pointer for negative or null value before dereferencing.

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

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

	Issue introduced in 5.3 with commit 502932a03fce and fixed in 5.4.279 with commit 0674ed1e58e2
	Issue introduced in 5.3 with commit 502932a03fce and fixed in 5.10.221 with commit bda7cdaeebf5
	Issue introduced in 5.3 with commit 502932a03fce and fixed in 5.15.162 with commit 86042e3d16b7
	Issue introduced in 5.3 with commit 502932a03fce and fixed in 6.1.95 with commit 3b1cf943b029
	Issue introduced in 5.3 with commit 502932a03fce and fixed in 6.6.35 with commit 9460961d8213
	Issue introduced in 5.3 with commit 502932a03fce and fixed in 6.9.6 with commit 99392c98b9be
	Issue introduced in 5.3 with commit 502932a03fce and fixed in 6.10 with commit b880018edd3a

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-39505
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/arm/display/komeda/komeda_pipeline_state.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/0674ed1e58e2fdcc155e7d944f8aad007a94ac69
	https://git.kernel.org/stable/c/bda7cdaeebf57e46c1a488ae7a15f6f264691f59
	https://git.kernel.org/stable/c/86042e3d16b7e0686db835c9e7af0f9044dd3a56
	https://git.kernel.org/stable/c/3b1cf943b029c147bfacfd53dc28ffa632c0a622
	https://git.kernel.org/stable/c/9460961d82134ceda7377b77a3e3e3531b625dfe
	https://git.kernel.org/stable/c/99392c98b9be0523fe76944b2264b1847512ad23
	https://git.kernel.org/stable/c/b880018edd3a577e50366338194dee9b899947e0