xen-blkfront: unbind irq before tearing down ring and shadow requests
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel f3e27b7955727a4d7c0e9264a2a209fbba788bdc, Kernel 5f4b2debc87b6f86b56c6e1f5d97007a330d6aac, Kernel 9cdf4fae8fde297ed9ce6bb0058d25449606ee66 and 4 more.
In the Linux kernel, the following vulnerability has been resolved: xen-blkfront: unbind irq before tearing down ring and shadow requests In blkif_free_ring(), the driver tears down the ring's persistent grants, shadow request arrays, and shared ring structure (xenbus_teardown_ring), and only calls unbind_from_irqhandler() at the very end. While blkif_free_ring() is freeing persistent grants and clearing the shadow array, the event channel interrupt (blkif_interrupt) is still registered and active. If an interrupt arrives from the backend during this teardown window, blkif_interrupt() reads rinfo->ring.sring and, via blkif_completion(), accesses rinfo->shadow[id].grants_used and rinfo->shadow[id].sg. blkif_free_ring() tears these structures down without holding rinfo->ring_lock, and the handler only checks info->connected at entry, so this is a real race resulting in a use-after-free or NULL pointer dereference. Fix this by moving unbind_from_irqhandler() to the beginning of blkif_free_ring(). Calling unbind_from_irqhandler() first frees the IRQ and synchronizes with any in-flight interrupt handlers on other CPUs before ring memory and shadow request structures are deallocated, matching the teardown order in drivers/net/xen-netfront.c.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | >=11659569f7202d0cb6553e81f9b8aa04dfeb94ce <f3e27b7955727a4d7c0e9264a2a209fbba788bdc, >=11659569f7202d0cb6553e81f9b8aa04dfeb94ce <5f4b2debc87b6f86b56c6e1f5d97007a330d6aac, >=11659569f7202d0cb6553e81f9b8aa04dfeb94ce <9cdf4fae8fde297ed9ce6bb0058d25449606ee66, >=11659569f7202d0cb6553e81f9b8aa04dfeb94ce <e64707d07fcda07c71d4f1405c1bedb0787a6889, =4.5 | f3e27b7955727a4d7c0e9264a2a209fbba788bdc, 5f4b2debc87b6f86b56c6e1f5d97007a330d6aac, 9cdf4fae8fde297ed9ce6bb0058d25449606ee66, e64707d07fcda07c71d4f1405c1bedb0787a6889 |
| linux-kernel: Kernel | >=6.13.0 <6.18.61, >=6.19.0 <7.3.2, >=4.5.0 <6.12.117 | 6.18.61, 7.3.2, 6.12.117 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket