{"id":"AZL-118091","summary":"CVE-2026-143091 affecting package kernel 6.6.161.1-1","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(&ctx-\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(&kirqfd-\u003elist)\n  queue_work(&kirqfd-\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.","modified":"2026-12-04T14:18:39.774675360Z","published":"2026-12-03T10:17:40Z","upstream":["CVE-2026-143091"],"references":[{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-143091"}],"affected":[{"package":{"name":"kernel","ecosystem":"Azure Linux:3","purl":"pkg:rpm/azure-linux/kernel"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"6.6.161.1-1"}]}],"database_specific":{"source":"https://github.com/microsoft/AzureLinuxVulnerabilityData/blob/main/osv/AZL-118091.json"}}],"schema_version":"1.9.2"}