CVE-2026-99301: virtio_net: atomically disable rx mode work
In the Linux kernel, the following vulnerability has been resolved:
virtionet: atomically disable rx mode work
virtio-net uses a boolean to gate rxmodework during device teardown. The flag is changed under RTNL, but ndosetrxmode checks it under the address-list lock. A callback can therefore pass the check and enqueue work after teardown has flushed it. The work is also enabled before late probe operations that can fail, allowing probe unwind to free the netdev with work still queued.
KASAN reports the worker using a virtqueue that probe unwind already freed:
BUG: KASAN: slab-use-after-free in virtqueueaddsplit Workqueue: events virtnetrxmodework Call Trace: virtqueueaddsplit (drivers/virtio/virtioring.c:706) virtqueueaddsgs (drivers/virtio/virtioring.c:2839) virtnetsendcommandreply (drivers/net/virtionet.c:3565) virtnetrxmodework (drivers/net/virtionet.c:3833) processonework (kernel/workqueue.c:3322) workerthread (kernel/workqueue.c:3405) Freed by task 119: kfree (mm/slub.c:6625) vpdelvq.isra.0 (drivers/virtio/virtiopcicommon.c:259) vpdelvqs (drivers/virtio/virtiopcicommon.c:285) virtnetprobe (drivers/net/virtionet.c:7129)
Use the workqueue disable mechanism to atomically reject new queue attempts and drain running work. Keep work disabled until probe succeeds or restore has reattached the netdev, then enable it and replay receive-mode state for a running interface. Disable it before resource teardown in freeze and remove.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Use the workqueue disable mechanism to atomically reject new rx_mode_work queue attempts and drain running work. Disable the work before resource teardown in freeze and remove, and keep it disabled until probe succeeds or restore has reattached the netdev; then enable it and replay receive-mode state.