cdx: Fix double free when sysfs file creation fails
- 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
- Fix
- Fixed in 6.12.109, 6.18.50, 7.2.4
- 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: cdx: Fix double free when sysfs file creation fails In cdx_create_res_attr(), if sysfs_create_bin_file() fails, the code frees res_attr but doesn't set cdx_dev->res_attr[num] to NULL. This leaves a dangling pointer in the array. Then cdx_destroy_res_attr() frees the already-freed memory. Fix the double free by initializing cdx_dev->res_attr[num] after sysfs_create_bin_file() completes.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From aeda33ab8160c7a2e24ba4f44492ad1e974ddc7d · fixed in 88f4cd42a04bdadd189d7f667a4c279f4e962ca6; From aeda33ab8160c7a2e24ba4f44492ad1e974ddc7d · fixed in 4cd24873ab9fdbd730604881a6e8087bc7b99336; From aeda33ab8160c7a2e24ba4f44492ad1e974ddc7d · fixed in 7e9451bf0bdba6daee1eaf4e7566612af6ca1c32; From aeda33ab8160c7a2e24ba4f44492ad1e974ddc7d · fixed in 6f4acc3a3c300e174e3f586b97b04ed8f5948c36
- Linux Linux
6.8
- KernelLinux
From 6.8.0 · fixed in 6.12.109; From 6.13.0 · fixed in 6.18.50; From 6.19.0 · fixed in 7.2.4