In the Linux kernel, the following vulnerability has been resolved:
crypto: qat - ADFSTATUSPFRUNNING should be set after adfdev_init
ADFSTATUSPFRUNNING is (only) used and checked by adfvf2pfshutdown() before calling adfiovputmsg()->mutexlock(vf2pflock), however the vf2pflock is initialized in adfdevinit(), which can fail and when it fail, the vf2pflock is either not initialized or destroyed, a subsequent use of vf2pflock will cause issue. To fix this issue, only set this flag if adfdevinit() returns 0.
[ 7.178404] BUG: KASAN: user-memory-access in _mutexlock.isra.0+0x1ac/0x7c0 [ 7.180345] Call Trace: [ 7.182576] mutexlock+0xc9/0xd0 [ 7.183257] adfiovputmsg+0x118/0x1a0 [intelqat] [ 7.183541] adfvf2pfshutdown+0x4d/0x7b [intelqat] [ 7.183834] adfdevshutdown+0x172/0x2b0 [intelqat] [ 7.184127] adfprobe+0x5e9/0x600 [qatdh895xccvf]