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: <20240616111502.1435-1-hdanton@sina.com>
Date: Sun, 16 Jun 2024 19:15:02 +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  83a7eefedc9b

--- x/fs/open.c
+++ y/fs/open.c
@@ -35,6 +35,8 @@
 #include <linux/filelock.h>
 
 #include "internal.h"
+#include "mount.h"
+#include "pnode.h"
 
 int do_truncate(struct mnt_idmap *idmap, struct dentry *dentry,
 		loff_t length, unsigned int time_attrs, struct file *filp)
@@ -952,6 +954,12 @@ static int do_dentry_open(struct file *f
 	if (!open)
 		open = f->f_op->open;
 	if (open) {
+		struct mount *mnt = real_mount(f->f_path.mnt);
+		error = -ENODEV;
+		if (mnt->mnt.mnt_flags & MNT_DOOMED)
+			goto cleanup_all;
+		if (mnt_get_count(mnt) < 2)
+			goto cleanup_all;
 		error = open(inode, f);
 		if (error)
 			goto cleanup_all;
--

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