GHSA-G3GG-H9W8-M526
Vulnerability from github – Published: 2026-12-03 12:31 – Updated: 2026-12-04 06:31In 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.
{
"affected": [],
"aliases": [
"CVE-2026-143091"
],
"database_specific": {
"cwe_ids": [],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-12-03T10:17:40Z",
"severity": "HIGH"
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\nxen/privcmd: fix double free when an irqfd is shut down twice\n\nirqfd_deactivate() takes the irqfd off irqfds_list and queues\nirqfd_shutdown(). queue_work() is not a once-only gate: it refuses to\nenqueue a work item only while WORK_STRUCT_PENDING is set, and\nprocess_one_work() clears that bit before it calls the work function. So\nnothing records that the shutdown work has already been queued, and\nnothing protects the window between the start of irqfd_shutdown() and the\nkfree() at its end.\n\nTwo paths call irqfd_deactivate() for the same irqfd:\n\n - privcmd_irqfd_deassign(), from the PRIVCMD_IRQFD_FLAG_DEASSIGN ioctl;\n\n - irqfd_wakeup(), with EPOLLHUP set, when the last reference to the\n eventfd file goes away, which runs wake_up_poll(\u0026ctx-\u003ewqh, EPOLLHUP)\n from eventfd_release().\n\nirqfds_lock serialises the two calls, but it does not make the second one\na no-op, and eventfd_ctx_fdget() takes a reference to the eventfd_ctx,\nnot to the struct file, so the last fd can still be closed while the\nioctl is running:\n\n CPU0 CPU1\n\n eventfd_ctx_fdget()\n spin_lock(irqfds_lock)\n list_del_init(\u0026kirqfd-\u003elist)\n queue_work(\u0026kirqfd-\u003eshutdown) close(fd)\n eventfd_release()\n wake_up_poll(EPOLLHUP)\n irqfd_wakeup()\n spin_lock(irqfds_lock)\n irqfd_deactivate() again\n\nIf the work item has already started by then, its pending bit has been\ncleared and the second queue_work() succeeds. irqfd_shutdown() then runs\ntwice, so eventfd_ctx_remove_wait_queue(), eventfd_ctx_put() and kfree()\neach hit the same object a second time; and when the second queue_work()\nlands after the irqfd has been freed, the workqueue list operations write\nto freed memory.\n\nvirt/kvm/eventfd.c has the same two callers and has had this guard since\nthe original irqfd support (721eecbf4fe99): irqfd_wakeup() calls\nirqfd_deactivate() only if irqfd_is_active(). The comment there explains\nwhy that is enough: the other side deactivates the irqfd before it takes\nit off the waitqueue, and irqfd_shutdown() needs the waitqueue lock,\nwhich this callback holds, so the irqfd cannot be freed under it.\n\nDo the same here. list_del_init() leaves the list head empty and the\nirqfd stays off the list until kfree(), so it serves as a one-way\n\"active\" flag. The test is in irqfd_deactivate() rather than in\nirqfd_wakeup() because privcmd_irqfd_deassign() walks irqfds_list and can\ntherefore never reach an inactive irqfd; only the wakeup path can, and a\nsingle test covers both callers.",
"id": "GHSA-g3gg-h9w8-m526",
"modified": "2026-12-04T06:31:08Z",
"published": "2026-12-03T12:31:04Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-143091"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/72a900c666adb97df77b05cf8540c4117f9c83ba"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/bec55c715b27e1eec4471968802c9d10ff6fef4e"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/c8dbf2b184aa82558fdcc1d58d4d2834b7743323"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/de87d311d5a3a5752949acb41962a86f31ce2ef0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.