media: saa7134: Fix a possible memory leak in saa7134_video_init1
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ a00e68888d5d2b583b13d7d58204a27207af95fd · < b7936e8cbec1b96b126058eeb005e5b9111df38e| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel’s saa7134 driver does not check page-table allocation failures and can leak resources when initialization fails during device probing. This may also leave DMA resources uninitialized. The input does not establish an attacker path or specify network, authentication, or user-interaction requirements.
Engineers running Linux kernels with the saa7134 driver should check their exposure; affected versions are not specified.