Skip to content

eventpoll: fix ep_remove struct eventpoll / struct file UAF

Wentao Guan stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9eventpoll: don't decrement ep refcount while still holding the ep mutexfs/eventpoll.c+5 -70 replies
2/9file: add fput() cleanup helperinclude/linux/file.h+2 -00 replies
3/9eventpoll: use hlist_is_singular_node() in __ep_remove()fs/eventpoll.c+1 -10 replies
4/9eventpoll: split __ep_remove()fs/eventpoll.c+23 -40 replies
5/9eventpoll: kill __ep_remove()fs/eventpoll.c+30 -370 replies
6/9eventpoll: drop vestigial __ prefix from ep_remove_{file,epi}()fs/eventpoll.c+6 -60 replies
7/9eventpoll: rename ep_remove_safe() back to ep_remove()fs/eventpoll.c+8 -80 replies
8/9eventpoll: move epi_fget() upfs/eventpoll.c+28 -280 replies
9/9eventpoll: fix ep_remove struct eventpoll / struct file UAFfs/eventpoll.c+10 -60 replies

Reviews trailers per patch

1 of 9 patches has a Reviewed-by or Acked-by.

PatchJosef BacikJeff Layton
1/9
2/9R-b R-b
3/9
4/9
5/9
6/9
7/9
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 6.1.y 0/9] eventpoll: fix ep_remove struct eventpoll / struct file UAF

Fixes CVE-2026-46242 eventpoll: fix ep_remove struct eventpoll / struct file UAF

base on link: https://lore.kernel.org/stable/[email protected]/

add commit ("file: add fput() cleanup helper") to fix build error in v6.6.y :
error: cleanup argument not a function
struct file *file __free(fput) = NULL;

add commit ("eventpoll: don't decrement ep refcount while still holding the ep mutex") to fix context different in v6.1.y

Christian Brauner (8):
file: add fput() cleanup helper
eventpoll: use hlist_is_singular_node() in __ep_remove()
eventpoll: split __ep_remove()
eventpoll: kill __ep_remove()
eventpoll: drop vestigial __ prefix from ep_remove_{file,epi}()
eventpoll: rename ep_remove_safe() back to ep_remove()
eventpoll: move epi_fget() up
eventpoll: fix ep_remove struct eventpoll / struct file UAF

Linus Torvalds (1):
eventpoll: don't decrement ep refcount while still holding the ep
mutex

 fs/eventpoll.c       | 152 +++++++++++++++++++++++--------------------
 include/linux/file.h |   2 +
 2 files changed, 85 insertions(+), 69 deletions(-)
Signature · 1 line
2.30.2