CVE-2023-52787 blk-mq: make sure active queue usage is held for bio_integrity_prep()

Medium 5.5 Published Updated

A race condition in the Linux kernel block layer can cause a kernel panic when integrity profiles are unregistered during bio preparation.

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-2023-52787?

CVE-2023-52787 is a medium-severity vulnerability in Linux kernel, published on 21 May 2024. 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:

blk-mq: make sure active queue usage is held for bio_integrity_prep()

blk_integrity_unregister() can come if queue usage counter isn't held for one bio with integrity prepared, so this request may be completed with calling profile->complete_fn, then kernel panic.

Another constraint is that bio_integrity_prep() needs to be called before bio merge.

Fix the issue by:

- call bio_integrity_prep() with one queue usage counter grabbed reliably

- call bio_integrity_prep() before bio merge

Which versions are affected by CVE-2023-52787?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2023-52787?

Apply the vendor's patch.

Is CVE-2023-52787 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2023-52787, DEBIAN-CVE-2023-52787, GHSA-2xv3-4xmw-7ff2, UBUNTU-CVE-2023-52787.

Is CVE-2023-52787 in your software?

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

Check your SBOMs for free