CVE-2022-2879 Unbounded memory consumption when reading headers in archive/tar
HighCVSS 7.5
EPSS 2.0%
- Published
- Updated
- Exploit status
- No public exploit known
Description
Reader.Read does not set a limit on the maximum size of file headers. A maliciously crafted archive could cause Read to allocate unbounded amounts of memory, potentially causing resource exhaustion or panics. After fix, Reader.Read limits the maximum size of header blocks to 1 MiB.
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| stdlib(Go) | < 1.18.7 | 1.18.7 |
| stdlib(Go) | >= 1.19.0-0, < 1.19.2 | 1.19.2 |
| debian/golang-1.19(Debian:12) | < 1.19.2-1 | 1.19.2-1 |
| archive/tar(Go) | < 1.18.7 | 1.18.7 |
| archive/tar(Go) | >= 1.19.0-0, < 1.19.2 | 1.19.2 |
| ubuntu/golang-1.13(Ubuntu:22.04) | < 1.13.8-1ubuntu2.22.04.2 | 1.13.8-1ubuntu2.22.04.2 |
| ubuntu/golang-1.17(Ubuntu:22.04) | All versions | No fix listed |
| ubuntu/golang-1.18(Ubuntu:22.04) | < 1.18.1-1ubuntu1.1 | 1.18.1-1ubuntu1.1 |
| golang go | < 1.18.7 | 1.18.7 |
| golang go | >= 1.19.0, < 1.19.2 | 1.19.2 |
| alpine/go(Alpine:v3.16) | < 1.18.7-r0 | 1.18.7-r0 |
| alpine/go(Alpine:v3.17) | >= 1.19.0, < 1.19.2-r0 | 1.19.2-r0 |
| alpine/go(Alpine:v3.18) | >= 1.19.0, < 1.19.2-r0 | 1.19.2-r0 |
| alpine/go(Alpine:v3.19) | >= 1.19.0, < 1.19.2-r0 | 1.19.2-r0 |
| alpine/go(Alpine:v3.20) | >= 1.19.0, < 1.19.2-r0 | 1.19.2-r0 |
| alpine/go(Alpine:v3.21) | >= 1.19.0, < 1.19.2-r0 | 1.19.2-r0 |
| alpine/go(Alpine:v3.22) | >= 1.19.0, < 1.19.2-r0 | 1.19.2-r0 |
| alpine/go(Alpine:v3.23) | >= 1.19.0, < 1.19.2-r0 | 1.19.2-r0 |
| alpine/go(Alpine:v3.24) | >= 1.19.0, < 1.19.2-r0 | 1.19.2-r0 |
References
- go.dev issue-tracking third-party-advisory
- go.dev patch
- groups.google.com mailing-list release-notes
- Debian Security Tracker CVE-2022-2879 vendor-advisory
- pkg.go.dev vendor-advisory
- security.gentoo.org
- Ubuntu CVE tracker vendor-advisory
- USN-6038-1 vendor-advisory
- USN-6038-2 vendor-advisory
- www.cve.org
- security.alpinelinux.org vendor-advisory