Skip to contentSkip to conversation

CVE-2026-46240: media: iris: Fix use-after-free in iris_release_internal_buffers()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 28

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: iris: Fix use-after-free in iris_release_internal_buffers()

The recent change in commit 1dabf00ee206 ("media: iris: gen1: Destroy internal buffers after FW releases") introduced a regression where session_release_buf() may free the buffer. The caller, iris_release_internal_buffers(), continued to access buffer after the call, leading to a potential use-after-free.

Fix this by setting BUF_ATTR_PENDING_RELEASE before calling session_release_buf(), and reverting the flag if the call fails. This ensures no dereference occurs after potential freeing.

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

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

	Issue introduced in 6.18.16 with commit 7cde76db8883ec8a3d1456068079ecadbfb15ca5 and fixed in 6.18.32 with commit dd24998a4a4016fb9921916024399bd80f0d45c6
	Issue introduced in 7.0 with commit 1dabf00ee206eceb0f08a1fe5d1ce635f9064338 and fixed in 7.0.9 with commit 18c64439f249859b6140f7bf8bcf95c8ed841f28
	Issue introduced in 7.0 with commit 1dabf00ee206eceb0f08a1fe5d1ce635f9064338 and fixed in 7.1-rc3 with commit f27cfdcfc916bb59297825805f4c3499f89f9e76
	Issue introduced in 6.19.6 with commit d4457f23ac0130240053a34be663f0fade3bb371

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-46240

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/qcom/iris/iris_buffer.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/dd24998a4a4016fb9921916024399bd80f0d45c6
	https://git.kernel.org/stable/c/18c64439f249859b6140f7bf8bcf95c8ed841f28
	https://git.kernel.org/stable/c/f27cfdcfc916bb59297825805f4c3499f89f9e76