From: syzbot <syzbot+de1498ff3a934ac5e8b4@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] Re: [syzbot] [jfs?] KASAN: null-ptr-deref Read in drop_buffers (3)
Date: Fri, 18 Apr 2025 02:46:42 -0700 [thread overview]
Message-ID: <68021f82.050a0220.243d89.0019.GAE@google.com> (raw)
In-Reply-To: <66fcb7f9.050a0220.f28ec.04e8.GAE@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: Re: [syzbot] [jfs?] KASAN: null-ptr-deref Read in drop_buffers (3)
Author: richard120310@gmail.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git cb82ca153949
Signed-off-by: I Hsin Cheng <richard120310@gmail.com>
---
fs/buffer.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/buffer.c b/fs/buffer.c
index cc8452f60251..1e3a07c66c1a 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2885,7 +2885,7 @@ drop_buffers(struct folio *folio, struct buffer_head **buffers_to_free)
bh = head;
do {
- if (buffer_busy(bh))
+ if (!bh || buffer_busy(bh))
goto failed;
bh = bh->b_this_page;
} while (bh != head);
@@ -2896,6 +2896,8 @@ drop_buffers(struct folio *folio, struct buffer_head **buffers_to_free)
if (bh->b_assoc_map)
__remove_assoc_queue(bh);
bh = next;
+ if (!bh)
+ goto failed;
} while (bh != head);
*buffers_to_free = head;
folio_detach_private(folio);
--
2.43.0
next prev parent reply other threads:[~2025-04-18 9:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-02 3:03 [syzbot] [jfs?] KASAN: null-ptr-deref Read in drop_buffers (3) syzbot
2024-10-02 13:40 ` Jan Kara
2024-10-17 14:11 ` [syzbot] " syzbot
2025-04-18 9:46 ` syzbot [this message]
2025-04-22 19:22 ` [syzbot] [PATCH] Re: [syzbot] [jfs?] " syzbot
2025-04-23 2:37 ` [RFC PATCH] fs/buffer: Handle non folio buffer case for drop_buffer() I Hsin Cheng
2025-04-23 10:13 ` Jan Kara
2025-04-25 16:52 ` I Hsin Cheng
2025-04-25 20:01 ` Matthew Wilcox
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=68021f82.050a0220.243d89.0019.GAE@google.com \
--to=syzbot+de1498ff3a934ac5e8b4@syzkaller.appspotmail.com \
--cc=linux-kernel@vger.kernel.org \
/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