CVE-2023-30571

NameCVE-2023-30571
DescriptionLibarchive through 3.6.2 can cause directories to have world-writable permissions. The umask() call inside archive_write_disk_posix.c changes the umask of the whole process for a very short period of time; a race condition with another thread can lead to a permanent umask 0 setting. Such a race condition could lead to implicit directory creation with permissions 0777 (without the sticky bit), which means that any low-privileged local user can delete and rename files inside those directories.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
Debian Bugs1037093

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
libarchive (PTS)jessie, jessie (lts)3.1.2-11+deb8u11vulnerable
stretch (security)3.2.2-2+deb9u3vulnerable
stretch (lts), stretch3.2.2-2+deb9u4vulnerable
buster (security), buster, buster (lts)3.3.3-4+deb10u3vulnerable
bullseye3.4.3-2+deb11u1vulnerable
bookworm (security), bookworm3.6.2-1+deb12u1vulnerable
trixie3.7.4-1vulnerable
sid3.7.4-1.1vulnerable

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

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
libarchivesource(unstable)(unfixed)unimportant1037093

Notes

https://github.com/libarchive/libarchive/issues/1876
libarchive does not officially support multi-threaded use archive_read_disk
and archive_write_disk API functions. Upstream aims to clarify the documentation:
https://github.com/libarchive/libarchive/issues/1876#issuecomment-1627767567
We'll use the first version to include the documentation update as fixed version
[stretch] - libarchive <no-dsa> (Minor issue)
[jessie] - libarchive <no-dsa> (Minor issue)

Search for package or bug name: Reporting problems