CVE-2026-143091

Not scored yetLast modified Dec 3, 2026

Description

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

xen/privcmd: fix double free when an irqfd is shut down twice

irqfd_deactivate() takes the irqfd off irqfds_list and queues irqfd_shutdown(). queue_work() is not a once-only gate: it refuses to enqueue a work item only while WORK_STRUCT_PENDING is set, and process_one_work() clears that bit before it calls the work function. So nothing records that the shutdown work has already been queued, and nothing protects the window between the start of irqfd_shutdown() and the kfree() at its end.

Two paths call irqfd_deactivate() for the same irqfd:

- privcmd_irqfd_deassign(), from the PRIVCMD_IRQFD_FLAG_DEASSIGN ioctl;

- irqfd_wakeup(), with EPOLLHUP set, when the last reference to the eventfd file goes away, which runs wake_up_poll(&ctx->wqh, EPOLLHUP) from eventfd_release().

irqfds_lock serialises the two calls, but it does not make the second one a no-op, and eventfd_ctx_fdget() takes a reference to the eventfd_ctx, not to the struct file, so the last fd can still be closed while the ioctl is running:

CPU0 CPU1

eventfd_ctx_fdget() spin_lock(irqfds_lock) list_del_init(&kirqfd->list) queue_work(&kirqfd->shutdown) close(fd) eventfd_release() wake_up_poll(EPOLLHUP) irqfd_wakeup() spin_lock(irqfds_lock) irqfd_deactivate() again

If the work item has already started by then, its pending bit has been cleared and the second queue_work() succeeds. irqfd_shutdown() then runs twice, so eventfd_ctx_remove_wait_queue(), eventfd_ctx_put() and kfree() each hit the same object a second time; and when the second queue_work() lands after the irqfd has been freed, the workqueue list operations write to freed memory.

virt/kvm/eventfd.c has the same two callers and has had this guard since the original irqfd support (721eecbf4fe99): irqfd_wakeup() calls irqfd_deactivate() only if irqfd_is_active(). The comment there explains why that is enough: the other side deactivates the irqfd before it takes it off the waitqueue, and irqfd_shutdown() needs the waitqueue lock, which this callback holds, so the irqfd cannot be freed under it.

Do the same here. list_del_init() leaves the list head empty and the irqfd stays off the list until kfree(), so it serves as a one-way "active" flag. The test is in irqfd_deactivate() rather than in irqfd_wakeup() because privcmd_irqfd_deassign() walks irqfds_list and can therefore never reach an inactive irqfd; only the wakeup path can, and a single test covers both callers.

Metrics

No CVSS score has been published yet.

Affected software

Source: the vendor's advisory (CNA). NVD analysis pending.

No affected versions have been published.

Timeline

Published
Dec 3, 2026
Last modified
Dec 3, 2026
NVD status
Received

Related CVEs from 2026

CVE-2026-143092In the Linux kernel, the following vulnerability has been resolved: xen/gntdev: fix deadlock between map ioctl and mmap Commit 45ca1afe2fdCVE-2026-143093In the Linux kernel, the following vulnerability has been resolved: x86/mm: Ensure write visibility during LDT installation During LDT insCVE-2026-143094In the Linux kernel, the following vulnerability has been resolved: spi: tegra210-quad: Unmap DMA buffers on transfer timeout tegra_qspi_sCVE-2026-143095In the Linux kernel, the following vulnerability has been resolved: spi: tegra210-quad: Track DMA mapping state tegra_qspi_dma_unmap_xfer(CVE-2026-143096In the Linux kernel, the following vulnerability has been resolved: spi: axi-spi-engine: Start the program length at zero spi_engine_optimCVE-2026-143097In the Linux kernel, the following vulnerability has been resolved: tpm: flush timeout work outside buffer_mutex to avoid deadlock tpm_comCVE-2026-143098In the Linux kernel, the following vulnerability has been resolved: tpm: eventlog: check the payload size before reading tag events The EVCVE-2026-143099In the Linux kernel, the following vulnerability has been resolved: SUNRPC: Fix TCP-with-TLS transport class identification xs_setup_tcp_tCVE-2026-14315.3The Booking Calendar plugin for WordPress is vulnerable to unauthorized access of data due to a missing capability check on the wpbc_ajax_WPCVE-2026-143105.4The Tutor LMS WordPress plugin before 4.0.0 does not properly verify that a user has access to the course a Q&A thread belongs to before reCVE-2026-143100In the Linux kernel, the following vulnerability has been resolved: software node: only let the owner release a managed node device_createCVE-2026-143101In the Linux kernel, the following vulnerability has been resolved: arm64: suspend: Save GCS state over suspend GCSCRE0_EL1 and GCSPR_EL0
CVE-2026-143091: Unscored | Vulnix