CVE Vulnerabilities

CVE-2018-10887

Unexpected Sign Extension

Published: Jul 10, 2018 | Modified: Nov 21, 2024
CVSS 3.x
8.1
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H
CVSS 2.x
5.8 MEDIUM
AV:N/AC:M/Au:N/C:P/I:N/A:P
RedHat/V2
RedHat/V3
Ubuntu
MEDIUM
root.io logo minimus.io logo echo.ai logo

A flaw was found in libgit2 before version 0.27.3. It has been discovered that an unexpected sign extension in git_delta_apply function in delta.c file may lead to an integer overflow which in turn leads to an out of bound read, allowing to read before the base object. An attacker may use this flaw to leak memory addresses or cause a Denial of Service.

Weakness

The product performs an operation on a number that causes it to be sign extended when it is transformed into a larger data type. When the original number is negative, this can produce unexpected values that lead to resultant weaknesses.

Affected Software

NameVendorStart VersionEnd Version
Libgit2Libgit2*0.27.3 (excluding)
Libgit2Ubuntuartful*
Libgit2Ubuntubionic*
Libgit2Ubuntuesm-apps/bionic*
Libgit2Ubuntuesm-apps/xenial*
Libgit2Ubuntuesm-infra-legacy/trusty*
Libgit2Ubuntutrusty*
Libgit2Ubuntutrusty/esm*
Libgit2Ubuntuupstream*
Libgit2Ubuntuxenial*

Potential Mitigations

References