From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+0962e3a1af6d5e26a52c@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [lsm?] KASAN: slab-use-after-free Read in security_inode_follow_link
Date: Sat, 30 May 2026 17:51:57 +0800 [thread overview]
Message-ID: <20260530095200.1318-1-hdanton@sina.com> (raw)
In-Reply-To: <6a19f098.abb04025.19af7b.0004.GAE@google.com>
> Date: Fri, 29 May 2026 13:01:28 -0700 [thread overview]
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: eb3f4b7426cf Merge tag 'nfsd-7.1-2' of git://git.kernel.or..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=17dae52e580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=8118209836970b54
> dashboard link: https://syzkaller.appspot.com/bug?extid=0962e3a1af6d5e26a52c
> compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14427ed2580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=109e452e580000
#syz test
--- x/fs/namei.c
+++ y/fs/namei.c
@@ -5529,11 +5529,12 @@ int filename_unlinkat(int dfd, struct fi
struct dentry *dentry;
struct path path;
struct qstr last;
- int type;
+ int type, loop;
struct inode *inode;
struct delegated_inode delegated_inode = { };
unsigned int lookup_flags = 0;
retry:
+ loop = 0;
error = filename_parentat(dfd, name, lookup_flags, &path, &last, &type);
if (error)
return error;
@@ -5545,7 +5546,6 @@ retry:
error = mnt_want_write(path.mnt);
if (error)
goto exit_path_put;
-retry_deleg:
dentry = start_dirop(path.dentry, &last, lookup_flags);
error = PTR_ERR(dentry);
if (IS_ERR(dentry))
@@ -5561,7 +5561,6 @@ retry_deleg:
goto exit_drop_write;
}
inode = dentry->d_inode;
- ihold(inode);
error = security_path_unlink(&path, dentry);
if (error)
goto exit_end_dirop;
@@ -5569,16 +5568,17 @@ retry_deleg:
dentry, &delegated_inode);
exit_end_dirop:
end_dirop(dentry);
- iput(inode); /* truncate the inode here */
if (is_delegated(&delegated_inode)) {
error = break_deleg_wait(&delegated_inode);
if (!error)
- goto retry_deleg;
+ loop = 1;
}
exit_drop_write:
mnt_drop_write(path.mnt);
exit_path_put:
path_put(&path);
+ if (loop)
+ goto retry;
if (retry_estale(error, lookup_flags)) {
lookup_flags |= LOOKUP_REVAL;
goto retry;
--
next prev parent reply other threads:[~2026-05-30 9:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 20:01 syzbot
2026-05-30 0:40 ` Forwarded: [PATCH] bpf: defer bpffs symlink inode freeing until RCU grace period syzbot
2026-05-30 6:13 ` [syzbot] [lsm?] KASAN: slab-use-after-free Read in security_inode_follow_link Hillf Danton
2026-05-30 6:33 ` syzbot
2026-05-30 9:51 ` Hillf Danton [this message]
2026-05-30 10:47 ` syzbot
[not found] <7F635F9CD77A3161+20260530004041.1675667-1-hongao@uniontech.com>
2026-05-30 1:15 ` 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=20260530095200.1318-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+0962e3a1af6d5e26a52c@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
Powered by JetHome