Skip to contentSkip to conversation

CVE-2026-68212: media: saa7134: Fix a possible memory leak in saa7134_video_init1

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Aug 10

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: saa7134: Fix a possible memory leak in saa7134_video_init1

In saa7134_video_init1(), the return value of the first saa7134_pgtable_alloc() is not checked. If it fails, the function continues as if successful, leaving the driver with an invalid page table. Additionally, if vb2_queue_init() for the VBI queue fails after the video queue page table has been allocated, the allocated memory is not freed before returning. The second saa7134_pgtable_alloc() also lacks a return value check. Errors occur during device probing before the device is fully registered, the normal cleanup path in saa7134_finidev() is not executed, leading to memory leaks and potential use of uninitialized DMA resources.

Check the return value of both saa7134_pgtable_alloc() calls and propagate errors. On failure of any later step, free allocated page tables to avoid memory leaks. Ensure control handlers are also released on error to prevent further resource leakage.

Found by code review.

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

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

	Issue introduced in 3.16 with commit a00e68888d5d2b583b13d7d58204a27207af95fd and fixed in 6.6.148 with commit 134c979dd721e22f196d71026432ee37d1f5cc38
	Issue introduced in 3.16 with commit a00e68888d5d2b583b13d7d58204a27207af95fd and fixed in 6.12.101 with commit e1ef361ee31d1dba5dcae2cdd50f9c1352df0c23
	Issue introduced in 3.16 with commit a00e68888d5d2b583b13d7d58204a27207af95fd and fixed in 6.18.42 with commit b7936e8cbec1b96b126058eeb005e5b9111df38e
	Issue introduced in 3.16 with commit a00e68888d5d2b583b13d7d58204a27207af95fd and fixed in 7.1.6 with commit 1731dd61b6c0b7435c139951d2b7eada6c9667a8
	Issue introduced in 3.16 with commit a00e68888d5d2b583b13d7d58204a27207af95fd and fixed in 7.2-rc1 with commit f86ed548386e3050e5f8f25b450d09dc009d9a88

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

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/pci/saa7134/saa7134-video.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/134c979dd721e22f196d71026432ee37d1f5cc38
	https://git.kernel.org/stable/c/e1ef361ee31d1dba5dcae2cdd50f9c1352df0c23
	https://git.kernel.org/stable/c/b7936e8cbec1b96b126058eeb005e5b9111df38e
	https://git.kernel.org/stable/c/1731dd61b6c0b7435c139951d2b7eada6c9667a8
	https://git.kernel.org/stable/c/f86ed548386e3050e5f8f25b450d09dc009d9a88