public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+5d34cc6474499a5ff516@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [ntfs3?] KASAN: slab-use-after-free Read in chrdev_open
Date: Sat, 15 Jun 2024 14:47:46 +0800	[thread overview]
Message-ID: <20240615064746.915-1-hdanton@sina.com> (raw)
In-Reply-To: <000000000000f386f90616fea5ef@google.com>

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git  83a7eefedc9b

--- x/fs/open.c
+++ y/fs/open.c
@@ -952,7 +952,18 @@ 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 = -EINVAL;
+		for (;;) {
+			int a = atomic_read(&sb->s_active);
+			if (a < 1)
+				goto cleanup_all;
+			if (a == atomic_cmpxchg(&sb->s_active, a, a+1))
+				break;
+		}
 		error = open(inode, f);
+		deactivate_super(sb);
 		if (error)
 			goto cleanup_all;
 	}
--

  parent reply	other threads:[~2024-06-15  6:48 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26 12:00 [syzbot] [ntfs3?] KASAN: slab-use-after-free Read in chrdev_open syzbot
2024-04-26 20:57 ` syzbot
2024-04-27  2:06 ` Hillf Danton
2024-04-27  2:58   ` syzbot
2024-04-27  6:29 ` Hillf Danton
2024-04-27  6:52   ` syzbot
2024-04-27  9:18 ` Hillf Danton
2024-04-27  9:45   ` syzbot
2024-04-27 10:44 ` Hillf Danton
2024-04-27 10:58   ` syzbot
2024-05-27 11:30 ` [syzbot] " syzbot
2024-05-27 23:57 ` [syzbot] [ntfs3?] KASAN: " Hillf Danton
2024-05-28  0:39   ` syzbot
2024-05-28 11:08 ` Hillf Danton
2024-05-28 11:21   ` syzbot
2024-05-28 22:58 ` Hillf Danton
2024-05-28 23:18   ` syzbot
2024-05-29 11:49 ` Hillf Danton
2024-05-29 12:02   ` syzbot
2024-06-02  9:22 ` Edward Adam Davis
2024-06-02  9:45   ` syzbot
2024-06-02  9:56 ` [PATCH] fs/ntfs3: dealing with situations where dir_search_u may return null Edward Adam Davis
2024-06-14 12:48 ` [syzbot] [ntfs3?] KASAN: slab-use-after-free Read in chrdev_open Hillf Danton
2024-06-14 13:51   ` syzbot
2024-06-15  0:04 ` Hillf Danton
2024-06-15  1:41   ` syzbot
2024-06-15  6:47 ` Hillf Danton [this message]
2024-06-15  7:46   ` syzbot
2024-06-15  8:33 ` Hillf Danton
2024-06-15 12:56   ` syzbot
2024-06-16  6:32 ` Hillf Danton
2024-06-16  8:12   ` syzbot
2024-06-16 11:15 ` Hillf Danton
2024-06-16 13:58   ` syzbot
2024-06-17 10:29 ` Hillf Danton
2024-06-17 12:24   ` syzbot
2024-08-15  8:58 ` [syzbot] " syzbot
2024-08-23 16:04 ` syzbot
     [not found] <0a7a190a-edcf-492a-9ba2-868ea50c2cde@paragon-software.com>
2024-05-27 11:48 ` [syzbot] [ntfs3?] " syzbot
     [not found] <1c96f019b31a46519b805c0a698af0e2@paragon-software.com>
2024-08-15 10:06 ` syzbot
     [not found] <333f17b4357947228d61557068440e1f@paragon-software.com>
2024-08-23 16:50 ` syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240615064746.915-1-hdanton@sina.com \
    --to=hdanton@sina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+5d34cc6474499a5ff516@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox