Re: [PATCH] erofs: fix interlaced ztailpacking pclusters

Chao Yu <[email protected]>
Newsgroups org.ozlabs.lists.linux-erofs,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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 <[email protected]>
> Closes: https://lore.kernel.org/r/[email protected]
> Fixes: fdffc091e6f9 ("erofs: support interlaced uncompressed data for compressed files")
> Signed-off-by: Gao Xiang <[email protected]>

Reviewed-by: Chao Yu <[email protected]>

Thanks,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.