Skip to content
OpenAdvisories
High ALAS2-2022-1776 16 CVEs

Important: golang security update (Amazon Linux 2)

Published Apr 25, 2022 · Updated Aug 7, 2025

Summary

Package updates are available for Amazon Linux 2 that fix the following vulnerabilities: CVE-2022-24921: A stack overflow flaw was found in Golang's regexp module, which can crash the runtime if the application using regexp accepts very long or arbitrarily long regexps from untrusted sources that have sufficient nesting depths. To exploit this vulnerability, an attacker would need to send large regexps with deep nesting to the application. Triggering this flaw leads to a crash of the runtime, which causes a denial of service. CVE-2022-23806: Curve.IsOnCurve in crypto/elliptic in Go before 1.16.14 and 1.17.x before 1.17.7 can incorrectly return true in situations with a big.Int value that is not a valid field element. CVE-2022-23773: cmd/go in Go before 1.16.14 and 1.17.x before 1.17.7 can misinterpret branch names that falsely appear to be version tags. This can lead to incorrect access control if an actor is supposed to be able to create branches but not tags. CVE-2022-23772: Rat.SetString in math/big in Go before 1.16.14 and 1.17.x before 1.17.7 has an overflow that can lead to Uncontrolled Memory Consumption. CVE-2021-44717: There's a flaw in golang's syscall.ForkExec() interface. An attacker who manages to first cause a file descriptor exhaustion for the process, then cause syscall.ForkExec() to be called repeatedly, could compromise data integrity and/or confidentiality in a somewhat uncontrolled way in programs linked with and using syscall.ForkExec(). CVE-2021-44716: There's an uncontrolled resource consumption flaw in golang's net/http library in the canonicalHeader() function. An attacker who submits specially crafted requests to applications linked with net/http's http2 functionality could cause excessive resource consumption that could lead to a denial of service or otherwise impact to system performance and resources. CVE-2021-41772: A vulnerability was found in archive/zip of the Go standard library. Applications written in Go where Reader.Open (the API implementing io/fs.FS introduced in Go 1.16) can panic when parsing a crafted ZIP archive containing completely invalid names or an empty filename argument. CVE-2021-41771: An out of bounds read vulnerability was found in debug/macho of the Go standard library. When using the debug/macho standard library (stdlib) and malformed binaries are parsed using Open or OpenFat, it can cause golang to attempt to read outside of a slice (array) causing a panic when calling ImportedSymbols. An attacker can use this vulnerability to craft a file which causes an application using this library to crash resulting in a denial of service. CVE-2021-39293: A vulnerability was found in archive/zip of the Go standard library. Applications written in Go can panic or potentially exhaust system memory when parsing malformed ZIP files. An attacker capable of submitting a crafted ZIP file to a Go application using archive/zip to process that file could cause a denial of service via memory exhaustion or panic. This particular flaw is an incomplete fix for a previous flaw. CVE-2021-38297: A validation flaw was found in golang. When invoking functions from WASM modules built using GOARCH=wasm GOOS=js, passing very large arguments can cause portions of the module to be overwritten with data from the arguments. The highest threat from this vulnerability is to integrity. CVE-2021-36221: A race condition flaw was found in Go. The incoming requests body weren't closed after the handler panic and as a consequence this could lead to ReverseProxy crash. The highest threat from this vulnerability is to Availability. CVE-2021-33198: A flaw was found in Go, where it attempts to allocate excessive memory. This issue may cause panic or unrecoverable fatal error if passed inputs with very large exponents. The highest threat from this vulnerability is to system availability. CVE-2021-33197: A flaw was found in Go, acting as an unintended proxy or intermediary, where ReverseProxy forwards connection headers if the first one was empty. This flaw allows an attacker to drop arbitrary headers. The highest threat from this vulnerability is to integrity. CVE-2021-33195: A flaw was found in Go. The LookupCNAME, LookupSRV, LookupMX, LookupNS, and LookupAddr functions in the net package and methods on the Resolver type, may return arbitrary values retrieved from DNS, allowing injection of unexpected contents. The highest threat from this vulnerability is to integrity. CVE-2021-27919: archive/zip in Go 1.16.x before 1.16.1 allows attackers to cause a denial of service (panic) upon attempted use of the Reader.Open API for a ZIP archive in which ../ occurs at the beginning of any filename. CVE-2021-27918: An infinite loop vulnerability was found in golang. If an application defines a custom token parser initializing with `xml.NewTokenDecoder` it is possible for the parsing loop to never return. An attacker could potentially craft a malicious XML document which has an XML element with `EOF` within it, causing the parsing application to endlessly loop, resulting in a Denial of Service (DoS).

Fixed packages 8

ReleasePackageFixed in
Amazon Linux · 2 golang 0:1.16.15-1.amzn2.0.1
Amazon Linux · 2 golang-bin 0:1.16.15-1.amzn2.0.1
Amazon Linux · 2 golang-docs 0:1.16.15-1.amzn2.0.1
Amazon Linux · 2 golang-misc 0:1.16.15-1.amzn2.0.1
Amazon Linux · 2 golang-race 0:1.16.15-1.amzn2.0.1
Amazon Linux · 2 golang-shared 0:1.16.15-1.amzn2.0.1
Amazon Linux · 2 golang-src 0:1.16.15-1.amzn2.0.1
Amazon Linux · 2 golang-tests 0:1.16.15-1.amzn2.0.1

