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, bugtraq, EDB, Metasploit, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, Mageia, GitHub code/issues, web search, more)
ReferencesDLA-2752-1, DSA-4967-1
NVD severitymedium

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
squashfs-tools (PTS)stretch1:4.3-3+deb9u1vulnerable
stretch (security)1:4.3-3+deb9u2fixed
buster1:4.3-12vulnerable
buster (security)1:4.3-12+deb10u1fixed
bullseye1:4.4-2vulnerable
bullseye (security)1:4.4-2+deb11u1fixed
bookworm, sid1:4.5-3fixed

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