From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+f82b36bffae7ef78b6a7@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [fs?] KASAN: slab-use-after-free Read in lockref_get_not_dead (2)
Date: Sat, 7 Sep 2024 06:16:58 +0800 [thread overview]
Message-ID: <20240906221658.2144-1-hdanton@sina.com> (raw)
In-Reply-To: <000000000000af47d506216f5b6e@google.com>
On Fri, 06 Sep 2024 01:40:23 -0700
> syzbot found the following issue on:
>
> HEAD commit: 9b0874286768 Merge branch 'mctp-serial-tx-escapes'
> git tree: net
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1627ab2b980000
#syz test
--- x/fs/libfs.c
+++ y/fs/libfs.c
@@ -2234,6 +2234,7 @@ int path_from_stashed(struct dentry **st
path->dentry = stash_dentry(stashed, dentry);
if (path->dentry != dentry)
dput(dentry);
+ dget(dentry);
out_path:
WARN_ON_ONCE(path->dentry->d_fsdata != stashed);
@@ -2258,5 +2259,6 @@ void stashed_dentry_prune(struct dentry
* already cleared out @dentry and stashed their own
* dentry in there.
*/
- cmpxchg(stashed, dentry, NULL);
+ if (dentry == cmpxchg(stashed, dentry, NULL))
+ dput(dentry);
}
--
next prev parent reply other threads:[~2024-09-06 22:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-06 8:40 syzbot
2024-09-06 22:16 ` Hillf Danton [this message]
2024-09-06 22:45 ` 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=20240906221658.2144-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+f82b36bffae7ef78b6a7@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
all inboxes | Powered by JetHome®