Changes since last update:
- Validate xattr h_shared_count to report -EFSCORRUPTED explicitly
for crafted images
- Verify metadata accesses for file-backed mounts via rw_verify_area()
- Fix FS_IOC_GETFSLABEL to include the trailing NUL byte, consistent
with ext4 and xfs
- Properly handle 48-bit on-disk blocks/uniaddr for extra devices
- Fix an index underflow in the LZ4 in-place decompression that can
cause out-of-bounds accesses with crafted images
- Minor fixes and cleanups
erofs: error out obviously illegal extents in advance
Detect some corrupted extent cases during metadata parsing rather
than letting them result in harmless decompression failures later:
- For full-reference compressed extents, the compressed size must
not exceed the decompressed size, which is a strict on-disk
layout constraint;
- For plain (shifted/interlaced) extents, the decoded size must
not exceed the encoded size, even accounting for partial decoding.
Both ways work but it should be better to report illegal extents as
metadata layout violations rather than deferring as decompression
failure.
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
2 files changed