Buffer overflow in Cryptsetup Project
CVE-2020-14382
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.
Vulnerability class: Buffer Overflow
EPSS: 0.012 (63.8th percentile) — read the EPSS interpretation.
CVSS v3 metric
CVSS v3 base score 7.8 (High). Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H.
Affected products
- Cryptsetup_project Cryptsetup — versions 2.2.0
- Canonical Ubuntu_linux — versions 20.04
- Fedoraproject Fedora — versions 31, 33
- Redhat Enterprise_linux — versions 8.0
- N/a Cryptsetup — versions cryptsetup-2.2.0
Weakness classification (CWE)
References
- secalert@redhat.com (Patch, Third Party Advisory, x_refsource_MISC, Issue Tracking)
- secalert@redhat.com (x_refsource_UBUNTU, vendor-advisory, Third Party Advisory)
- secalert@redhat.com (x_refsource_FEDORA, vendor-advisory)
- secalert@redhat.com (x_refsource_FEDORA, vendor-advisory)
Frequently asked questions
- What is CVE-2020-14382?
- CVE-2020-14382 is a high-severity vulnerability in Cryptsetup Project, classified under Out-of-bounds Write. CVSS score: 7.8/10. Published 2020-09-16.
- How severe is CVE-2020-14382?
- High severity. CVSS v3 base score is 7.8 out of 10.