summaryrefslogtreecommitdiff
path: root/include/linux/debugobjects.h
diff options
context:
space:
mode:
authorJoanne Koong <joannelkoong@gmail.com>2026-05-19 08:28:06 +0300
committerMiklos Szeredi <mszeredi@redhat.com>2026-06-09 17:11:02 +0300
commita078484921052d0badd827fcc2770b5cfc1d4120 (patch)
tree62e79093b285b3acc42d950b116979af89ab0e6f /include/linux/debugobjects.h
parent9f6f44aa5a58aaae0838126dc09460c3e1f56ccb (diff)
downloadlinux-a078484921052d0badd827fcc2770b5cfc1d4120.tar.xz
fuse: re-lock request before replacing page cache folio
fuse_try_move_folio() unlocks the request on entry but does not re-lock it on the success path. This means fuse_chan_abort() can end the request and free the fuse_io_args (eg fuse_readpages_end()) while the subsequent copy chain logic after fuse_try_move_folio() accesses the fuse_io_args, leading to use-after-free issues. Fix this by calling lock_request() before replace_page_cache_folio(). This ensures the request is locked on the success path which will prevent the fuse_io_args from being freed while the later copying logic runs, and also ensures that the ap->folios[i]->mapping is never null since ap->folios[i] will always point to the newfolio after replace_page_cache_folio(). Fixes: ce534fb05292 ("fuse: allow splice to move pages") Cc: stable@vger.kernel.org Reported-by: Lei Lu <llfamsec@gmail.com> Signed-off-by: Joanne Koong <joannelkoong@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions