CVE-2025-37828 scsi: ufs: mcq: Add NULL check in ufshcd_mcq_abort()

Medium 5.5 Published Updated

A race condition in the Linux kernel UFS driver can cause a NULL pointer dereference, leading to a system crash.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-37828?

CVE-2025-37828 is a medium-severity vulnerability in Linux kernel, published on 8 May 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In the Linux kernel, the following vulnerability has been resolved:

scsi: ufs: mcq: Add NULL check in ufshcd_mcq_abort()

A race can occur between the MCQ completion path and the abort handler: once a request completes, __blk_mq_free_request() sets rq->mq_hctx to NULL, meaning the subsequent ufshcd_mcq_req_to_hwq() call in ufshcd_mcq_abort() 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 ufshcd_cmd_inflight() check is removed.

This is similar to the fix in commit 74736103fb41 ("scsi: ufs: core: Fix ufshcd_abort_one racing issue").

This is found by our static analysis tool KNighter.

Weakness: CWE-476

Which versions are affected by CVE-2025-37828?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-37828?

Apply the vendor's patch.

Is CVE-2025-37828 being exploited?

There is no known exploitation of CVE-2025-37828 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-37828, DEBIAN-CVE-2025-37828, GHSA-mr75-wq82-9hcw, ROOT-OS-UBUNTU-2404-CVE-2025-37828, UBUNTU-CVE-2025-37828.

Is CVE-2025-37828 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free