Re: [PATCH] erofs: fix interlaced ztailpacking pclusters
From: Chao Yu
Date: Mon Aug 17 2026 - 04:07:19 EST
On 8/14/26 14:59, Gao Xiang wrote:
On-disk sizes of interlaced pclusters should be block-aligned, and
ztailpacking interlaced pclusters should be invalid at all.
Currently, mkfs.erofs won't generate any interlaced pcluster with
ztailpacking enabled, so this doesn't affect any existing valid
filesystems.
However, crafted images can contain invalid interlaced ztailpacking
pclusters, resulting in an out-of-bounds read from a kmap'd page and
copying irrelevant kernel memory into userspace-visible page cache.
Nitpick, if this can only happen in a fuzz case, we can add unlikely for
!(map->m_flags & EROFS_MAP_META)?
Reported-by: Haiyang Huang <huanghaiyang83@xxxxxxxxx>
Closes: https://lore.kernel.org/r/20260806065253.1083865-1-huanghaiyang83@xxxxxxxxx
Fixes: fdffc091e6f9 ("erofs: support interlaced uncompressed data for compressed files")
Signed-off-by: Gao Xiang <xiang@xxxxxxxxxx>
Reviewed-by: Chao Yu <chao@xxxxxxxxxx>
Thanks,