From: Jeremy Bingham <jbingham@gmail.com>
To: syzbot+cie60057db19604ba2@syzkaller.appspotmail.com
Cc: brauner@kernel.org, hch@infradead.org, jack@suse.cz,
jbingham@gmail.com, jkoolstra@xs4all.nl,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
syzbot@lists.linux.dev, syzkaller-bugs@googlegroups.com,
syzkaller@googlegroups.com, viro@zeniv.linux.org.uk
Subject: Re: [syzbot ci] Re: minix: convert to iomap and add direct I/O
Date: Mon, 29 Jun 2026 20:05:35 -0700 [thread overview]
Message-ID: <20260630030535.3309854-1-jbingham@gmail.com> (raw)
In-Reply-To: 6a42024c.9dc7bc9d.3393b4.0006.GAE@google.com
#syz test
minix: add the same dentry check as ext4_get_link to minix_get_link
It turns out that minix_get_link does need to have both the sb_bread and
the sb_getblk paths, like ext4_get_link does. It working with just the
sb_bread one initially was deceptive.
---
fs/minix/namei.c | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/fs/minix/namei.c b/fs/minix/namei.c
index e245f55a68ff..a4caaa3f7c9a 100644
--- a/fs/minix/namei.c
+++ b/fs/minix/namei.c
@@ -393,12 +393,23 @@ const char *minix_get_link(struct dentry *dentry, struct inode *inode,
else
blk = v2_block_to_cpu(*(v2_i_data(inode)));
- bh = sb_bread(sb, blk);
- if (IS_ERR(bh))
- return ERR_CAST(bh);
- if (!bh) {
- pr_err("bad symlink on inode %llu", inode->i_ino);
- return ERR_PTR(-EFSCORRUPTED);
+ /* This tried dodging the dentry check that ext4 does, but it turns out
+ * that it's necessary after all.
+ */
+ if (!dentry) {
+ bh = sb_getblk(sb, blk);
+ if (!bh || !buffer_uptodate(bh)) {
+ brelse(bh);
+ return ERR_PTR(-ECHILD);
+ }
+ } else {
+ bh = sb_bread(sb, blk);
+ if (IS_ERR(bh))
+ return ERR_CAST(bh);
+ if (!bh) {
+ pr_err("bad symlink on inode %llu", inode->i_ino);
+ return ERR_PTR(-EFSCORRUPTED);
+ }
}
set_delayed_call(callback, minix_free_link, bh);
--
2.47.3
next prev parent reply other threads:[~2026-06-30 3:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1782619718.git.jbingham@gmail.com>
2026-06-29 5:27 ` [syzbot ci] Re: minix: convert to iomap and add direct I/O syzbot ci
2026-06-30 3:05 ` Jeremy Bingham [this message]
2026-06-30 4:05 ` syzbot ci
2026-06-26 20:21 Forwarded: " syzbot
2026-06-26 21:00 ` syzbot ci
-- strict thread matches above, loose matches on Subject: below --
2026-06-26 20:21 Forwarded: " syzbot
2026-06-26 20:54 ` syzbot ci
2026-06-26 20:21 Forwarded: " syzbot
2026-06-26 20:50 ` syzbot ci
2026-06-26 19:26 Forwarded: " syzbot
2026-06-26 20:13 ` syzbot ci
2026-06-26 19:26 Forwarded: " syzbot
2026-06-26 20:18 ` syzbot ci
2026-06-26 19:25 Forwarded: " syzbot
2026-06-26 20:00 ` syzbot ci
[not found] <cover.1782422707.git.jbingham@gmail.com>
2026-06-26 7:07 ` syzbot ci
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=20260630030535.3309854-1-jbingham@gmail.com \
--to=jbingham@gmail.com \
--cc=brauner@kernel.org \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=jkoolstra@xs4all.nl \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+cie60057db19604ba2@syzkaller.appspotmail.com \
--cc=syzbot@lists.linux.dev \
--cc=syzkaller-bugs@googlegroups.com \
--cc=syzkaller@googlegroups.com \
--cc=viro@zeniv.linux.org.uk \
/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