Skip to contentSkip to conversation

CVE-2026-43162: media: tegra-video: Fix memory leak in __tegra_channel_try_format()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 6

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: tegra-video: Fix memory leak in __tegra_channel_try_format()

The state object allocated by __v4l2_subdev_state_alloc() must be freed with __v4l2_subdev_state_free() when it is no longer needed.

In __tegra_channel_try_format(), two error paths return directly after v4l2_subdev_call() fails, without freeing the allocated 'sd_state' object. This violates the requirement and causes a memory leak.

Fix this by introducing a cleanup label and using goto statements in the error paths to ensure that __v4l2_subdev_state_free() is always called before the function returns.

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

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

	Issue introduced in 5.10 with commit 1ebaeb09830f36c1111b72a95420814225bd761c and fixed in 6.1.167 with commit 6c6f419fa9c44a4b7149b0292e01bff47308ba14
	Issue introduced in 5.10 with commit 1ebaeb09830f36c1111b72a95420814225bd761c and fixed in 6.6.130 with commit ca921be7a1174d5d58b28f84b683c2c0079f18c5
	Issue introduced in 5.10 with commit 1ebaeb09830f36c1111b72a95420814225bd761c and fixed in 6.12.77 with commit 3ca2f09061736e72ef25eec2597d00f7f44094d3
	Issue introduced in 5.10 with commit 1ebaeb09830f36c1111b72a95420814225bd761c and fixed in 6.18.17 with commit 2dff8966a3a889dd9d248a7e15d963b4097efcc5
	Issue introduced in 5.10 with commit 1ebaeb09830f36c1111b72a95420814225bd761c and fixed in 6.19.6 with commit d92e9a18f97a1d19d4c2ff81dcfbe43591f75b5a
	Issue introduced in 5.10 with commit 1ebaeb09830f36c1111b72a95420814225bd761c and fixed in 7.0 with commit 43e5302d22334f1183dec3e0d5d8007eefe2817c

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

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/staging/media/tegra-video/vi.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/6c6f419fa9c44a4b7149b0292e01bff47308ba14
	https://git.kernel.org/stable/c/ca921be7a1174d5d58b28f84b683c2c0079f18c5
	https://git.kernel.org/stable/c/3ca2f09061736e72ef25eec2597d00f7f44094d3
	https://git.kernel.org/stable/c/2dff8966a3a889dd9d248a7e15d963b4097efcc5
	https://git.kernel.org/stable/c/d92e9a18f97a1d19d4c2ff81dcfbe43591f75b5a
	https://git.kernel.org/stable/c/43e5302d22334f1183dec3e0d5d8007eefe2817c