Description
Libarchive 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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | libarchive | No fix yet | — |
| Debian 13 | libarchive | No fix yet | — |
| Debian 12 | libarchive | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 22.04 LTS | libarchive | No fix yet | — |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 20.04 LTS | libarchive | No fix yet | — |
| Ubuntu Pro 18.04 LTS | libarchive | No fix yet | — |
| Ubuntu Pro 16.04 LTS | libarchive | No fix yet | — |
| Ubuntu Pro 14.04 LTS | libarchive | No fix yet | — |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | libarchive | 3.7.7-r2 | — |
Advisories 1
- WID-SEC-2023-1314 libarchive: Schwachstelle ermöglicht Manipulation von Dateien BSI CERT-Bund (WID) · May 29, 2023