GO-2022-1037

Source
https://pkg.go.dev/vuln/GO-2022-1037
Import Source
https://vuln.go.dev/ID/GO-2022-1037.json
JSON Data
https://api.osv.dev/v1/vulns/GO-2022-1037
Aliases
Published
2022-10-06T16:26:05Z
Modified
2024-05-20T16:03:47Z
Summary
Unbounded memory consumption when reading headers in archive/tar
Details

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.

References
Credits
    • Adam Korczynski (ADA Logics)
    • OSS-Fuzz

Affected packages

Go / stdlib

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.18.7
Introduced
1.19.0-0
Fixed
1.19.2

Ecosystem specific

{
    "imports": [
        {
            "path": "archive/tar",
            "symbols": [
                "Reader.Next",
                "Reader.next",
                "Writer.WriteHeader",
                "Writer.writePAXHeader",
                "parsePAX"
            ]
        }
    ]
}