Lucene search

K
amazonAmazonALAS-2023-1848
HistorySep 27, 2023 - 10:15 p.m.

Important: golang

2023-09-2722:15:00
alas.aws.amazon.com
9

9.8 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

8.6 High

AI Score

Confidence

High

7.5 High

CVSS2

Access Vector

NETWORK

Access Complexity

LOW

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:L/Au:N/C:P/I:P/A:P

0.003 Low

EPSS

Percentile

68.7%

Issue Overview:

2024-01-03: CVE-2023-24537 was added to this advisory.

2024-01-03: CVE-2023-29400 was added to this advisory.

2024-01-03: CVE-2023-24538 was added to this advisory.

2024-01-03: CVE-2022-41722 was added to this advisory.

2024-01-03: CVE-2022-41717 was added to this advisory.

2024-01-03: CVE-2023-24540 was added to this advisory.

2024-01-03: CVE-2022-41724 was added to this advisory.

2024-01-03: CVE-2023-24532 was added to this advisory.

2024-01-03: CVE-2023-39319 was added to this advisory.

2024-01-03: CVE-2022-41725 was added to this advisory.

2024-01-03: CVE-2023-29404 was added to this advisory.

2024-01-03: CVE-2023-29405 was added to this advisory.

An attacker can cause excessive memory growth in a Go server accepting HTTP/2 requests. HTTP/2 server connections contain a cache of HTTP header keys sent by the client. While the total number of entries in this cache is capped, an attacker sending very large keys can cause the server to allocate approximately 64 MiB per open connection. (CVE-2022-41717)

The Go project has described this issue as follows:

“On Windows, the filepath.Clean function could transform an invalid path such as a/…/c:/b into the valid path c:\b. This transformation of a relative (if invalid) path into an absolute path could enable a directory traversal attack. The filepath.Clean function will now transform this path into the relative (but still invalid) path .\c:\b.” (CVE-2022-41722)

Large handshake records may cause panics in crypto/tls. Both clients and servers may send large TLS handshake records which cause servers and clients, respectively, to panic when attempting to construct responses. This affects all TLS 1.3 clients, TLS 1.2 clients which explicitly enable session resumption (by setting Config.ClientSessionCache to a non-nil value), and TLS 1.3 servers which request client certificates (by setting Config.ClientAuth >= RequestClientCert). (CVE-2022-41724)

