Vulnerability · Published Nov 22, 2022 · Assigned by mitre
CVE-2022-36227
Critical 9.8
In plain English
A critical-severity security flaw in the bsdtar package (AlmaLinux). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.5% (higher than 84% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In libarchive before 3.6.2, the software does not check for an error after calling calloc function that can return with a NULL pointer if the function fails, which leads to a resultant NULL pointer dereference. NOTE: the discoverer cites this CWE-476 remark but third parties dispute the code-execution impact: "In rare circumstances, when NULL is equivalent to the 0x0 memory address and privileged code can access it, then writing or reading memory is possible, which may lead to code execution."
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | bsdtar | 3.3.3-5.el8 | ALSA-2023:3018 |
| AlmaLinux:9 | bsdtar | 3.5.3-4.el9 | ALSA-2023:2532 |
| AlmaLinux:8 | libarchive | 3.3.3-5.el8 | ALSA-2023:3018 |
| AlmaLinux:9 | libarchive | 3.5.3-4.el9 | ALSA-2023:2532 |
| AlmaLinux:8 | libarchive-devel | 3.3.3-5.el8 | ALSA-2023:3018 |
| AlmaLinux:9 | libarchive-devel | 3.5.3-4.el9 | ALSA-2023:2532 |
| Alpine:v3.20 | libarchive | 3.6.1-r2 | ALPINE-CVE-2022-36227 |
| Alpine:v3.21 | libarchive | 3.6.1-r2 | ALPINE-CVE-2022-36227 |
| Alpine:v3.22 | libarchive | 3.6.1-r2 | ALPINE-CVE-2022-36227 |
| Alpine:v3.23 | libarchive | 3.6.1-r2 | ALPINE-CVE-2022-36227 |
| Alpine:v3.24 | libarchive | 3.6.1-r2 | ALPINE-CVE-2022-36227 |
| Debian:12 | libarchive | 3.6.2-1 | DEBIAN-CVE-2022-36227 |
| Debian:13 | libarchive | 3.6.2-1 | DEBIAN-CVE-2022-36227 |
| Debian:14 | libarchive | 3.6.2-1 | DEBIAN-CVE-2022-36227 |
| Rocky Linux:8 | libarchive | 0:3.3.3-5.el8 | RLSA-2023:3018 |
| Ubuntu:22.04:LTS | libarchive | 3.6.0-1ubuntu1.2 | UBUNTU-CVE-2022-36227 |
| Ubuntu:22.04:LTS | libarchive | 3.6.0-1ubuntu1.2 | USN-7070-1 |
| Ubuntu:24.04:LTS | libarchive | 3.7.2-2ubuntu0.2 | USN-7070-1 |
Affected products (as reported)
References
- https://github.com/libarchive/libarchive/issues/1754
- https://bugs.gentoo.org/882521
- https://github.com/libarchive/libarchive/blob/v3.0.0a/libarchive/archive_write.c#L215
- FEDORA-2022-e15be0091f vendor-advisory
- [debian-lts-announce] 20230130 [SECURITY] [DLA 3294-1] libarchive security update mailing-list
- GLSA-202309-14 vendor-advisory
- https://lists.debian.org/debian-lts-announce/2024/11/msg00007.html