CVE-2024-57946 virtio-blk: don't keep queue frozen during system suspend

Medium 5.5 Published Updated

A race condition in the Linux kernel's virtio-blk driver during system suspend can cause a deadlock, leading to a denial of service.

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-2024-57946?

CVE-2024-57946 is a medium-severity vulnerability in Linux kernel, published on 21 Jan 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:

virtio-blk: don't keep queue frozen during system suspend

Commit 4ce6e2db00de ("virtio-blk: Ensure no requests in virtqueues before deleting vqs.") replaces queue quiesce with queue freeze in virtio-blk's PM callbacks. And the motivation is to drain inflight IOs before suspending.

block layer's queue freeze looks very handy, but it is also easy to cause deadlock, such as, any attempt to call into bio_queue_enter() may run into deadlock if the queue is frozen in current context. There are all kinds of ->suspend() called in suspend context, so keeping queue frozen in the whole suspend context isn't one good idea. And Marek reported lockdep warning[1] caused by virtio-blk's freeze queue in virtblk_freeze().

[1] https://lore.kernel.org/linux-block/[email protected]/

Given the motivation is to drain in-flight IOs, it can be done by calling freeze & unfreeze, meantime restore to previous behavior by keeping queue quiesced during suspend.

Weakness: CWE-667

Which versions are affected by CVE-2024-57946?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-57946?

Apply the vendor's patch.

Is CVE-2024-57946 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-57946, DEBIAN-CVE-2024-57946, GHSA-hgm3-gq5f-vjwg, UBUNTU-CVE-2024-57946.

Is CVE-2024-57946 in your software?

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

Check your SBOMs for free