Re: [syzbot] [f2fs?] KASAN: slab-use-after-free Read in kill_f2fs_super
From: Hillf Danton
Date: Fri Jan 12 2024 - 20:51:21 EST
On Fri, 12 Jan 2024 10:14:27 -0800
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: 70d201a40823 Merge tag 'f2fs-for-6.8-rc1' of git://git.ker..
> git tree: upstream
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16b910ede80000
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
--- x/fs/f2fs/super.c
+++ y/fs/f2fs/super.c
@@ -4880,6 +4880,7 @@ free_sbi:
if (sbi->s_chksum_driver)
crypto_free_shash(sbi->s_chksum_driver);
kfree(sbi);
+ sb->s_fs_info = NULL;
/* give only one another chance */
if (retry_cnt > 0 && skip_recovery) {
--