LZO corruption reported on intact files
xloem opened this issue · 3 comments
xloem commented
import dissect.squashfs
import io, requests
file = io.BytesIO(requests.get('https://api.snapcraft.io/api/v1/snaps/download/XKEcBqPM06H1Z7zGOdG5fbICuf8NWK5R_2465.snap').content)
squashfs = dissect.squashfs.SquashFS(file)
inode = squashfs.get('/usr/share/groff/1.22.4/font/devlatin1/DESC')
print(inode.open().read())
File "/home/user/.local/lib/python3.10/site-packages/dissect/squashfs/squashfs.py", line 434, in _read
start_block, data = self.fs._read_block(start_block, run_block_size)
File "/home/user/.local/lib/python3.10/site-packages/dissect/squashfs/squashfs.py", line 158, in _read_block
return block + length, self._compression.decompress(data, self.block_size)
File "/home/user/.local/lib/python3.10/site-packages/dissect/squashfs/compression.py", line 67, in decompress
return self._module.decompress(data, False, expected)
lzo.error: Compressed data violation -6
Schamper commented
Thanks for reporting this and apologies for the delayed reply - I was on holiday. Skimming the linked issue over at PySquashfsImage, I gather that this might be related to a combination of holes and LZO?
Unfortunately I'll be gone for a couple of weeks again soon. I'll try to look into this before I leave but it might get pushed to after I return.