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 products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| — | cryptsetup | cryptsetup-2.2.0 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | cryptsetup | 2:2.3.4-1 | — |
| Debian 13 | cryptsetup | 2:2.3.4-1 | — |
| Debian 12 | cryptsetup | 2:2.3.4-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | cryptsetup | 2:2.2.2-3ubuntu2.2 | USN-4493-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 8 | cryptsetup +5 | 2.3.3-2.el8 | RHSA-2020:4542 |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 8.2 EUS | cryptsetup +5 | 2.2.2-1.el8_2.1 | RHSA-2021:0258 |
| RHEL 8.1 EUS | cryptsetup +5 | 2.2.0-2.el8_1.1 | RHSA-2020:4900 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | cryptsetup | 2.4.1-1.1 | openSUSE-SU-2024:10704-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | cryptsetup | 2.3.4-r0 | — |
| Alpine v3.23 | cryptsetup | 2.3.4-r0 | — |
| Alpine v3.22 | cryptsetup | 2.3.4-r0 | — |
| Alpine v3.21 | cryptsetup | 2.3.4-r0 | — |
| Alpine v3.20 | cryptsetup | 2.3.4-r0 | — |
Show 9 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | cryptsetup | 2.3.4-r0 | — |
| Alpine v3.18 | cryptsetup | 2.3.4-r0 | — |
| Alpine v3.17 | cryptsetup | 2.3.4-r0 | — |
| Alpine v3.16 | cryptsetup | 2.3.4-r0 | — |
| Alpine v3.15 | cryptsetup | 2.3.4-r0 | — |
| Alpine v3.14 | cryptsetup | 2.3.4-r0 | — |
| Alpine v3.13 | cryptsetup | 2.3.4-r0 | — |
| Alpine v3.12 | cryptsetup | 2.3.2-r1 | — |
| Alpine v3.11 | cryptsetup | 2.2.2-r1 | — |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 8 | cryptsetup +5 | 2.3.3-2.el8 | ELSA-2020-4542 |
Advisories 7
- RHSA-2021:0258 Red Hat Security Advisory: cryptsetup security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2020:4900 Red Hat Security Advisory: cryptsetup security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2020:4542 Red Hat Security Advisory: cryptsetup security, bug fix, and enhancement update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- USN-4493-1 cryptsetup vulnerability Ubuntu Security Notices (USN) · Apr 22, 2026
- openSUSE-SU-2024:10704-1 cryptsetup-2.4.1-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- WID-SEC-2022-0193 Red Hat Enterprise Linux: Mehrere Schwachstellen BSI CERT-Bund (WID) · Sep 27, 2023
- ELSA-2020-4542 Moderate: cryptsetup security, bug fix, and enhancement update (Oracle Linux 8) Oracle Linux Security Advisories (ELSA) · Nov 10, 2020
References
- https://bugzilla.redhat.com/show_bug.cgi?id=1874712
- USN-4493-1 vendor-advisory
- FEDORA-2020-5ed5af6275 vendor-advisory
- FEDORA-2020-8c76e12e62 vendor-advisory