CVE-2026-90130: vdpa_sim: fix cleanup after worker creation failure
In the Linux kernel, the following vulnerability has been resolved:
vdpasim: fix cleanup after worker creation failure
vdpasimcreate() leaves vdpasim->worker as an ERRPTR when kthreadrunworker() fails. The error path then drops the device reference, which releases the partially initialized simulator.
vdpasimfree() unconditionally passes the worker pointer to kthreaddestroyworker(), so the ERRPTR 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.
Affected Software
Event History
Frequently Asked Questions
What condition is required to trigger the fault?
Creation of a vDPA simulator must reach a failure of kthread_run_worker(). The vulnerable cleanup path then treats the returned error pointer as a valid worker and passes it to kthread_destroy_worker().
What is the likely impact if the vulnerable path is reached?
Dereferencing the error pointer during cleanup can trigger a general protection fault. The issue occurs while releasing a partially initialized simulator device after worker creation fails.
How does the fix change cleanup behavior?
The fix preserves the worker-creation error, clears the worker pointer, and destroys the worker only if initialization succeeded. It also guards virtqueue and IOTLB cleanup so release can safely handle partially initialized objects.