From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+96d5d14c47d97015c624@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [nilfs?] KASAN: use-after-free Read in nilfs_find_entry
Date: Tue, 12 Nov 2024 15:52:23 +0800 [thread overview]
Message-ID: <tencent_5074A97043AAA456F764576E46C7137EC305@qq.com> (raw)
In-Reply-To: <6732e1d8.050a0220.138bd5.00d3.GAE@google.com>
next de space is not enough
#syz test
diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c
index a8602729586a..09a24c81dc7d 100644
--- a/fs/nilfs2/dir.c
+++ b/fs/nilfs2/dir.c
@@ -317,7 +317,7 @@ struct nilfs_dir_entry *nilfs_find_entry(struct inode *dir,
de = (struct nilfs_dir_entry *)kaddr;
kaddr += nilfs_last_byte(dir, n) - reclen;
- while ((char *)de <= kaddr) {
+ while ((char *)de + sizeof(*de) <= kaddr) {
if (de->rec_len == 0) {
nilfs_error(dir->i_sb,
"zero-length directory entry");
next prev parent reply other threads:[~2024-11-12 7:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-12 5:04 syzbot
2024-11-12 7:52 ` Edward Adam Davis [this message]
2024-11-12 8:08 ` syzbot
2024-11-12 8:35 ` Edward Adam Davis
2024-11-12 8:55 ` syzbot
2024-11-12 10:55 ` [PATCH] nilfs2: fix a uaf " Edward Adam Davis
2024-11-12 14:38 ` Ryusuke Konishi
2024-11-13 2:28 ` Edward Adam Davis
2024-11-13 14:54 ` Ryusuke Konishi
2024-11-14 12:01 ` Edward Adam Davis
2024-11-14 23:32 ` Ryusuke Konishi
2024-11-12 14:12 ` [syzbot] [nilfs?] KASAN: use-after-free Read " Ryusuke Konishi
2024-11-12 14:32 ` syzbot
2024-11-13 3:04 ` Ryusuke Konishi
2024-11-13 3:24 ` syzbot
2024-11-19 17:23 ` [PATCH] nilfs2: fix potential out-of-bounds memory access in nilfs_find_entry() Ryusuke Konishi
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=tencent_5074A97043AAA456F764576E46C7137EC305@qq.com \
--to=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+96d5d14c47d97015c624@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®