linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lizhi Xu <lizhi.xu@windriver.com>
To: <syzbot+96ee12698391289383dd@syzkaller.appspotmail.com>
Cc: <jack@suse.com>, <jlbec@evilplan.org>,
	<joseph.qi@linux.alibaba.com>, <linux-ext4@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <mark@fasheh.com>,
	<ocfs2-devel@lists.linux.dev>, <syzkaller-bugs@googlegroups.com>,
	<tytso@mit.edu>
Subject: Re: [ext4?] [ocfs2?] WARNING in jbd2_journal_update_sb_log_tail
Date: Mon, 30 Sep 2024 17:00:09 +0800	[thread overview]
Message-ID: <20240930090009.174420-1-lizhi.xu@windriver.com> (raw)
In-Reply-To: <66f98a80.050a0220.6bad9.0021.GAE@google.com>

The s_sequence value of journal superblock loaded from disk is 4294967295,
is it too large?

#syz test

diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 97f487c3d8fc..563c4af533ac 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -1397,6 +1397,12 @@ static int journal_check_superblock(journal_t *journal)
 		}
 	}
 
+	if (sb->s_sequence == U32_MAX) {
+		pr_err("JBD2: Load a too big s_sequence: %u, %s\n", 
+			sb->s_sequence, __func__);
+		return err;
+	}
+
 	return 0;
 }
 

  reply	other threads:[~2024-09-30  9:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-29 17:12 [syzbot] [ext4?] [ocfs2?] WARNING in jbd2_journal_update_sb_log_tail syzbot
2024-09-30  9:00 ` Lizhi Xu [this message]
2024-09-30  9:21   ` syzbot
2024-10-09 12:32 ` 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=20240930090009.174420-1-lizhi.xu@windriver.com \
    --to=lizhi.xu@windriver.com \
    --cc=jack@suse.com \
    --cc=jlbec@evilplan.org \
    --cc=joseph.qi@linux.alibaba.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark@fasheh.com \
    --cc=ocfs2-devel@lists.linux.dev \
    --cc=syzbot+96ee12698391289383dd@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tytso@mit.edu \
    /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;
as well as URLs for NNTP newsgroup(s).