Golang: net/http, mime/multipart: denial of service from excessive resource consumption (https://groups.google.com/g/golang-announce/c/V0aBFqaFs_E) (CVE-2022-41725)

The ScalarMult and ScalarBaseMult methods of the P256 Curve may return an incorrect result if called with some specific unreduced scalars (a scalar larger than the order of the curve). This does not impact usages of crypto/ecdsa or crypto/ecdh. (CVE-2023-24532)

Calling any of the Parse functions on Go source code which contains //line directives with very large line numbers can cause an infinite loop due to integer overflow. (CVE-2023-24537)

Templates did not properly consider backticks (`) as Javascript string delimiters, and as such did
not escape them as expected. Backticks are used, since ES6, for JS template literals. If a template
contained a Go template action within a Javascript template literal, the contents of the action could
be used to terminate the literal, injecting arbitrary Javascript code into the Go template. (CVE-2023-24538)

html/template: improper handling of JavaScript whitespace.

Not all valid JavaScript whitespace characters were considered to be whitespace. Templates containing whitespace characters outside of the character set “\t\n\f\r\u0020\u2028\u2029” in JavaScript contexts that also contain actions may not be properly sanitized during execution. (CVE-2023-24540)

html/template: improper handling of empty HTML attributes.

Templates containing actions in unquoted HTML attributes (e.g. “attr={{.}}”) executed with empty input could result in output that would have unexpected results when parsed due to HTML normalization rules. This may allow injection of arbitrary attributes into tags. (CVE-2023-29400)

On Unix platforms, the Go runtime does not behave differently when a binary is run with the setuid/setgid bits. This can be dangerous in certain cases, such as when dumping memory state, or assuming the status of standard i/o file descriptors. If a setuid/setgid binary is executed with standard I/O file descriptors closed, opening any files can result in unexpected content being read or written with elevated privileges. Similarly, if a setuid/setgid program is terminated, either via panic or signal, it may leak the contents of its registers. (CVE-2023-29403)

The go command may execute arbitrary code at build time when using cgo. This may occur when running “go get” on a malicious module, or when running any other command which builds untrusted code. This is can by triggered by linker flags, specified via a “#cgo LDFLAGS” directive. The arguments for a number of flags which are non-optional are incorrectly considered optional, allowing disallowed flags to be smuggled through the LDFLAGS sanitization. This affects usage of both the gc and gccgo compilers. (CVE-2023-29404)

The go command may execute arbitrary code at build time when using cgo. This may occur when running “go get” on a malicious module, or when running any other command which builds untrusted code. This is can by triggered by linker flags, specified via a “#cgo LDFLAGS” directive. Flags containing embedded spaces are mishandled, allowing disallowed flags to be smuggled through the LDFLAGS sanitization by including them in the argument of another flag. This only affects usage of the gccgo compiler. (CVE-2023-29405)

The HTTP/1 client does not fully validate the contents of the Host header. A maliciously crafted Host header can inject additional headers or entire requests. With fix, the HTTP/1 client now refuses to send requests containing an invalid Request.Host or Request.URL.Host value. (CVE-2023-29406)

Extremely large RSA keys in certificate chains can cause a client/server to expend significant CPU time verifying signatures. With fix, the size of RSA keys transmitted during handshakes is restricted to <= 8192 bits. Based on a survey of publicly trusted RSA keys, there are currently only three certificates in circulation with keys larger than this, and all three appear to be test certificates that are not actively deployed. It is possible there are larger keys in use in private PKIs, but we target the web PKI, so causing breakage here in the interests of increasing the default safety of users of crypto/tls seems reasonable. (CVE-2023-29409)

The html/template package does not apply the proper rules for handling occurrences of “<script”, “<!–”, and “</script” within JS literals in <script> contexts. This may cause the template parser to improperly consider script contexts to be terminated early, causing actions to be improperly escaped. This could be leveraged to perform an XSS attack. (CVE-2023-39319)

Affected Packages:

golang

Issue Correction:
Run yum update golang to update your system.

New Packages:

i686:  
    golang-1.20.8-1.47.amzn1.i686  
    golang-shared-1.20.8-1.47.amzn1.i686  
    golang-bin-1.20.8-1.47.amzn1.i686  
  
noarch:  
    golang-misc-1.20.8-1.47.amzn1.noarch  
    golang-tests-1.20.8-1.47.amzn1.noarch  
    golang-docs-1.20.8-1.47.amzn1.noarch  
    golang-src-1.20.8-1.47.amzn1.noarch  
  
src:  
    golang-1.20.8-1.47.amzn1.src  
  
x86_64:  
    golang-shared-1.20.8-1.47.amzn1.x86_64  
    golang-bin-1.20.8-1.47.amzn1.x86_64  
    golang-1.20.8-1.47.amzn1.x86_64  

Additional References

Red Hat: CVE-2022-41717, CVE-2022-41722, CVE-2022-41724, CVE-2022-41725, CVE-2023-24532, CVE-2023-24537, CVE-2023-24538, CVE-2023-24540, CVE-2023-29400, CVE-2023-29403, CVE-2023-29404, CVE-2023-29405, CVE-2023-29406, CVE-2023-29409, CVE-2023-39319

Mitre: CVE-2022-41717, CVE-2022-41722, CVE-2022-41724, CVE-2022-41725, CVE-2023-24532, CVE-2023-24537, CVE-2023-24538, CVE-2023-24540, CVE-2023-29400, CVE-2023-29403, CVE-2023-29404, CVE-2023-29405, CVE-2023-29406, CVE-2023-29409, CVE-2023-39319

9.8 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

8.6 High

AI Score

Confidence

High

7.5 High

CVSS2

Access Vector

NETWORK

Access Complexity

LOW

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:L/Au:N/C:P/I:P/A:P

0.003 Low

EPSS

Percentile

68.7%