media: saa7164: fix cleanup on resource allocation failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 443c1228d50518f3c550e1fef490a2c9d9246ce7 · < 4d2048466af9e2c960c5be6dcd317e3b657d268b| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel’s saa7164 driver leaves a freed device on a global list if PCI resource allocation fails during device setup. It can also fail to release BAR0 if the BAR2 request fails. The input does not establish how an attacker could trigger these failures or whether authentication or user interaction is required.
Engineers running Linux kernels with the saa7164 driver should check their versions; affected versions were not provided.