|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 1/2] Fix use-after-free in evtchn DPC
W dniu 27.05.2026 o 03:41, Tu Dinh pisze: From my understanding KeFlushQueuedDpcs() flushes what's *currently* queued, so there would still be a window after it completes and before Close() finishes when new events could arrive.On 26/05/2026 18:30, Rafał Wojdyła wrote:EvtchnFree() calls XENBUS_EVTCHN(Close) and then KeFlushQueuedDpcs() to drain any pending DPCs. A DPC queued just before Close returns can run in the window between Close completing and the flush draining it, at which point it dereferences Context->Channel inside XENBUS_EVTCHN(Unmask). Also move Context->Fdo initialization to before opening the channel so Context is fully populated by the time the channel can fire its first interrupt. Signed-off-by: Rafał Wojdyła <omeg@xxxxxxxxxxxxxxxxxxxxxx> --- src/xeniface/ioctl_evtchn.c | 21 ++++++++++++++------- src/xeniface/ioctls.h | 1 + 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/xeniface/ioctl_evtchn.c b/src/xeniface/ioctl_evtchn.c index 6d63996..e38e25f 100644 --- a/src/xeniface/ioctl_evtchn.c +++ b/src/xeniface/ioctl_evtchn.c @@ -58,11 +58,14 @@ EvtchnNotificationDpc(KeSetEvent(Context->Event, 0, FALSE); - (VOID) XENBUS_EVTCHN(Unmask,
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |