CVE-2021-40153

NameCVE-2021-40153
Descriptionsquashfs_opendir in unsquash-1.c in Squashfs-Tools 4.5 stores the filename in the directory entry; this is then used by unsquashfs to create the new file during the unsquash. The filename is not validated for traversal outside of the destination directory, and thus allows writing to locations outside of the destination.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDLA-2752-1, DSA-4967-1

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
squashfs-tools (PTS)buster, buster (security)1:4.3-12+deb10u2fixed
bullseye (security), bullseye1:4.4-2+deb11u2fixed
bookworm1:4.5.1-1fixed
sid, trixie1:4.6.1-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
squashfs-toolssourceexperimental1:4.5-1
squashfs-toolssourcestretch1:4.3-3+deb9u2DLA-2752-1
squashfs-toolssourcebuster1:4.3-12+deb10u1DSA-4967-1
squashfs-toolssourcebullseye1:4.4-2+deb11u1DSA-4967-1
squashfs-toolssource(unstable)1:4.5-2

Notes

https://bugs.launchpad.net/ubuntu/+source/squashfs-tools/+bug/1941790
https://github.com/plougher/squashfs-tools/commit/79b5a555058eef4e1e7ff220c344d39f8cd09646 (4.5)
https://github.com/plougher/squashfs-tools/issues/72

Search for package or bug name: Reporting problems