Path traversal in squashfs-tools - CVE-2021-40153

 

Path traversal in squashfs-tools - CVE-2021-40153

Published: September 5, 2021 / Updated: March 18, 2022


Vulnerability identifier: #VU56306
CSH Severity: Medium
CVSS v4: 8.6 [CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N]
CVE-ID: CVE-2021-40153
CWE-ID: CWE-22
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote user to compromise the affected system.

The vulnerability exists due to input validation error when processing directory traversal sequences within the squashfs_opendir in unsquash-1.c. A remote user can store the filename in the directory entry, which later is used by unsquashfs to create the new file during the unsquash. As a result, it is possible to write files to locations outside of the destination.


Affected software

squashfs-tools
Gentoo Linux
SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Server for SAP Applications 15
SUSE Linux Enterprise High Performance Computing LTSS 15
SUSE Linux Enterprise High Performance Computing ESPOS 15
SUSE Linux Enterprise High Performance Computing 15
SUSE Linux Enterprise Real Time 15
SUSE Linux Enterprise Desktop 15
SUSE Linux Enterprise Server for SAP Applications 12
SUSE Linux Enterprise Server 12
SUSE Linux Enterprise High Performance Computing 12
SUSE Manager Server
SUSE Manager Retail Branch Server
SUSE Manager Proxy
SUSE Linux Enterprise Micro
SUSE Linux Enterprise Micro for Rancher
openSUSE Leap Micro
SUSE Enterprise Storage
Red Hat Enterprise Linux for ARM 64
Anolis OS
Red Hat Enterprise Linux for x86_64
Red Hat Enterprise Linux for IBM z Systems
Red Hat Enterprise Linux for Power, little endian
SUSE Linux Enterprise Server 15 SP3 LTSS
Basesystem Module
openSUSE Leap
Ubuntu
openEuler
Fedora
squashfs-tools (Debian package)
squashfs-tools (Ubuntu package)
squashfs-tools
squashfs-tools (Red Hat package)
squashfs-tools-debuginfo
squashfs-tools-debugsource
squashfs-tools-doc
squashfs-debugsource
squashfs-debuginfo
squashfs
Juniper Secure Analytics (JSA)
Red Hat OpenShift Container Platform

How to mitigate CVE-2021-40153

Install update from vendor's website.

squashfs-tools - update to 4.5.1
squashfs-tools (Debian package) - addressed in versions 1:4.3-12+deb10u1, 1:4.4-2+deb11u1
Juniper Secure Analytics (JSA) - update to 7.5.0 UP9 IF02
squashfs-tools (Ubuntu package) - addressed in versions 1:4.3-6ubuntu0.18.04.3, 1:4.4-1ubuntu0.1, 1:4.4-2ubuntu0.1, 1:4.33ubuntu2.16.04.3+esm1
squashfs-tools - addressed in versions 4.3-20.0.3, 4.6.1-1
squashfs-tools (Red Hat package) - addressed in versions 4.3-21.el8, 4.4-10.git1.el9
squashfs-tools - update to 4.4-5
squashfs-tools-debuginfo - update to 4.4-5
squashfs-tools-debugsource - update to 4.4-5
squashfs-tools - addressed in versions 4.5-2.fc33, 4.5-2.fc34, 4.5-3.20210913gite048580.fc33
squashfs-tools-doc - update to 4.6.1-1
squashfs-debugsource - addressed in versions 4.6.1-8.3.2, 4.6.1-150300.3.3.1
squashfs-debuginfo - addressed in versions 4.6.1-8.3.2, 4.6.1-150300.3.3.1
squashfs - addressed in versions 4.6.1-8.3.2, 4.6.1-150300.3.3.1
Red Hat OpenShift Container Platform - addressed in versions 4.16.15, 4.17.0

External References

Related Security Bulletins