Skip to contentSkip to conversation

CVE-2026-43297: media: rockchip: rga: Fix possible ERR_PTR dereference in rga_buf_init()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 8

lore
Share & tools
lore
#0 lore raw

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

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

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

media: rockchip: rga: Fix possible ERR_PTR dereference in rga_buf_init()

rga_get_frame() can return ERR_PTR(-EINVAL) when buffer type is unsupported or invalid. rga_buf_init() does not check the return value and unconditionally dereferences the pointer when accessing f->size.

Add proper ERR_PTR checking and return the error to prevent dereferencing an invalid pointer.

The Linux kernel CVE team has assigned CVE-2026-43297 to this issue.

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

	Issue introduced in 6.8 with commit 6040702ade234c8212dcfdef85e2f5549aa2f0f5 and fixed in 6.12.75 with commit 5da29ade540b51763b950987bd410add7edaf3d1
	Issue introduced in 6.8 with commit 6040702ade234c8212dcfdef85e2f5549aa2f0f5 and fixed in 6.18.16 with commit 1af2853b4e97fd95262fdef311b2334337069bc9
	Issue introduced in 6.8 with commit 6040702ade234c8212dcfdef85e2f5549aa2f0f5 and fixed in 6.19.6 with commit aa22221c5dc695a3d479e1e1b63f0c0e9eb29dbf
	Issue introduced in 6.8 with commit 6040702ade234c8212dcfdef85e2f5549aa2f0f5 and fixed in 7.0 with commit 81f8e0e6a2e115df9274d0289779f8fca694479c

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-2026-43297

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/rockchip/rga/rga-buf.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/5da29ade540b51763b950987bd410add7edaf3d1
	https://git.kernel.org/stable/c/1af2853b4e97fd95262fdef311b2334337069bc9
	https://git.kernel.org/stable/c/aa22221c5dc695a3d479e1e1b63f0c0e9eb29dbf
	https://git.kernel.org/stable/c/81f8e0e6a2e115df9274d0289779f8fca694479c