[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240528110830.2701-1-hdanton@sina.com>
Date: Tue, 28 May 2024 19:08:30 +0800
From: Hillf Danton <hdanton@...a.com>
To: syzbot <syzbot+5d34cc6474499a5ff516@...kaller.appspotmail.com>
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [ntfs3?] KASAN: slab-use-after-free Read in chrdev_open
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
--- x/fs/open.c
+++ y/fs/open.c
@@ -952,7 +952,13 @@ static int do_dentry_open(struct file *f
if (!open)
open = f->f_op->open;
if (open) {
+ struct super_block *sb = inode->i_sb;
+
+ error = -ENODEV;
+ if (!super_trylock_shared(sb))
+ goto cleanup_all;
error = open(inode, f);
+ up_read(&sb->s_umount);
if (error)
goto cleanup_all;
}
--
Powered by blists - more mailing lists