CVE-2020-14382
JSON

7.8high

A vulnerability was found in upstream release cryptsetup-2.2.0 where, there's a bug in LUKS2 format validation code, that is effectively in…

Severity
7.8high CVSS:3.1 by NVD
Exploit likelihood
1.16% (higher than 67% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
redhat

Description

A vulnerability was found in upstream release cryptsetup-2.2.0 where, there's a bug in LUKS2 format validation code, that is effectively invoked on every device/image presenting itself as LUKS2 container. The bug is in segments validation code in file 'lib/luks2/luks2_json_metadata.c' in function hdr_validate_segments(struct crypt_device *cd, json_object *hdr_jobj) where the code does not check for possible overflow on memory allocation used for intervals array (see statement "intervals = malloc(first_backup * sizeof(*intervals));"). Due to the bug, library can be *tricked* to expect such allocation was successful but for far less memory then originally expected. Later it may read data FROM image crafted by an attacker and actually write such data BEYOND allocated memory.

Affected

Product or packageVersionsReported by
cryptsetupcryptsetup-2.2.0CVE List
cryptsetup_project cryptsetup2.2.0NVD
redhat enterprise_linux8.0NVD
canonical ubuntu_linux20.04NVD
fedoraproject fedora31, 33NVD

All scores

NVD7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
NVD6.8medium CVSS:2.0AV:N/AC:M/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

A vulnerability was found in upstream release cryptsetup-2.2.0 where, there's a bug in LUKS2 format validation code, that is effectively invoked on every device/image presenting itself as LUKS2 container. The bug is in segments validation code in file 'lib/luks2/luks2_json_metadata.c' in function hdr_validate_segments(struct crypt_device *cd, json_object *hdr_jobj) where the code does not check for possible overflow on memory allocation used for intervals array (see statement "intervals = malloc(first_backup * sizeof(*intervals));"). Due to the bug, library can be *tricked* to expect such allocation was successful but for far less memory then originally expected. Later it may read data FROM image crafted by an attacker and actually write such data BEYOND allocated memory.

NVD (es)

Se encontró una vulnerabilidad en la versión previa cryptsetup-2.2.0 donde se presenta un error en el código de comprobación del formato LUKS2, que es invocado efectivamente en cada dispositivo e imagen que se presenta como contenedor de LUKS2. El bug está en el código de comprobación de segmentos en el archivo "lib/luks2/luks2_json_metadata.c" en la función hdr_validate_segments (struct crypt_device *cd, json_object *hdr_jobj) donde el código no comprueba un posible desbordamiento en la asignación de memoria usada para una matriz de intervalos (ver sentencia "intervals = malloc(first_backup * sizeof(*intervals));"). Debido al bug, la biblioteca puede ser *tricked* para esperar que dicha asignación haya sido realizada con éxito, pero para mucha menos memoria de la que se esperaba originalmente. Más tarde, puede leer datos DESDE una imagen creada por un atacante y escribir esos datos MÁS ALLÁ de la memoria asignada

References

Sources

SourceRecordLicence
CVE ListCVE-2020-14382 changed 2024-08-04CVE Terms of Use
NVDCVE-2020-14382 changed 2026-06-17Public domain