summaryrefslogtreecommitdiff
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2024-04-16 21:14:52 +0300
committerJan Kara <jack@suse.cz>2024-04-17 16:06:50 +0300
commit795bb82d12a16a4cee42845b0e4c7e3276574e5d (patch)
treee82347600c4058d7e4c08ca42d7afd9af065405a /include/linux/fs.h
parenta5e57b4d370c6d320e5bfb0c919fe00aee29e039 (diff)
downloadlinux-795bb82d12a16a4cee42845b0e4c7e3276574e5d.tar.xz
fsnotify: fix UAF from FS_ERROR event on a shutting down filesystem
Protect against use after free when filesystem calls fsnotify_sb_error() during fs shutdown. Move freeing of sb->s_fsnotify_info to destroy_super_work(), because it may be accessed from fs shutdown context. Reported-by: syzbot+5e3f9b2a67b45f16d4e6@syzkaller.appspotmail.com Suggested-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/linux-fsdevel/20240416173211.4lnmgctyo4jn5fha@quack3/ Fixes: 07a3b8d0bf72 ("fsnotify: lazy attach fsnotify_sb_info state to sb") Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz> Message-Id: <20240416181452.567070-1-amir73il@gmail.com>
Diffstat (limited to 'include/linux/fs.h')
0 files changed, 0 insertions, 0 deletions