Re: [syzbot] [squashfs?] general protection fault in lookup_one_qstr_excl

From: Aibing Chen

Date: Tue Nov 17 2026 - 21:18:14 EST


The same bug is already fixed by the patch below, which is in review
together with the change that introduced the checks it repairs:

squashfs: return -EIO on out-of-bounds directory entry in lookup
https://lore.kernel.org/all/20261114145128.625-2-chenaibing@xxxxxxxxxxxxxxxxxxxx/

squashfs_lookup() leaves the error variable holding the positive byte count
returned by squashfs_read_metadata(), and jumps straight to read_failure
when a squashfs_dir_space() boundary check fails. ERR_PTR() then hands the
VFS a small positive value that IS_ERR() does not catch, and the first
dentry flag access crashes. The patch routes those checks through
data_error so err is -EIO.

The report below describes the same defect through a different caller:

https://lore.kernel.org/all/6afa2ac9.920b2b3a.148c65.003f.GAE@xxxxxxxxxx/

Thanks,
Aibing Chen