Out-of-bounds write in cryptsetup
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and Red Hat. Impact type from CWE-787 and the CVSS impact.
Summary
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | cryptsetup | cryptsetup-2.2.0 | — | No fix listed | CNA |
- cryptsetup Vendor— Affected cryptsetup-2.2.0 Fixed in — No fix listed CNA
CPE configurations NVD · 5
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:cryptsetup_project:cryptsetup:2.2.0:-:*:*:*:*:*:* | 2.2.0 | Vulnerable | Cryptsetup Project |
| cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:* | 8.0 | Vulnerable | Red Hat |
| cpe:2.3:o:canonical:ubuntu_linux:20.04:*:*:*:lts:*:*:* | 20.04 | Vulnerable | Canonical |
| cpe:2.3:o:fedoraproject:fedora:31:*:*:*:*:*:*:* | 31 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* | 33 | Vulnerable | Fedoraproject |
- cpe:2.3:a:cryptsetup_project:cryptsetup:2.2.0:-:*:*:*:*:*:* Versions 2.2.0 Vulnerable ·Cryptsetup Project
- cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:* Versions 8.0 Vulnerable ·Red Hat
- cpe:2.3:o:canonical:ubuntu_linux:20.04:*:*:*:lts:*:*:* Versions 20.04 Vulnerable ·Canonical
- cpe:2.3:o:fedoraproject:fedora:31:*:*:*:*:*:*:* Versions 31 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* Versions 33 Vulnerable ·Fedoraproject
Remediation
Red Hat 3 advisories
- RHSA-2021:0258 Released 2021-01-26 · Red Hat rating Moderatecryptsetup security update
- Red Hat Enterprise Linux AppStream EUS (v. 8.2) cryptsetup-devel-2.2.2-1.el8_2.1
- Red Hat Enterprise Linux BaseOS EUS (v. 8.2) cryptsetup-2.2.2-1.el8_2.1, cryptsetup-libs-2.2.2-1.el8_2.1, cryptsetup-reencrypt-2.2.2-1.el8_2.1 +2
- RHSA-2020:4900 Released 2020-11-04 · Red Hat rating Moderatecryptsetup security update
- Red Hat Enterprise Linux AppStream EUS (v. 8.1) cryptsetup-devel-2.2.0-2.el8_1.1
- Red Hat Enterprise Linux BaseOS EUS (v. 8.1) cryptsetup-2.2.0-2.el8_1.1, cryptsetup-libs-2.2.0-2.el8_1.1, cryptsetup-reencrypt-2.2.0-2.el8_1.1 +2
- RHSA-2020:4542 Released 2020-11-04 · Red Hat rating Moderatecryptsetup security, bug fix, and enhancement update
- Red Hat Enterprise Linux AppStream (v. 8) cryptsetup-devel-2.3.3-2.el8
- Red Hat Enterprise Linux BaseOS (v. 8) cryptsetup-2.3.3-2.el8, cryptsetup-libs-2.3.3-2.el8, cryptsetup-reencrypt-2.3.3-2.el8 +2
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux AppStream (v. 8) | Fixed | RHSA-2020:4542 |
| Red Hat Enterprise Linux AppStream EUS (v. 8.1) | Fixed | RHSA-2020:4900 |
| Red Hat Enterprise Linux AppStream EUS (v. 8.2) | Fixed | RHSA-2021:0258 |
| Red Hat Enterprise Linux BaseOS (v. 8) | Fixed | RHSA-2020:4542 |
| Red Hat Enterprise Linux BaseOS EUS (v. 8.1) | Fixed | RHSA-2020:4900 |
| Red Hat Enterprise Linux BaseOS EUS (v. 8.2) | Fixed | RHSA-2021:0258 |
Not affected: 1 product
- Red Hat Enterprise Linux 7
Timeline
- 2026-10-02 Threatist record created from CVE-2020-14382
- 2026-10-03 Alias added: GHSA-v8mw-xqhr-2vqp
References
Sources
- CVE-2020-14382 · CVE Program
- CVE-2020-14382 · NVD
- FIRST EPSS
- GHSA-v8mw-xqhr-2vqp · GitHub Advisory Database · CC BY 4.0
- CVE-2020-14382 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences