In the Linux kernel, the following vulnerability has been resolved:
scsi: ufs: mcq: Add NULL check in ufshcdmcqabort()
A race can occur between the MCQ completion path and the abort handler: once a request completes, __blkmqfreerequest() sets rq->mqhctx to NULL, meaning the subsequent ufshcdmcqreqtohwq() call in ufshcdmcqabort() can return a NULL pointer. If this NULL pointer is dereferenced, the kernel will crash.
Add a NULL check for the returned hwq pointer. If hwq is NULL, log an error and return FAILED, preventing a potential NULL-pointer dereference. As suggested by Bart, the ufshcdcmdinflight() check is removed.
This is similar to the fix in commit 74736103fb41 ("scsi: ufs: core: Fix ufshcdabortone racing issue").
This is found by our static analysis tool KNighter.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/37xxx/CVE-2025-37828.json"
}[
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"52917314539432514543551495812386112312",
"252867231482471798464453983428670396120",
"310892467737572223574943905143014024592",
"74346821640625466249006131627301065022",
"194263443683805189027564711363178388960",
"190324579061070589182453613241665954422",
"165431515240329810282249176655887961174",
"55740106221764876146589921339693630179",
"147483861748942436620805941478135191751",
"183504620441550780164706681524206578045",
"336011019467125675990704923147384014776",
"330180386925785116574672838534433296141",
"36500812549381791891797550369040859751"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"id": "CVE-2025-37828-54f9a9fa",
"target": {
"file": "drivers/ufs/core/ufs-mcq.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@47eec518aef3814f64a5da43df81bdd74d8c0041"
},
{
"digest": {
"length": 1040.0,
"function_hash": "1984607463207664305946544976049652958"
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"id": "CVE-2025-37828-ea95a76e",
"target": {
"function": "ufshcd_mcq_abort",
"file": "drivers/ufs/core/ufs-mcq.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@47eec518aef3814f64a5da43df81bdd74d8c0041"
}
]
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-37828.json"