summaryrefslogtreecommitdiff
path: root/include/linux/timerqueue_types.h
diff options
context:
space:
mode:
authorLuxiao Xu <rakukuip@gmail.com>2026-07-07 13:20:47 +0800
committerTrond Myklebust <trond.myklebust@hammerspace.com>2026-08-17 09:02:08 -0700
commit932a8cf6abb2b2f8677b79153a823108d8861fe2 (patch)
tree5ab1540dc66bae36a6f69d3a1f0aa69065a16dcb /include/linux/timerqueue_types.h
parent3e05a62a97b15dfaf9b14875d68084003828fb74 (diff)
sunrpc: fix use-after-free in __rpc_clnt_handle_event and __rpc_clnt_remove_pipedir
Normal client creation goes through rpc_setup_pipedir(), which records clnt->pipefs_sb, but the mount-event path in __rpc_clnt_handle_event() calls rpc_setup_pipedir_sb() directly and never refreshes that field. The umount path also removes the directory without clearing clnt->pipefs_sb. After a late pipefs mount or any remount, rpc_clnt_remove_pipedir() compares the current superblock against a stale pipefs_sb pointer and skips cleanup, leaving pipefs dentries whose inode private data still points at a freed rpc_clnt, leading to a potential use-after-free during subsequent rpc_info_open() or rpc_show_info() calls. Fix this by properly updating clnt->pipefs_sb upon mount events and clearing it during unmount or failure paths. Fixes: bfca5fb4e97c ("SUNRPC: Fix RPC client cleaned up the freed pipefs dentries") Cc: stable@vger.kernel.org Reported-by: Yuan Tan <yuantan098@gmail.com> Reported-by: Xin Liu <dstsmallbird@foxmail.com> Reviewed-by: Ren Wei <enjou1224z@gmail.com> Assisted-by: Codex:gpt-5.4 Signed-off-by: Luxiao Xu <rakukuip@gmail.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'include/linux/timerqueue_types.h')
0 files changed, 0 insertions, 0 deletions