Skip to contentSkip to conversation

CVE-2026-99682: virtio_blk: use synchronous quiesce in virtblk_freeze_priv()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 20

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

virtio_blk: use synchronous quiesce in virtblk_freeze_priv()

blk_mq_run_work_fn() can call blk_mq_sched_dispatch_requests() through blk_mq_run_dispatch_ops(). The dispatcher checks QUEUE_FLAG_QUIESCED 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 blk_mq_freeze_queue() does not wait for it.

virtblk_freeze_priv() then calls blk_mq_quiesce_queue_nowait() and blk_mq_unfreeze_queue(). A new request can enter the queue. The old dispatcher can run again, use its old flag check, get the new request, and call virtio_queue_rq(). At the same time, virtblk_freeze_priv() 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 blk_mq_quiesce_queue(), which waits for dispatch code that was already running. Keep the existing freeze and unfreeze order. The queue remains quiesced until virtblk_restore_priv() calls blk_mq_unquiesce_queue().

The Linux kernel CVE team has assigned CVE-2026-99682 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.13 with commit 7678abee0867e6b7fb89aa40f6e9f575f755fb37 and fixed in 6.18.64 with commit 55cc03a17478e7da75df133a4d94ffa47856fee6
	Issue introduced in 6.13 with commit 7678abee0867e6b7fb89aa40f6e9f575f755fb37 and fixed in 7.3.5 with commit 76f6e24c08a613361fb636d492934cda705d8890
	Issue introduced in 6.13 with commit 7678abee0867e6b7fb89aa40f6e9f575f755fb37 and fixed in 7.4-rc2 with commit 6c6dec7883f8eb10b326bc9d109a4990c885d949
	Issue introduced in 5.4.289 with commit d738f3215bb4f88911ff4579780a44960c8e0ca5
	Issue introduced in 5.10.233 with commit 9ca428c6397abaa8c38f5c69133a2299e1efbbf2
	Issue introduced in 5.15.176 with commit 6dea8e3de59928974bf157dd0499d3958d744ae4
	Issue introduced in 6.1.123 with commit 9e323f856cf4963120e0e3892a84ef8bd764a0e4
	Issue introduced in 6.6.69 with commit 12c0ddd6c551c1e438b087f874b4f1223a75f7ea
	Issue introduced in 6.12.8 with commit 92d5139b91147ab372a17daf5dc27a5b9278e516

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-99682

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/block/virtio_blk.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/55cc03a17478e7da75df133a4d94ffa47856fee6
	https://git.kernel.org/stable/c/76f6e24c08a613361fb636d492934cda705d8890
	https://git.kernel.org/stable/c/6c6dec7883f8eb10b326bc9d109a4990c885d949