media: saa7134: Fix a possible memory leak in saa7134_video_init1
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
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.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
Version range not reported
- Linux Linux
3.16
References 8
git.kernel.org
- stable/c/e773b1d4bd191e7520bf9e02cb676d62c1b20556
- stable/c/44e16e3e022bf4a26adf03bc05a6dd5ffc34ef6d
- stable/c/34082a48376fd225a5c3d971c8962eb1320a54e0
- stable/c/134c979dd721e22f196d71026432ee37d1f5cc38
- stable/c/e1ef361ee31d1dba5dcae2cdd50f9c1352df0c23
- stable/c/b7936e8cbec1b96b126058eeb005e5b9111df38e
- stable/c/1731dd61b6c0b7435c139951d2b7eada6c9667a8
- stable/c/f86ed548386e3050e5f8f25b450d09dc009d9a88