public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Prithvi Tambewagh <activprithvi@gmail.com>
To: syzbot+c818e5c4559444f88aa0@syzkaller.appspotmail.com,
	jlbec@evilplan.org, joseph.qi@linux.alibaba.com, mark@fasheh.com
Cc: linux-kernel@vger.kernel.org, ocfs2-devel@lists.linux.dev,
	syzkaller-bugs@googlegroups.com,
	Prithvi Tambewagh <activprithvi@gmail.com>
Subject: Syzbot testing for ocfs2: Fix kernel BUG in ocfs2_write_block
Date: Sat,  6 Dec 2025 18:01:26 +0530	[thread overview]
Message-ID: <20251206123128.166117-1-activprithvi@gmail.com> (raw)
In-Reply-To: <66eb6a0e.050a0220.115905.001b.GAE@google.com>

#syz test git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 24172e0d79900908cf5ebf366600616d29c9b417

Signed-off-by: Prithvi Tambewagh <activprithvi@gmail.com>
---
 fs/ocfs2/slot_map.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/fs/ocfs2/slot_map.c b/fs/ocfs2/slot_map.c
index e544c704b583..de793a83555c 100644
--- a/fs/ocfs2/slot_map.c
+++ b/fs/ocfs2/slot_map.c
@@ -193,6 +193,16 @@ static int ocfs2_update_disk_slot(struct ocfs2_super *osb,
 	else
 		ocfs2_update_disk_slot_old(si, slot_num, &bh);
 	spin_unlock(&osb->osb_lock);
+	if (bh->b_blocknr < OCFS2_SUPER_BLOCK_BLKNO) {
+		status = ocfs2_error(osb->sb,
+				     "Invalid Buffer Head Block Number : %llu, "
+				     "Should be >= %d",
+				     le16_to_cpu(bh->b_blocknr),
+				     le16_to_cpu((int)OCFS2_SUPER_BLOCK_BLKNO));
+		if(!status) {
+			return -EIO;
+		}
+	}
 
 	status = ocfs2_write_block(osb, bh, INODE_CACHE(si->si_inode));
 	if (status < 0)

base-commit: 24172e0d79900908cf5ebf366600616d29c9b417
-- 
2.43.0


  reply	other threads:[~2025-12-06 12:31 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-19  0:02 [syzbot] [ocfs2?] kernel BUG in ocfs2_write_block syzbot
2025-12-06 12:31 ` Prithvi Tambewagh [this message]
2025-12-06 12:52   ` syzbot
2025-12-06 13:04 ` Syzbot testing for ocfs2: Fix " Prithvi Tambewagh
2025-12-06 13:36   ` [syzbot] [ocfs2?] " syzbot
2025-12-06 15:19 ` Syzbot testing for ocfs2: Fix " Prithvi Tambewagh
2025-12-06 15:43   ` [syzbot] [ocfs2?] " syzbot
2025-12-10 18:40 ` Syzbot test for ocfs2: fix " Prithvi Tambewagh
2025-12-10 19:10   ` [syzbot] [ocfs2?] " syzbot
2025-12-14 18:34 ` Syzbot test for v3: ocfs2: fix " Prithvi Tambewagh
2025-12-14 18:59   ` [syzbot] [ocfs2?] " syzbot
2025-12-14 19:20 ` Syzbot test for v3: ocfs2: fix " Prithvi Tambewagh
2025-12-14 19:28   ` [syzbot] [ocfs2?] " syzbot
2025-12-15  4:44   ` Syzbot test for v3: ocfs2: fix " kernel test robot
2025-12-15  4:44   ` kernel test robot
2025-12-15 11:22   ` kernel test robot
2025-12-15 11:39   ` kernel test robot
2025-12-15  4:38 ` Syzbot test for ocfs2: Add validate function for slot map blocks Prithvi Tambewagh
2025-12-15  5:01   ` [syzbot] [ocfs2?] kernel BUG in ocfs2_write_block syzbot
2025-12-15 17:16 ` Syzbot test for v4: ocfs2: Add validate function for slot map blocks Prithvi Tambewagh
2025-12-15 18:22   ` [syzbot] [ocfs2?] kernel BUG in ocfs2_write_block 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=20251206123128.166117-1-activprithvi@gmail.com \
    --to=activprithvi@gmail.com \
    --cc=jlbec@evilplan.org \
    --cc=joseph.qi@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark@fasheh.com \
    --cc=ocfs2-devel@lists.linux.dev \
    --cc=syzbot+c818e5c4559444f88aa0@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