linux-yocto/fs/erofs
Gao Xiang f9e69b33fd erofs: avoid reading more for fragment maps
[ Upstream commit 334c0e493c ]

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-and-tested-by: syzbot+1a9af3ef3c84c5e14dcc@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/r/68c8583d.050a0220.2ff435.03a3.GAE@google.com
Fixes: b44686c839 ("erofs: fix large fragment handling")
Fixes: b15b2e307c ("erofs: support on-disk compressed fragments data")
Reviewed-by: Hongbo Li <lihongbo22@huawei.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-10-15 12:03:16 +02:00
..
compress.h erofs: support DEFLATE decompression by using Intel QAT 2025-05-25 15:27:40 +08:00
data.c vfs-6.17-rc1.mmap_prepare 2025-07-28 13:43:25 -07:00
decompressor_crypto.c erofs: support DEFLATE decompression by using Intel QAT 2025-05-25 15:27:40 +08:00
decompressor_deflate.c erofs: support DEFLATE decompression by using Intel QAT 2025-05-25 15:27:40 +08:00
decompressor_lzma.c erofs: move {in,out}pages into struct z_erofs_decompress_req 2025-03-17 01:22:50 +08:00
decompressor_zstd.c erofs: move {in,out}pages into struct z_erofs_decompress_req 2025-03-17 01:22:50 +08:00
decompressor.c erofs: implement metadata compression 2025-07-24 19:43:31 +08:00
dir.c erofs: support to readahead dirent blocks in erofs_readdir() 2025-07-24 19:44:08 +08:00
erofs_fs.h erofs: fix long xattr name prefix placement 2025-09-12 03:37:07 +08:00
fileio.c erofs: implement metadata compression 2025-07-24 19:43:31 +08:00
fscache.c erofs: implement metadata compression 2025-07-24 19:43:31 +08:00
inode.c erofs: implement metadata compression 2025-07-24 19:43:31 +08:00
internal.h erofs: fix long xattr name prefix placement 2025-09-12 03:37:07 +08:00
Kconfig erofs: Do not select tristate symbols from bool symbols 2025-08-11 06:02:20 +08:00
Makefile erofs: support DEFLATE decompression by using Intel QAT 2025-05-25 15:27:40 +08:00
namei.c erofs: get rid of erofs_kmap_type 2025-03-17 01:21:24 +08:00
super.c erofs: fix runtime warning on truncate_folio_batch_exceptionals() 2025-09-10 14:11:06 +08:00
sysfs.c erofs: support to readahead dirent blocks in erofs_readdir() 2025-07-24 19:44:08 +08:00
xattr.c erofs: fix long xattr name prefix placement 2025-09-12 03:37:07 +08:00
xattr.h erofs: remove ENOATTR definition 2025-07-24 19:42:07 +08:00
zdata.c erofs: avoid reading more for fragment maps 2025-10-15 12:03:16 +02:00
zmap.c erofs: fix invalid algorithm for encoded extents 2025-08-28 11:51:07 +08:00
zutil.c The various patchsets are summarized below. Plus of course many 2025-01-26 18:36:23 -08:00