CVE-2026-138847: xen-blkfront: Fix IO race during unplug
In the Linux kernel, the following vulnerability has been resolved:
xen-blkfront: Fix IO race during unplug
During unplug, blkfront stops the hw queues and marks the disk as dead, then later during removal calls delgendisk(). However, IO issued after the hw queues are stopped but before the call to delgendisk() will be queued but never handled. This causes delgendisk() to hang forever waiting for the queue refcount to drop to zero.
This can be reproduced by issuing IO during an artificial delay after stopping the hw queues.
Fix this by simply not stopping the hw queues directly. Marking the disk as dead already freezes the queue which prevents new requests being added and it synchronously runs the hw queues to clear anything pending. If the hw queues are stopped when calling blkmarkdiskdead(), running the hw queues is a no-op and can leave queued requests unprocessed.
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.15.226 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.193 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.163 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.117 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.63 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.4 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.117-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.4-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.117-1Fixed in 7.3.4-1 - Compensating control
In xen-blkfront unplug handling, do not stop the hardware queues directly; blk_mark_disk_dead() freezes the queue, and del_gendisk() synchronously runs the queues to clear pending requests.
Event History
Frequently Asked Questions
What conditions are required to trigger the hang?
I/O must be issued after blkfront hardware queues are stopped during unplug but before del_gendisk() is called. Those requests can be queued without being processed, leaving the queue reference count nonzero.
What is the observable impact on an affected system?
Device removal can hang indefinitely in del_gendisk(), which waits forever for the queue reference count to drop to zero. The issue is associated with unplug/removal activity in the Xen blkfront driver.