CVE Vulnerabilities

CVE-2020-6096

Signed to Unsigned Conversion Error

Published: Apr 01, 2020 | Modified: Nov 07, 2023
CVSS 3.x
8.1
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
6.8 MEDIUM
AV:N/AC:M/Au:N/C:P/I:P/A:P
RedHat/V2
RedHat/V3
8.1 MODERATE
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Ubuntu
LOW

An exploitable signed comparison vulnerability exists in the ARMv7 memcpy() implementation of GNU glibc 2.30.9000. Calling memcpy() (on ARMv7 targets that utilize the GNU glibc implementation) with a negative value for the num parameter results in a signed comparison vulnerability. If an attacker underflows the num parameter to memcpy(), this vulnerability could lead to undefined behavior such as writing to out-of-bounds memory and potentially remote code execution. Furthermore, this memcpy() implementation allows for program execution to continue in scenarios where a segmentation fault or crash should have occurred. The dangers occur in that subsequent execution and iterations of this code will be executed with this corrupted data.

Weakness

The product uses a signed primitive and performs a cast to an unsigned primitive, which can produce an unexpected value if the value of the signed primitive can not be represented using an unsigned primitive.

Affected Software

Name Vendor Start Version End Version
Glibc Gnu * 2.31 (including)
Eglibc Ubuntu esm-infra-legacy/trusty *
Eglibc Ubuntu precise/esm *
Eglibc Ubuntu trusty *
Eglibc Ubuntu trusty/esm *
Glibc Ubuntu bionic *
Glibc Ubuntu devel *
Glibc Ubuntu eoan *
Glibc Ubuntu focal *
Glibc Ubuntu groovy *
Glibc Ubuntu hirsute *
Glibc Ubuntu impish *
Glibc Ubuntu jammy *
Glibc Ubuntu kinetic *
Glibc Ubuntu lunar *
Glibc Ubuntu mantic *
Glibc Ubuntu noble *
Glibc Ubuntu oracular *
Glibc Ubuntu trusty *
Glibc Ubuntu upstream *
Glibc Ubuntu xenial *

Extended Description

It is dangerous to rely on implicit casts between signed and unsigned numbers because the result can take on an unexpected value and violate assumptions made by the program. Often, functions will return negative values to indicate a failure. When the result of a function is to be used as a size parameter, using these negative return values can have unexpected results. For example, if negative size values are passed to the standard memory copy or allocation functions they will be implicitly cast to a large unsigned value. This may lead to an exploitable buffer overflow or underflow condition.

References