lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_411BA74B731B5425C2BA5ABB2C33119EE808@qq.com>
Date: Sat, 27 Jul 2024 12:07:50 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+1a8e2b31f2ac9bd3d148@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
	syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [f2fs?] KASAN: null-ptr-deref Write in f2fs_stop_gc_thread

use s_umount read lock sync remount and shutdown

#syz test: upstream 2c9b3512402e

diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index c1ad9b278c47..3940c0b11868 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -2280,7 +2280,9 @@ int f2fs_do_shutdown(struct f2fs_sb_info *sbi, unsigned int flag,
 	if (readonly)
 		goto out;
 
+	down_read(&sb->s_umount);
 	f2fs_stop_gc_thread(sbi);
+	up_read(&sb->s_umount);
 	f2fs_stop_discard_thread(sbi);
 
 	f2fs_drop_discard_cmd(sbi);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