AZL-118217: CVE-2026-143155 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
vsock/virtio: clear vqs[] to avoid a UAF on a failed PM restore
virtiovsockvqsdel() frees the virtqueues but leaves vsock->vqs[] pointing at them. If virtiovsockrestore() then fails, the driver stays bound with a dangling vqs[], and the next freeze or unbind passes a freed virtqueue to virtqueuedetachunusedbuf():
BUG: KASAN: slab-use-after-free in virtqueuedetachunusedbuf virtiovsockvqsdel (net/vmwvsock/virtiotransport.c:785) virtiovsockremove Freed by task ...: vpdelvqs virtiovsockfreeze
Clear vqs[] after delvqs() and when virtiofindvqs() fails. Return early from virtiovsockvqsdel() when vqs[] is empty: the detach loops would pass NULL to virtqueuedetachunusedbuf(), and a second delvqs() would free virtio-mmio's IRQ again, which only WARNs in freeirq() ("Trying to free already-free IRQ").
Found with the help of Anthropic's Claude and reproduced on virtio-pci and virtio-mmio by failing the restore with failslab, without other kernel changes; the virtio-mmio WARN was found by the netdev Sashiko review and reproduced with v1 of this patch. With this patch neither report appears on virtio-pci or virtio-mmio guests, and the vsock vmtest.sh single-VM tests pass. A findvqs() failure after some virtqueues were set up was not exercised.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In virtio_vsock, clear vqs[] after del_vqs() and when virtio_find_vqs() fails.
Event History
Frequently Asked Questions
What conditions are needed to trigger this issue?
The failure path requires a virtio-vsock power-management restore to fail after virtqueues have been deleted. The issue was reproduced by injecting restore failures with failslab on both virtio-pci and virtio-mmio.
What can happen after a failed restore?
The driver can remain bound while its virtqueue pointer array still references freed queues. A subsequent freeze or device unbind can then pass a freed virtqueue to virtqueue_detach_unused_buf(), causing a slab use-after-free; repeated cleanup can also attempt to free an already-free virtio-mmio IRQ.
How does the fix prevent repeated cleanup from using invalid queues?
It clears the vqs[] entries after deleting virtqueues and when virtio_find_vqs() fails. It also returns early from virtio_vsock_vqs_del() when vqs[] is empty, preventing NULL queue processing and a second cleanup attempt.