Subject: CVE-2024-40973: media: mtk-vcodec: potential null pointer deference in SCP

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

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

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

media: mtk-vcodec: potential null pointer deference in SCP

The return value of devm_kzalloc() needs to be checked to avoid
NULL pointer deference. This is similar to CVE-2022-3113.

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

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

	Fixed in 6.6.36 with commit f066882293b5
	Fixed in 6.9.7 with commit 3a693c7e243b
	Fixed in 6.10 with commit 53dbe0850444

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-40973
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/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_scp.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/f066882293b5ad359e44c4ed24ab1811ffb0b354
	https://git.kernel.org/stable/c/3a693c7e243b932faee5c1fb728efa73f0abc39b
	https://git.kernel.org/stable/c/53dbe08504442dc7ba4865c09b3bbf5fe849681b