Amazon Linux 2 : golang (ALAS-2022-1887)

high Nessus Plugin ID 168446

Synopsis

The remote Amazon Linux 2 host is missing a security update.

Description

The version of golang installed on the remote host is prior to 1.18.8-1. It is, therefore, affected by multiple vulnerabilities as referenced in the ALAS2-2022-1887 advisory.

- 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. (CVE-2022-2879)

- Programs which compile regular expressions from untrusted sources may be vulnerable to memory exhaustion or denial of service. The parsed regexp representation is linear in the size of the input, but in some cases the constant factor can be as high as 40,000, making relatively small regexps consume much larger amounts of memory. After fix, each regexp being parsed is limited to a 256 MB memory footprint. Regular expressions whose representation would use more space than that are rejected. Normal use of regular expressions is unaffected. (CVE-2022-41715)

- Due to unsanitized NUL values, attackers may be able to maliciously set environment variables on Windows.
In syscall.StartProcess and os/exec.Cmd, invalid environment variable values containing NUL values are not properly checked for. A malicious environment variable value can exploit this behavior to set a value for a different environment variable. For example, the environment variable string A=B\x00C=D sets the variables A=B and C=D. (CVE-2022-41716)

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

Run 'yum update golang' to update your system.

See Also

https://alas.aws.amazon.com/AL2/ALAS-2022-1887.html

https://alas.aws.amazon.com/cve/html/CVE-2022-2879.html

https://alas.aws.amazon.com/cve/html/CVE-2022-41715.html

https://alas.aws.amazon.com/cve/html/CVE-2022-41716.html

Plugin Details

Severity: High

ID: 168446

File Name: al2_ALAS-2022-1887.nasl

Version: 1.3

Type: local

Agent: unix

Published: 12/7/2022

Updated: 12/15/2022

Supported Sensors: Agentless Assessment, Continuous Assessment, Frictionless Assessment Agent, Frictionless Assessment AWS, Nessus Agent, Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 4.4

CVSS v2

Risk Factor: High

Base Score: 7.8

Temporal Score: 5.8

Vector: CVSS2#AV:N/AC:L/Au:N/C:N/I:C/A:N

CVSS Score Source: CVE-2022-41716

CVSS v3

Risk Factor: High

Base Score: 7.5

Temporal Score: 6.5

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

Temporal Vector: CVSS:3.0/E:U/RL:O/RC:C

Vulnerability Information

CPE: p-cpe:/a:amazon:linux:golang-bin, p-cpe:/a:amazon:linux:golang-src, p-cpe:/a:amazon:linux:golang-race, cpe:/o:amazon:linux:2, p-cpe:/a:amazon:linux:golang-tests, p-cpe:/a:amazon:linux:golang, p-cpe:/a:amazon:linux:golang-shared, p-cpe:/a:amazon:linux:golang-docs, p-cpe:/a:amazon:linux:golang-misc

Required KB Items: Host/local_checks_enabled, Host/AmazonLinux/release, Host/AmazonLinux/rpm-list

Exploit Ease: No known exploits are available

Patch Publication Date: 12/1/2022

Vulnerability Publication Date: 10/4/2022

Reference Information

CVE: CVE-2022-2879, CVE-2022-41715, CVE-2022-41716

IAVB: 2022-B-0042-S, 2022-B-0046-S