Re: [syzbot] [jffs2?] [nilfs?] KASAN: slab-use-after-free Read in jffs2_garbage_collect_pass
From: Jeongjun Park
Date: Mon Apr 22 2024 - 01:29:25 EST
please test slab-use-after-free Read in jffs2_garbage_collect_pass
#syz test git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
---
fs/jffs2/super.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c
index aede1be4dc0c..49bf8e11c11c 100644
--- a/fs/jffs2/super.c
+++ b/fs/jffs2/super.c
@@ -348,6 +348,7 @@ static void jffs2_kill_sb(struct super_block *sb)
jffs2_stop_garbage_collect_thread(c);
kill_mtd_super(sb);
kfree(c);
+ memset(&c, 0, sizeof(struct jffs2_sb_info));
}
static struct file_system_type jffs2_fs_type = {
--
2.34.1