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 package | Versions | Reported by |
|---|---|---|
| cryptsetup | cryptsetup-2.2.0 | CVE List |
| cryptsetup_project cryptsetup | 2.2.0 | NVD |
| redhat enterprise_linux | 8.0 | NVD |
| canonical ubuntu_linux | 20.04 | NVD |
| fedoraproject fedora | 31, 33 | NVD |
All scores
| NVD | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | 6.8medium CVSS:2.0 | AV: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
| https://bugzilla.redhat.com/show_bug.cgi?id=1874712 | issue-tracking, patch, third-party-advisory | |
| https://usn.ubuntu.com/4493-1/ | third-party-advisory, vendor-advisory | |
| https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OJTQ4KSVCW2NMSU5WFVPOHY46WMNF4OB/ | vendor-advisory | |
| https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TD6YSD63LLRRC4WQ7DJLSXWNUCY6FWBM/ | vendor-advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2020-14382 changed 2024-08-04 | CVE Terms of Use |
| NVD | CVE-2020-14382 changed 2026-06-17 | Public domain |