CVE-2026-99682: virtio_blk: use synchronous quiesce in virtblk_freeze_priv()
In the Linux kernel, the following vulnerability has been resolved:
virtioblk: use synchronous quiesce in virtblkfreezepriv()
blkmqrunworkfn() can call blkmqscheddispatchrequests() through blkmqrundispatchops(). The dispatcher checks QUEUEFLAGQUIESCED while the flag is clear. It can then be preempted before it gets a request. At that time, it has no queue usage reference, so blkmqfreezequeue() does not wait for it.
virtblkfreezepriv() then calls blkmqquiescequeuenowait() and blkmqunfreezequeue(). A new request can enter the queue. The old dispatcher can run again, use its old flag check, get the new request, and call virtioqueuerq(). At the same time, virtblkfreezepriv() can reset the device, delete the virtqueues, and free vblk->vqs. The old dispatcher can then use a deleted virtqueue or a NULL vblk->vqs, and the kernel can crash.
Fix this by using blkmqquiescequeue(), which waits for dispatch code that was already running. Keep the existing freeze and unfreeze order. The queue remains quiesced until virtblkrestorepriv() calls blkmqunquiescequeue().
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.5 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.11 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.16 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.2 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.7 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.13 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.64 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.5 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.5-1 - Compensating control
In virtblk_freeze_priv(), use synchronous blk_mq_quiesce_queue() instead of blk_mq_quiesce_queue_nowait(); keep the existing freeze and unfreeze order.
Event History
Frequently Asked Questions
What conditions are required to trigger the crash?
A block-multiqueue dispatch worker must check the queue's quiesced flag before it is set and then be preempted before obtaining a request. During that window, virtblk_freeze_priv() can freeze and unfreeze the queue, allowing a new request to enter while the device is reset and its virtqueues are deleted.
What is the impact of the race?
The previously running dispatcher can submit the new request through virtio_queue_rq() after the virtqueues have been deleted or vblk->vqs has been freed. This can dereference a deleted virtqueue or NULL vblk->vqs and crash the kernel.
What change resolves the issue?
The fix replaces the non-waiting blk_mq_quiesce_queue_nowait() call in virtblk_freeze_priv() with blk_mq_quiesce_queue(). The synchronous operation waits for dispatch code already in progress, and the queue remains quiesced until virtblk_restore_priv() unquiesces it.