linux/fs/eventpoll.c
Nicholas Carlini 902120be4f eventpoll: defer struct eventpoll free to RCU grace period
[ Upstream commit 07712db808 ]

In certain situations, ep_free() in eventpoll.c will kfree the epi->ep
eventpoll struct while it still being used by another concurrent thread.
Defer the kfree() to an RCU callback to prevent UAF.

Fixes: f2e467a482 ("eventpoll: Fix semi-unbounded recursion")
Signed-off-by: Nicholas Carlini <nicholas@carlini.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2026-06-01 17:35:02 +02:00

2544 lines
68 KiB