FreeBSD : curl -- multiple vulnerabilities (e0ab1773-07c1-46c6-9170-4c5e81c00927)

critical Nessus Plugin ID 118707

Language:

Synopsis

The remote FreeBSD host is missing a security-related update.

Description

curl security problems :

CVE-2018-16839: SASL password overflow via integer overflow

libcurl contains a buffer overrun in the SASL authentication code.

The internal function Curl_auth_create_plain_message fails to correctly verify that the passed in lengths for name and password aren't too long, then calculates a buffer size to allocate.

On systems with a 32 bit size_t, the math to calculate the buffer size triggers an integer overflow when the user name length exceeds 2GB (2^31 bytes). This integer overflow usually causes a very small buffer to actually get allocated instead of the intended very huge one, making the use of that buffer end up in a heap buffer overflow.

This bug is very similar to CVE-2017-14618.

It affects curl 7.33.0 to 7.61.1.

CVE-2018-16840: use-after-free in handle close

libcurl contains a heap use-after-free flaw in code related to closing an easy handle.

When closing and cleaning up an 'easy' handle in the Curl_close() function, the library code first frees a struct (without nulling the pointer) and might then subsequently erroneously write to a struct field within that already freed struct.

It affects curl 7.59.0 to 7.61.1.

CVE-2018-16842: warning message out-of-buffer read

curl contains a heap out of buffer read vulnerability.

The command line tool has a generic function for displaying warning and informational messages to stderr for various situations. For example if an unknown command line argument is used, or passed to it in a 'config' file.

This display function formats the output to wrap at 80 columns. The wrap logic is however flawed, so if a single word in the message is itself longer than 80 bytes the buffer arithmetic calculates the remainder wrong and will end up reading behind the end of the buffer.
This could lead to information disclosure or crash.

This vulnerability could lead to a security issue if used in this or similar situations :

1. a server somewhere uses the curl command line to run something

2. if it fails, it shows stderr to the user

3. the server takes user input for parts of its command line input

4. user provides something overly long that triggers this crash

5. the stderr output may now contain user memory contents that wasn't meant to be available

It affects curl 7.14.1 to 7.61.1.

Solution

Update the affected package.

See Also

https://curl.haxx.se/docs/security.html

https://curl.haxx.se/docs/CVE-2018-16839.html

https://curl.haxx.se/docs/CVE-2018-16840.html

https://curl.haxx.se/docs/CVE-2018-16842.html

http://www.nessus.org/u?79d7317b

Plugin Details

Severity: Critical

ID: 118707

File Name: freebsd_pkg_e0ab177307c146c691704c5e81c00927.nasl

Version: 1.4

Type: local

Published: 11/2/2018

Updated: 1/31/2022

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 5.9

CVSS v2

Risk Factor: High

Base Score: 7.5

Temporal Score: 5.5

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

CVSS Score Source: CVE-2018-16840

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Temporal Score: 8.5

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

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

Vulnerability Information

CPE: p-cpe:/a:freebsd:freebsd:curl, cpe:/o:freebsd:freebsd

Required KB Items: Host/local_checks_enabled, Host/FreeBSD/release, Host/FreeBSD/pkg_info

Exploit Ease: No known exploits are available

Patch Publication Date: 11/1/2018

Vulnerability Publication Date: 10/31/2018

Reference Information

CVE: CVE-2018-16839, CVE-2018-16840, CVE-2018-16842