{"id":"CVE-2021-47056","aliases":["CVE-2021-47056"],"related":[],"kind":"vulnerability","state":"published","title":"crypto: qat - ADF_STATUS_PF_RUNNING should be set after adf_dev_init","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: qat - ADF_STATUS_PF_RUNNING should be set after adf_dev_init\n\nADF_STATUS_PF_RUNNING is (only) used and checked by adf_vf2pf_shutdown()\nbefore calling adf_iov_putmsg()->mutex_lock(vf2pf_lock), however the\nvf2pf_lock is initialized in adf_dev_init(), which can fail and when it\nfail, the vf2pf_lock is either not initialized or destroyed, a subsequent\nuse of vf2pf_lock will cause issue.\nTo fix this issue, only set this flag if adf_dev_init() returns 0.\n\n[    7.178404] BUG: KASAN: user-memory-access in __mutex_lock.isra.0+0x1ac/0x7c0\n[    7.180345] Call Trace:\n[    7.182576]  mutex_lock+0xc9/0xd0\n[    7.183257]  adf_iov_putmsg+0x118/0x1a0 [intel_qat]\n[    7.183541]  adf_vf2pf_shutdown+0x4d/0x7b [intel_qat]\n[    7.183834]  adf_dev_shutdown+0x172/0x2b0 [intel_qat]\n[    7.184127]  adf_probe+0x5e9/0x600 [qat_dh895xccvf]","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: qat - ADF_STATUS_PF_RUNNING should be set after adf_dev_init\n\nADF_STATUS_PF_RUNNING is (only) used and checked by adf_vf2pf_shutdown()\nbefore calling adf_iov_putmsg()->mutex_lock(vf2pf_lock), however the\nvf2pf_lock is initialized in adf_dev_init(), which can fail and when it\nfail, the vf2pf_lock is either not initialized or destroyed, a subsequent\nuse of vf2pf_lock will cause issue.\nTo fix this issue, only set this flag if adf_dev_init() returns 0.\n\n[    7.178404] BUG: KASAN: user-memory-access in __mutex_lock.isra.0+0x1ac/0x7c0\n[    7.180345] Call Trace:\n[    7.182576]  mutex_lock+0xc9/0xd0\n[    7.183257]  adf_iov_putmsg+0x118/0x1a0 [intel_qat]\n[    7.183541]  adf_vf2pf_shutdown+0x4d/0x7b [intel_qat]\n[    7.183834]  adf_dev_shutdown+0x172/0x2b0 [intel_qat]\n[    7.184127]  adf_probe+0x5e9/0x600 [qat_dh895xccvf]","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: crypto: qat - ADF_STATUS_PF_RUNNING debe configurarse después de adf_dev_init ADF_STATUS_PF_RUNNING es (solo) usado y verificado por adf_vf2pf_shutdown() antes de llamar a adf_iov_putmsg()-&gt;mutex_lock(vf2pf_lock), sin embargo, vf2pf_lock es inicializado en adf_dev_init(), que puede fallar y cuando falla, vf2pf_lock no se inicializa o se destruye, un uso posterior de vf2pf_lock causará problemas. Para solucionar este problema, establezca este indicador solo si adf_dev_init() devuelve 0. [7.178404] ERROR: KASAN: acceso a memoria de usuario en __mutex_lock.isra.0+0x1ac/0x7c0 [7.180345] Seguimiento de llamadas: [7.182576] mutex_lock+0xc9 /0xd0 [ 7.183257] adf_iov_putmsg+0x118/0x1a0 [intel_qat] [ 7.183541] adf_vf2pf_shutdown+0x4d/0x7b [intel_qat] [ 7.183834] adf_dev_shutdown+0x172/0x2b0 [intel_qat] [7.184127] adf_probe+0x5e9/0x600 [qat_dh895xccvf]","source":"nvd"}],"published":"2024-02-29T22:37:31.086Z","modified":"2026-06-17T04:16:19.990Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-908"],"affected":[{"ranges":[{"type":"git","introduced":"25c6ffb249f612c56a48ce48a3887adf57b8f4bd","fixed":"f4c4e07140687f42bfa40e091bb4a55d7960ce4d","status":"affected"},{"type":"git","introduced":"25c6ffb249f612c56a48ce48a3887adf57b8f4bd","fixed":"446045cf682af12d9294765f6c46084b374b5654","status":"affected"},{"type":"git","introduced":"25c6ffb249f612c56a48ce48a3887adf57b8f4bd","fixed":"09d16cee6285d37cc76311c29add6d97a7e4acda","status":"affected"},{"type":"git","introduced":"25c6ffb249f612c56a48ce48a3887adf57b8f4bd","fixed":"05ec8192ee4bfdf2a8894a68350dac9f1a155fa6","status":"affected"},{"type":"git","introduced":"25c6ffb249f612c56a48ce48a3887adf57b8f4bd","fixed":"1f50392650ae794a1aea41c213c6a3e1c824413c","status":"affected"},{"type":"git","introduced":"25c6ffb249f612c56a48ce48a3887adf57b8f4bd","fixed":"20fd40fc6f2c2b41dc6f637f88d494b14e9c21f1","status":"affected"},{"type":"git","introduced":"25c6ffb249f612c56a48ce48a3887adf57b8f4bd","fixed":"1ea500ce6f7c9106e4a561d28e69215f3d451818","status":"affected"},{"type":"git","introduced":"25c6ffb249f612c56a48ce48a3887adf57b8f4bd","fixed":"8609f5cfdc872fc3a462efa6a3eca5cb1e2f6446","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.7","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.7","status":"unaffected"},{"type":"semver","introduced":"4.9.269","lastAffected":"4.9.*","status":"unaffected"},{"type":"semver","introduced":"4.14.233","lastAffected":"4.14.*","status":"unaffected"},{"type":"semver","introduced":"4.19.191","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.119","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.37","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.11.21","lastAffected":"5.11.*","status":"unaffected"},{"type":"semver","introduced":"5.12.4","lastAffected":"5.12.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.13","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.7","fixed":"4.9.269"},{"status":"affected","introduced":"4.10","fixed":"4.14.233"},{"status":"affected","introduced":"4.15","fixed":"4.19.191"},{"status":"affected","introduced":"4.20","fixed":"5.4.119"},{"status":"affected","introduced":"5.5","fixed":"5.10.37"},{"status":"affected","introduced":"5.11","fixed":"5.11.21"},{"status":"affected","introduced":"5.12","fixed":"5.12.4"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/f4c4e07140687f42bfa40e091bb4a55d7960ce4d","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/446045cf682af12d9294765f6c46084b374b5654","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/09d16cee6285d37cc76311c29add6d97a7e4acda","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/05ec8192ee4bfdf2a8894a68350dac9f1a155fa6","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1f50392650ae794a1aea41c213c6a3e1c824413c","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/20fd40fc6f2c2b41dc6f637f88d494b14e9c21f1","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1ea500ce6f7c9106e4a561d28e69215f3d451818","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8609f5cfdc872fc3a462efa6a3eca5cb1e2f6446","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-10T15:57:04.493Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-47056","url":"https://www.cve.org/CVERecord?id=CVE-2021-47056","licence":"CVE Terms of Use","modified":"2026-05-11T13:47:13.711Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-47056","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-47056","licence":"Public domain","modified":"2026-06-17T04:16:19.990Z"}],"updatedAt":"2026-11-25T22:58:08.639Z","epss":{"score":0.00226,"percentile":0.14179,"date":"2026-12-01T12:00:22.000Z"}}