Vulnerabilities 16

  • High 7.5

    golang.org/x/net/http2 allows uncontrolled memory consumption

    net/http in Go before 1.16.12 and 1.17.x before 1.17.5 allows uncontrolled memory consumption in the header canonicalization cache via HTTP/2 requests.

  • Unscored —

    Infinite loop when decoding inputs in encoding/xml

    encoding/xml in Go before 1.15.9 and 1.16.x before 1.16.1 has an infinite loop if a custom TokenReader (for xml.NewTokenDecoder) returns EOF in the middle of an element. This can occur in the Decode, DecodeElement, or Skip method.

  • Unscored —

    Panic when opening archives in archive/zip

    archive/zip in Go 1.16.x before 1.16.1 allows attackers to cause a denial of service (panic) upon attempted use of the Reader.Open API for a ZIP archive in which ../ occurs at the beginning of any filename.

  • Unscored —

    Improper sanitization when resolving values from DNS in net

    Go before 1.15.13 and 1.16.x before 1.16.5 has functions for DNS lookups that do not validate replies from DNS servers, and thus a return value may contain an unsafe injection (e.g., XSS) that does not conform to the RFC1035 format.

  • Unscored —

    Attacker can drop certain headers in net/http/httputil

    In Go before 1.15.13 and 1.16.x before 1.16.5, some configurations of ReverseProxy (from net/http/httputil) result in a situation where an attacker is able to drop arbitrary headers.

  • Unscored —

    Panic on inputs with large exponents in math/big

    In Go before 1.15.13 and 1.16.x before 1.16.5, there can be a panic for a large exponent to the math/big.Rat SetString or UnmarshalText method.

  • Unscored —

    Panic in ReverseProxy in net/http/httputil

    Go before 1.15.15 and 1.16.x before 1.16.7 has a race condition that can lead to a net/http/httputil ReverseProxy panic upon an ErrAbortHandler abort.

  • Unscored —
    CVE-2021-38297 Public exploit EPSS 11%

    Buffer overflow in WASM modules in misc/wasm and cmd/link

    Go before 1.16.9 and 1.17.x before 1.17.2 has a Buffer Overflow via large arguments in a function invocation from a WASM module, when GOARCH=wasm GOOS=js is used.

  • Unscored —

    Panic due to crafted inputs in archive/zip

    In archive/zip in Go before 1.16.8 and 1.17.x before 1.17.1, a crafted archive header (falsely designating that many files are present) can cause a NewReader or OpenReader panic. NOTE: this issue exists because of an incomplete fix for CVE-2021-33196.

  • Unscored —

    Panic on invalid symbol tables in debug/macho

    ImportedSymbols in debug/macho (for Open or OpenFat) in Go before 1.16.10 and 1.17.x before 1.17.3 Accesses a Memory Location After the End of a Buffer, aka an out-of-bounds slice situation.

  • Unscored —

    Panic when opening certain archives in archive/zip

    Go before 1.16.10 and 1.17.x before 1.17.3 allows an archive/zip Reader.Open panic via a crafted ZIP archive containing an invalid name or an empty filename field.

  • Unscored —

    Misdirected I/O in syscall

    Go before 1.16.12 and 1.17.x before 1.17.5 on UNIX allows write operations to an unintended file or unintended network connection as a consequence of erroneous closing of file descriptor 0 after file-descriptor exhaustion.

  • Unscored —

    Uncontrolled memory consumption in math/big

    Rat.SetString in math/big in Go before 1.16.14 and 1.17.x before 1.17.7 has an overflow that can lead to Uncontrolled Memory Consumption.

  • Unscored —
    CVE-2022-23773 Public exploit

    Incorrect access control in the go command in cmd/go/internal/modfetch

    cmd/go in Go before 1.16.14 and 1.17.x before 1.17.7 can misinterpret branch names that falsely appear to be version tags. This can lead to incorrect access control if an actor is supposed to be able to create branches but not tags.

  • Unscored —

    Incorrect computation for some invalid field elements in crypto/elliptic

    Curve.IsOnCurve in crypto/elliptic in Go before 1.16.14 and 1.17.x before 1.17.7 can incorrectly return true in situations with a big.Int value that is not a valid field element.

  • Unscored —

    Stack exhaustion when compiling deeply nested expressions in regexp

    regexp.Compile in Go before 1.16.15 and 1.17.x before 1.17.8 allows stack exhaustion via a deeply nested expression.

References

  • web
    https://alas.aws.amazon.com/cve/html/CVE-2021-27918.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2021-27919.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2021-33195.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2021-33197.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2021-33198.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2021-36221.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2021-38297.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2021-39293.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2021-41771.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2021-41772.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2021-44716.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2021-44717.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2022-23772.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2022-23773.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2022-23806.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2022-24921.html