CVE-2026-143408: crypto: qat - initialise state_lock on every path in adf_devmgr_add_dev()
In the Linux kernel, the following vulnerability has been resolved:
crypto: qat - initialise statelock on every path in adfdevmgradddev()
statelock is initialised at the end of adfdevmgradddev(), but the VF on host path whose id mapping already exists returns earlier via 'goto unlock'. That mapping outlives the VF, so this path is taken every time a VF is recreated on a BDF that already hosted one, e.g.:
echo 0 > sriovnumvfs echo 32 > sriovnumvfs
acceldev is freshly allocated on each probe, so statelock is left zeroed and adfdevup() takes an uninitialised mutex. With CONFIGDEBUGMUTEXES this is reported on a dh895xcc with 32 host-bound VFs:
DEBUGLOCKSWARNON(lock->magic != lock) WARNING: kernel/locking/mutex.c:159 at mutexlock+0x171/0x1c0 Call Trace: adfdevup+0x27/0xe0 [intelqat] adfprobe+0x700/0xa80 [qatdh895xccvf] localpciprobe+0xd5/0x190
The same happens on teardown when adfdevdown() locks it again.
Initialise the lock next to the other per-device state, before the tables are updated, so it is done on every path.
Affected Software
Event History
Frequently Asked Questions
Which systems are affected in practice?
The affected scenario is a Linux system using the Intel QAT driver with host-bound virtual functions (VFs). It occurs when a VF is recreated on a BDF that previously hosted a VF and whose ID mapping still exists, such as after reducing and then restoring sriov_numvfs.
What operation triggers the issue?
Recreating VFs can trigger the affected path, for example by setting sriov_numvfs to 0 and then restoring it to 32. The newly probed accelerator device can reach adf_dev_up() with state_lock left uninitialised; teardown can also trigger it in adf_dev_down().
How can I detect that a system has encountered this issue?
With CONFIG_DEBUG_MUTEXES enabled, the kernel can report DEBUG_LOCKS_WARN_ON(lock->magic != lock) from mutex_lock, with a call trace involving adf_dev_up(), adf_probe(), intel_qat, and qat_dh895xccvf. The example report was observed on a dh895xcc with 32 host-bound VFs.