Bug 1189936 (CVE-2021-40153) - VUL-0: CVE-2021-40153: squashfs: unvalidated filepaths allow writing outside of destination
Summary: VUL-0: CVE-2021-40153: squashfs: unvalidated filepaths allow writing outside ...
Status: RESOLVED FIXED
Alias: CVE-2021-40153
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Torsten Duwe
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/308509/
Whiteboard: CVSSv3.1:SUSE:CVE-2021-40153:6.6:(AV:...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-30 12:48 UTC by Gianluca Gabrielli
Modified: 2024-07-12 16:31 UTC (History)
6 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gianluca Gabrielli 2021-08-30 12:48:46 UTC
squashfs_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.

Reference:
https://github.com/plougher/squashfs-tools/issues/72

Upstream patch:
https://github.com/plougher/squashfs-tools/commit/79b5a555058eef4e1e7ff220c344d39f8cd09646

References:
https://bugzilla.redhat.com/show_bug.cgi?id=1998621
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-40153
https://github.com/plougher/squashfs-tools/issues/72
https://github.com/plougher/squashfs-tools/commit/79b5a555058eef4e1e7ff220c344d39f8cd09646
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-40153
http://www.cvedetails.com/cve/CVE-2021-40153/
https://bugs.launchpad.net/ubuntu/+source/squashfs-tools/+bug/1941790
Comment 1 Gianluca Gabrielli 2021-08-30 12:49:45 UTC
Affected packages:
 - SUSE:Carwos:1/squashfs          4.3
 - SUSE:SLE-11-SP2:Update/squashfs 4.0
 - SUSE:SLE-12-SP2:Update/squashfs 4.3
 - SUSE:SLE-15-SP3:Update/squashfs 4.4
 - SUSE:SLE-15:Update/squashfs     4.3
 - openSUSE:Factory/squashfs       4.4

Upstream patch [0].

[0] https://github.com/plougher/squashfs-tools/commit/79b5a555058eef4e1e7ff220c344d39f8cd09646
Comment 18 Maintenance Automation 2023-11-13 16:30:14 UTC
SUSE-SU-2023:4424-1: An update that solves four vulnerabilities and has one security fix can now be installed.

Category: security (important)
Bug References: 1133284, 1160294, 1189936, 1190531, 935380
CVE References: CVE-2015-4645, CVE-2015-4646, CVE-2021-40153, CVE-2021-41072
Sources used:
SUSE Linux Enterprise High Performance Computing 12 SP5 (src): squashfs-4.6.1-8.3.2
SUSE Linux Enterprise Server 12 SP5 (src): squashfs-4.6.1-8.3.2
SUSE Linux Enterprise Server for SAP Applications 12 SP5 (src): squashfs-4.6.1-8.3.2

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 19 Maintenance Automation 2023-11-27 16:30:01 UTC
SUSE-SU-2023:4591-1: An update that solves four vulnerabilities can now be installed.

Category: security (important)
Bug References: 1189936, 1190531, 935380
CVE References: CVE-2015-4645, CVE-2015-4646, CVE-2021-40153, CVE-2021-41072
Sources used:
openSUSE Leap 15.4 (src): squashfs-4.6.1-150300.3.3.1
openSUSE Leap 15.5 (src): squashfs-4.6.1-150300.3.3.1
SUSE Linux Enterprise Micro for Rancher 5.3 (src): squashfs-4.6.1-150300.3.3.1
SUSE Linux Enterprise Micro 5.3 (src): squashfs-4.6.1-150300.3.3.1
SUSE Linux Enterprise Micro for Rancher 5.4 (src): squashfs-4.6.1-150300.3.3.1
SUSE Linux Enterprise Micro 5.4 (src): squashfs-4.6.1-150300.3.3.1
SUSE Linux Enterprise Micro 5.5 (src): squashfs-4.6.1-150300.3.3.1
Basesystem Module 15-SP4 (src): squashfs-4.6.1-150300.3.3.1
Basesystem Module 15-SP5 (src): squashfs-4.6.1-150300.3.3.1
SUSE Linux Enterprise High Performance Computing ESPOS 15 SP3 (src): squashfs-4.6.1-150300.3.3.1
SUSE Linux Enterprise High Performance Computing LTSS 15 SP3 (src): squashfs-4.6.1-150300.3.3.1
SUSE Linux Enterprise Server 15 SP3 LTSS 15-SP3 (src): squashfs-4.6.1-150300.3.3.1
SUSE Linux Enterprise Server for SAP Applications 15 SP3 (src): squashfs-4.6.1-150300.3.3.1
SUSE Manager Proxy 4.2 (src): squashfs-4.6.1-150300.3.3.1
SUSE Manager Retail Branch Server 4.2 (src): squashfs-4.6.1-150300.3.3.1
SUSE Manager Server 4.2 (src): squashfs-4.6.1-150300.3.3.1
SUSE Enterprise Storage 7.1 (src): squashfs-4.6.1-150300.3.3.1
SUSE Linux Enterprise Micro 5.1 (src): squashfs-4.6.1-150300.3.3.1
SUSE Linux Enterprise Micro 5.2 (src): squashfs-4.6.1-150300.3.3.1
SUSE Linux Enterprise Micro for Rancher 5.2 (src): squashfs-4.6.1-150300.3.3.1
openSUSE Leap 15.3 (src): squashfs-4.6.1-150300.3.3.1
openSUSE Leap Micro 5.3 (src): squashfs-4.6.1-150300.3.3.1
openSUSE Leap Micro 5.4 (src): squashfs-4.6.1-150300.3.3.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 20 Maintenance Automation 2024-07-12 16:31:39 UTC
SUSE-SU-2024:2463-1: An update that solves four vulnerabilities can now be installed.

Category: security (important)
Bug References: 1189936, 1190531, 935380
CVE References: CVE-2015-4645, CVE-2015-4646, CVE-2021-40153, CVE-2021-41072
Maintenance Incident: [SUSE:Maintenance:31321](https://smelt.suse.de/incident/31321/)
Sources used:
SUSE Linux Enterprise Micro 5.5 (src):
 squashfs-4.6.1-150300.3.3.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.