[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_684C75F177D366163C3136DE97A436404A09@qq.com>
Date: Fri, 5 Jan 2024 21:14:23 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+63cebbb27f598a7f901b@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [reiserfs?] general protection fault in __fget_files (2)
please test general protection fault in __fget_files
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f5837722ffec
diff --git a/fs/file.c b/fs/file.c
index 5fb0b146e79e..724f60e6cc4f 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -1134,6 +1134,8 @@ static unsigned long __fget_light(unsigned int fd, fmode_t mask)
return 0;
return (unsigned long)file;
} else {
+ if (!atomic_read_acquire(&files->count))
+ return 0;
file = __fget(fd, mask);
if (!file)
return 0;
Powered by blists - more mailing lists