CVE-2026-97478: virt: acrn: Fix irqfd use-after-free during eventfd shutdown

Published Sep 24, 2026
·
Updated

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

virt: acrn: Fix irqfd use-after-free during eventfd shutdown

acrnirqfddeassign() and the eventfd EPOLLHUP wakeup can race and free the same struct hsmirqfd:

CPU0 CPU1 ---- ---- eventfdrelease() wakeuppoll(EPOLLHUP) hsmirqfdwakeup() queuework(&irqfd->shutdown) acrnirqfddeassign() hsmirqfdshutdown() listdelinit() eventfdctxremovewaitqueue() eventfdctxput() kfree(irqfd) hsmirqfdshutdownwork() containerof(work, ..., shutdown) irqfd->vm <-- use-after-free

The deassign path freed the irqfd while a shutdown work item was already queued by EPOLLHUP (or vice versa), so the work item could resurrect a dangling pointer through containerof().

Switch to the lifetime model used by KVM irqfds:

- Deassign/deinit only deactivate the irqfd: remove it from vm->irqfds under irqfdslock and queue the cleanup work. - hsmirqfdshutdownwork() becomes the sole owner that unhooks the eventfd waitqueue entry, drops the eventfd reference and frees the irqfd. - A new HSMIRQFDFLAGSHUTDOWN bit guarded by testandsetbit() ensures the cleanup work is queued at most once, no matter how many of {EPOLLHUP, deassign, deinit} fire concurrently. This is safe to call from the waitqueue callback, which runs with wqh->lock held and IRQs disabled and therefore cannot take irqfdslock. - acrnirqfddeassign() flushes vm->irqfdwq before returning so the eventfd is fully detached on return. acrnirqfddeinit() deactivates every irqfd, flushes the workqueue and only then destroys it, so no path can queuework() onto a torn-down workqueue. - acrnirqfdassign() now installs the eventfd waitqueue entry and publishes the irqfd to vm->irqfds under irqfdslock, so the irqfd is never visible to deassign/deinit before its waitqueue entry is in place, and any EPOLLHUP that fires in the assign window queues cleanup work that blocks on irqfdslock until publication is done.

Affected Software

1 affected component
Linux Linux kernel

Event History

Sep 24, 2026
CVE Published
via MITRE·04:04 PM
Data Sourced
via MITRE·04:04 PM
Description
Data Sourced
via NVD·05:17 PM
Description

Frequently Asked Questions

1

What condition triggers the use-after-free?

The race occurs when an ACRN irqfd is deassigned while the associated eventfd is being released and generates an EPOLLHUP wakeup. Either path can queue shutdown handling while the other frees the same irqfd structure.

2

What is the practical failure mechanism?

A queued shutdown work item can later use container_of() to recover an irqfd structure that has already been freed by the deassign path. The dangling structure is then accessed through its vm member.

3

What does the fix change to prevent the race?

Deassignment and deinitialization now deactivate the irqfd and queue cleanup rather than freeing it directly. The shutdown worker exclusively removes the eventfd waitqueue entry, drops the eventfd reference, and frees the irqfd; a shutdown flag prevents cleanup from being queued more than once.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203