CVE-2026-93215: cdx: Fix double free when sysfs file creation fails
In the Linux kernel, the following vulnerability has been resolved:
cdx: Fix double free when sysfs file creation fails
In cdxcreateresattr(), if sysfscreatebinfile() fails, the code frees resattr but doesn't set cdxdev->resattr[num] to NULL. This leaves a dangling pointer in the array. Then cdxdestroyresattr() frees the already-freed memory. Fix the double free by initializing cdxdev->resattr[num] after sysfscreatebinfile() completes.
Affected Software
Event History
Frequently Asked Questions
What conditions are required to trigger the double free?
The failure path requires sysfs_create_bin_file() to fail during cdx_create_res_attr(). The failed allocation path leaves a dangling pointer in cdx_dev->res_attr[num], which is later freed again by cdx_destroy_res_attr().
How can systems be remediated?
Apply a kernel version containing the fix that initializes cdx_dev->res_attr[num] only after sysfs_create_bin_file() completes successfully. The provided stable kernel references identify commits containing the correction.