CVE-2026-143407: crypto: qat - fix use of destroyed vf2pf_lock on VF restart
In the Linux kernel, the following vulnerability has been resolved:
crypto: qat - fix use of destroyed vf2pflock on VF restart
adfdevstopasync() sends the RESTARTINGCOMPLETE message after adfdevdown() has returned, but adfdevdown() already destroyed the lock that message takes.
Both run in sequence in the same worker, so every PF restart locks a destroyed mutex. With CONFIGDEBUGMUTEXES on a dh895xcc with 32 host-bound VFs this trips on the first PF reset:
DEBUGLOCKSWARNON(lock->magic != lock) WARNING: kernel/locking/mutex.c:159 at mutexlock+0x171/0x1c0 Workqueue: adfvfstopwq adfdevstopasync [intelqat] Call Trace: adfgen2pfvfsend+0x210/0x530 [intelqat] adfvf2pfnotifyrestartcomplete+0x55/0x80 [intelqat] adfdevstopasync+0xdb/0x140 [intelqat]
The notification cannot move before adfdevdown(): the PF waits for it before its own reset and the VF must tear down its rings first.
vf2pflock protects the VF2PF CSR and is unrelated to the PF2VF bottom half it is initialised alongside. Tie its lifetime to the accel device, next to statelock in adfdevmgradddev()/adfdevmgrrmdev(), so it stays valid for messages sent outside the device up/down cycle. It is only touched for VFs, which set isvf before adfdevmgradddev() and keep it set until adfdevmgrrmdev().
Affected Software
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems using the Linux kernel Intel QAT driver with virtual functions are exposed when a physical function restart occurs. The reported reproduction used a dh895xcc device with 32 host-bound VFs.
What event triggers the faulty lock use?
A PF restart triggers the VF restart workflow. In that workflow, adf_dev_stop_async() sends a RESTARTING_COMPLETE message after adf_dev_down() has already destroyed vf2pf_lock.
How can administrators identify a likely affected system?
With CONFIG_DEBUG_MUTEXES enabled, the first PF reset can produce a DEBUG_LOCKS_WARN_ON(lock->magic != lock) warning at mutex_lock, with adf_dev_stop_async and adf_vf2pf_notify_restart_complete in the call trace.
What does the fix change?
The fix ties vf2pf_lock's lifetime to the accelerator device rather than the device up/down cycle. This keeps the lock valid for VF-to-PF messages sent after device teardown during restart handling.