From: Chao Yu <chao@kernel.org>
To: Gao Xiang <hsiangkao@linux.alibaba.com>, linux-erofs@lists.ozlabs.org
Cc: chao@kernel.org, LKML <linux-kernel@vger.kernel.org>,
syzbot+1a9af3ef3c84c5e14dcc@syzkaller.appspotmail.com
Subject: Re: [PATCH] erofs: avoid reading more for fragment maps
Date: Tue, 23 Sep 2025 10:21:05 +0800 [thread overview]
Message-ID: <338fd84f-80fd-4ec7-b87e-64e76015b8f4@kernel.org> (raw)
In-Reply-To: <20250916084851.1759111-1-hsiangkao@linux.alibaba.com>
On 9/16/25 16:48, Gao Xiang wrote:
> Since all real encoded extents (directly handled by the decompression
> subsystem) have a sane, limited maximum decoded length
> (Z_EROFS_PCLUSTER_MAX_DSIZE), and the read‑more policy is only applied
> if needed.
>
> However, it makes no sense to read more for non‑encoded maps, such as
> fragment extents, since such extents can be huge (up to i_size) and
> there is no benefit to reading more at this layer.
>
> For normal images, it does not really matter, but for crafted images
> generated by syzbot, excessively large fragment extents can cause
> read‑more to run for an overly long time.
>
> Reported-by: syzbot+1a9af3ef3c84c5e14dcc@syzkaller.appspotmail.com
> Closes: https://lore.kernel.org/r/68c8583d.050a0220.2ff435.03a3.GAE@google.com
> Fixes: b44686c8391b ("erofs: fix large fragment handling")
> Fixes: b15b2e307c3a ("erofs: support on-disk compressed fragments data")
> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
next prev parent reply other threads:[~2025-09-23 2:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-15 18:17 [syzbot] [erofs?] INFO: task hung in erofs_bread syzbot
2025-09-16 8:48 ` [PATCH] erofs: avoid reading more for fragment maps Gao Xiang
2025-09-23 2:21 ` Chao Yu [this message]
2025-09-16 9:01 ` [syzbot] [erofs?] INFO: task hung in erofs_bread Gao Xiang
2025-09-16 9:30 ` 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=338fd84f-80fd-4ec7-b87e-64e76015b8f4@kernel.org \
--to=chao@kernel.org \
--cc=hsiangkao@linux.alibaba.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+1a9af3ef3c84c5e14dcc@syzkaller.appspotmail.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