vdpa_sim: fix cleanup after worker creation failure
- 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.6.157, 6.12.110, 6.18.52, 7.2.6
- 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: vdpa_sim: fix cleanup after worker creation failure vdpasim_create() leaves vdpasim->worker as an ERR_PTR when kthread_run_worker() fails. The error path then drops the device reference, which releases the partially initialized simulator. vdpasim_free() unconditionally passes the worker pointer to kthread_destroy_worker(), so the ERR_PTR is dereferenced and can trigger a general protection fault. Store the worker error, clear the pointer, and only clean up the worker when it was successfully initialized. Also make the release path tolerate partially initialized objects by guarding virtqueue and IOTLB cleanup, since the same release path can be reached from other initialization failures. I found this bug myself, though the patch was written with AI assistance.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 76acfa7bc54f1e3b9dde396e0a3534493419fd6f · fixed in feafa109f031ed111f7f968e447c13985db498e0; From 76acfa7bc54f1e3b9dde396e0a3534493419fd6f · fixed in 05ddc94afb69e36df59e88cfa9e5c7bf9d10cfd0; From 76acfa7bc54f1e3b9dde396e0a3534493419fd6f · fixed in 68b726b3a01fb02a68843781b17d05ef3d759987; From 76acfa7bc54f1e3b9dde396e0a3534493419fd6f · fixed in ca6f3fa599cb764518df595368b743f856fdb516; From 76acfa7bc54f1e3b9dde396e0a3534493419fd6f · fixed in bd670e5dfd2b01fd9692f61fa1456434c54026a4
- Linux Linux
6.4
- KernelLinux
From 6.4.0 · fixed in 6.6.157; From 6.7.0 · fixed in 6.12.110; From 6.13.0 · fixed in 6.18.52; From 6.19.0 · fixed in 7.2.6