Skip to contentSkip to conversation

CVE-2026-89877: media: saa7164: fix cleanup on resource allocation failure

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 16

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: saa7164: fix cleanup on resource allocation failure

saa7164_dev_setup() adds the device to the global saa7164_devlist before requesting the PCI BAR memory regions.

If get_resources() fails, saa7164_dev_setup() decrements the device count and returns an error, but leaves the device on saa7164_devlist. The probe error path then frees the device, leaving a dangling entry on the global list.

Reuse the existing MMIO mapping error path to remove the device from saa7164_devlist and decrement the device count before returning.

Also release BAR0 if it was successfully requested but the BAR2 request fails.

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

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

	Issue introduced in 2.6.32 with commit 443c1228d50518f3c550e1fef490a2c9d9246ce7 and fixed in 6.1.188 with commit daa5b32cdf7db81a07ee2a91ce092a363e7754aa
	Issue introduced in 2.6.32 with commit 443c1228d50518f3c550e1fef490a2c9d9246ce7 and fixed in 6.6.157 with commit 77f216f8de6221efb6f6c471bc9e598f1879825b
	Issue introduced in 2.6.32 with commit 443c1228d50518f3c550e1fef490a2c9d9246ce7 and fixed in 6.12.110 with commit 69259c627009bf7621010ae9e997dad2dad3339c
	Issue introduced in 2.6.32 with commit 443c1228d50518f3c550e1fef490a2c9d9246ce7 and fixed in 6.18.51 with commit 4d2048466af9e2c960c5be6dcd317e3b657d268b
	Issue introduced in 2.6.32 with commit 443c1228d50518f3c550e1fef490a2c9d9246ce7 and fixed in 7.2.5 with commit fc65623524b5bf23baddc6ae688d954fba0d5de2
	Issue introduced in 2.6.32 with commit 443c1228d50518f3c550e1fef490a2c9d9246ce7 and fixed in 7.3-rc1 with commit 28e84c6e2e6753ed238ea097b2842a32a6a6879b

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

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/saa7164/saa7164-core.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/daa5b32cdf7db81a07ee2a91ce092a363e7754aa
	https://git.kernel.org/stable/c/77f216f8de6221efb6f6c471bc9e598f1879825b
	https://git.kernel.org/stable/c/69259c627009bf7621010ae9e997dad2dad3339c
	https://git.kernel.org/stable/c/4d2048466af9e2c960c5be6dcd317e3b657d268b
	https://git.kernel.org/stable/c/fc65623524b5bf23baddc6ae688d954fba0d5de2
	https://git.kernel.org/stable/c/28e84c6e2e6753ed238ea097b2842a32a6a6879b