Amazon Linux 2 : curl (ALAS-2023-2230)

high Nessus Plugin ID 181157

Synopsis

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

Description

The version of curl installed on the remote host is prior to 8.2.1-1. It is, therefore, affected by multiple vulnerabilities as referenced in the ALAS2-2023-2230 advisory.

Integer overflow vulnerability in tool_operate.c in curl 7.65.2 via crafted value as the retry delay.
(CVE-2020-19909)

libcurl offers a feature to verify an SSH server's public key using a SHA 256 hash. When this check fails, libcurl would free the memory for the fingerprint before it returns an error message containing the (now freed) hash.

This flaw risks inserting sensitive heap-based data into the error message that might be shown to users or otherwise get leaked and revealed. (CVE-2023-28319)

curl supports matching of wildcard patterns when listed as Subject Alternative Name in TLS server certificates. curl can be built to use its own name matching function for TLS rather than one provided by a TLS library. This private wildcard matching function would match IDN (International Domain Name) hosts incorrectly and could as a result accept patterns that otherwise should mismatch.

IDN hostnames are converted to puny code before used for certificate checks. Puny coded names always start with xn-- and should not be allowed to pattern match, but the wildcard check in curl could still check for x*, which would match even though the IDN name most likely contained nothing even resembling an x.
(CVE-2023-28321)

When doing HTTP(S) transfers, libcurl might erroneously use the read callback (CURLOPT_READFUNCTION) to ask for data to send, even when the CURLOPT_POSTFIELDS option has been set, if the same handle previously was used to issue a PUT request which used that callback.

This flaw may surprise the application and cause it to misbehave and either send off the wrong data or use memory after free or similar in the second transfer.

The problem exists in the logic for a reused handle when it is (expected to be) changed from a PUT to a POST. (CVE-2023-28322)

Tenable has extracted the preceding description block directly from the tested product security advisory.

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 curl' to update your system.

See Also

https://alas.aws.amazon.com/AL2/ALAS-2023-2230.html

https://alas.aws.amazon.com/cve/html/CVE-2020-19909.html

https://alas.aws.amazon.com/cve/html/CVE-2023-28319.html

https://alas.aws.amazon.com/cve/html/CVE-2023-28321.html

https://alas.aws.amazon.com/cve/html/CVE-2023-28322.html

https://alas.aws.amazon.com/faqs.html

Plugin Details

Severity: High

ID: 181157

File Name: al2_ALAS-2023-2230.nasl

Version: 1.2

Type: local

Agent: unix

Published: 9/8/2023

Updated: 12/11/2024

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: 6.1

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

CVSS Score Source: CVE-2023-28319

CVSS v3

Risk Factor: High

Base Score: 7.5

Temporal Score: 6.7

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

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

Vulnerability Information

CPE: p-cpe:/a:amazon:linux:libcurl, p-cpe:/a:amazon:linux:libcurl-devel, p-cpe:/a:amazon:linux:curl-debuginfo, cpe:/o:amazon:linux:2, p-cpe:/a:amazon:linux:curl

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

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 8/31/2023

Vulnerability Publication Date: 5/18/2023

Reference Information

CVE: CVE-2020-19909, CVE-2023-28319, CVE-2023-28321, CVE-2023-28322

IAVA: 2023-A-0259-S