mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+9d20c3ad7d29227de28d@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [mm?] [gfs2?] WARNING in read_rindex_entry
Date: Thu, 20 Aug 2026 09:24:45 +0800	[thread overview]
Message-ID: <tencent_E2E152CB064D8984AEC8EED40C81A7DFC606@qq.com> (raw)
In-Reply-To: <6a863306.ae6ddae5.3da009.0013.GAE@google.com>

#syz test

diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 5988a165a830..945657bf5006 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -899,6 +899,7 @@ static int read_rindex_entry(struct gfs2_inode *ip)
 	struct gfs2_rindex buf;
 	int error;
 	struct gfs2_rgrpd *rgd;
+	size_t size;
 
 	if (pos >= i_size_read(&ip->i_inode))
 		return 1;
@@ -917,6 +918,13 @@ static int read_rindex_entry(struct gfs2_inode *ip)
 	rgd->rd_sbd = sdp;
 	rgd->rd_addr = be64_to_cpu(buf.ri_addr);
 	rgd->rd_length = be32_to_cpu(buf.ri_length);
+
+	size = rgd->rd_length * sizeof(struct gfs2_bitmap);
+	if (get_order(size) > MAX_PAGE_ORDER) {
+		error = -EFBIG;
+		goto fail;
+	}
+
 	rgd->rd_data0 = be64_to_cpu(buf.ri_data0);
 	rgd->rd_data = be32_to_cpu(buf.ri_data);
 	rgd->rd_bitbytes = be32_to_cpu(buf.ri_bitbytes);


  parent reply	other threads:[~2026-08-20  1:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19 22:49 syzbot
2026-08-20  0:14 ` Andrew Morton
2026-08-20  1:35   ` Zi Yan
2026-08-20  1:24 ` Edward Adam Davis [this message]
2026-08-20  4:20   ` syzbot
2026-08-20  4:21 ` [PATCH] gfs2: valid the length of rgrp header Edward Adam Davis
2026-08-21 12:54   ` Andreas Gruenbacher
2026-08-21 11:37 ` Forwarded: Re: [syzbot] [mm?] [gfs2?] WARNING in read_rindex_entry syzbot
     [not found] <CAHc6FU7sKEY2QhGu3Ajo_+ChrE=255+3ykZBasf2RxUg0FYvZA@mail.gmail.com>
2026-08-21 12:41 ` 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=tencent_E2E152CB064D8984AEC8EED40C81A7DFC606@qq.com \
    --to=eadavis@qq.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+9d20c3ad7d29227de28d@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®