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

From: Aibing Chen

Date: Tue Nov 17 2026 - 21:18:05 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/

The three squashfs_dir_space() checks in squashfs_lookup() jump to
read_failure, which does not set err, so ERR_PTR() gets the positive byte
count returned by the last successful squashfs_read_metadata() call and
the VFS treats it as a valid dentry. The patch makes those checks jump to
data_error (err = -EIO), which is what the neighbouring content validation
checks already do.

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

https://lore.kernel.org/all/6af937c0.094600b6.347106.0007.GAE@xxxxxxxxxx/

Thanks,
Aibing Chen