In the Linux kernel, the following vulnerability has been resolved: 9p/xen: drain response work after unbinding IRQ commit ea4f1009408e ("9p/xen : Fix use after free bug in xen_9pfs_front_remove due to race condition") added cancel_work_sync() to keep xen_9pfs_front_free() from freeing a ring while p9_xen_response() is still running. The work is currently drained before the event channel IRQ is unbound. That leaves a race window where xen_9pfs_front_event_handler() can run after cancel_work_sync() returns and queue p9_xen_response() again. The following unbind_from_irqhandler() synchronizes with the IRQ handler, but it does not cancel work that the handler already queued. The teardown can then free the ring and private data while the response work remains pending, and the worker later dereferences ring->priv and priv->client. Unbind the event channel IRQ before draining the work. Once the IRQ is unbound, no new response work can be queued by the backend event channel, and cancel_work_sync() waits for any work that was queued before or during the unbind. It is then safe to release the ring resources.
https://git.kernel.org/stable/c/f7cdeb1569ec7c722500454afaaf81b65e98c9ef
https://git.kernel.org/stable/c/d0ae83217f0f756bfbd185f3abbf0dd0f91c116a
https://git.kernel.org/stable/c/ca5484c01b8f243033f2f47cc66543e2709364ae
https://git.kernel.org/stable/c/94698ee77d4306d06edb34a1f3a24428e9153489
https://git.kernel.org/stable/c/93ae5935761c46c4545d47985e5b749131e213a9
https://git.kernel.org/stable/c/9196431a31b4cd121c71ecc2686ac319874cfbef
https://git.kernel.org/stable/c/80461b4cf0dde46f592cf57451a8cb9cad4f9bd0
https://git.kernel.org/stable/c/7b6f2e3c29fb4d76f1e4973280792eabbd526602