Squashfs: check block offset is not negative
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ f400e12656ab518be107febfe2315fb1eab5a342 · < d0a3729d464fcf516416a41cf304c0c92126ee03| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
Squashfs: check block offset is not negative
If a negative offset is read off disk (for example the offset into the decompressed fragment block), this will cause squashfs_copy_data() to perform an out of bounds access.
Fix by checking if offset is negative, and returning 0. This matches existing behaviour where an offset beyond the block returns 0 bytes copied.
To trigger this out of bounds access requires a crafted Squashfs filesystem and CAP_SYS_ADMIN to mount it. Unprivileged users will not be able to mount such a filesystem, but once mounted, an unprivileged user can trigger the out of bounds access by reading the crafted file with the negative offset.
From the CVE record · Linux
A negative offset in a crafted Squashfs filesystem can cause an out-of-bounds access when a file is read. Mounting the crafted filesystem requires CAP_SYS_ADMIN, but after it is mounted, an unprivileged user can trigger the access by reading the crafted file.
Anyone running a Linux kernel with Squashfs support should check their kernel against the vendor advisory; affected versions were not specified.