{"id":"CVE-2025-37828","summary":"scsi: ufs: mcq: Add NULL check in ufshcd_mcq_abort()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: ufs: mcq: Add NULL check in ufshcd_mcq_abort()\n\nA race can occur between the MCQ completion path and the abort handler:\nonce a request completes, __blk_mq_free_request() sets rq-\u003emq_hctx to\nNULL, meaning the subsequent ufshcd_mcq_req_to_hwq() call in\nufshcd_mcq_abort() can return a NULL pointer. If this NULL pointer is\ndereferenced, the kernel will crash.\n\nAdd a NULL check for the returned hwq pointer. If hwq is NULL, log an\nerror and return FAILED, preventing a potential NULL-pointer\ndereference.  As suggested by Bart, the ufshcd_cmd_inflight() check is\nremoved.\n\nThis is similar to the fix in commit 74736103fb41 (\"scsi: ufs: core: Fix\nufshcd_abort_one racing issue\").\n\nThis is found by our static analysis tool KNighter.","modified":"2026-03-20T12:42:29.745243Z","published":"2025-05-08T06:26:20.135Z","related":["MGASA-2025-0182","MGASA-2025-0183"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/37xxx/CVE-2025-37828.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/47eec518aef3814f64a5da43df81bdd74d8c0041"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4c324085062919d4e21c69e5e78456dcec0052fe"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7d002f591486f5ef4bc02eb02025a53f931f0eb5"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d6979fabe812a168d5053e5a41d5a2e9b8afd7bf"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/37xxx/CVE-2025-37828.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-37828"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"f1304d4420777f82a1d844c606db3d9eca841765"},{"fixed":"d6979fabe812a168d5053e5a41d5a2e9b8afd7bf"},{"fixed":"7d002f591486f5ef4bc02eb02025a53f931f0eb5"},{"fixed":"47eec518aef3814f64a5da43df81bdd74d8c0041"},{"fixed":"4c324085062919d4e21c69e5e78456dcec0052fe"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-37828.json"}}],"schema_version":"1.7.5"}