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.
ProviderTypeBase ScoreAtk. VectorAtk. ComplexityPriv. RequiredVector
NISTNIST
7.8 HIGH
LOCAL
LOW
NONE
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
redhatCNA
---
---
CVEADP
---
---
Base Score
CVSS 3.x
EPSS Score
Percentile: 53%
VendorProductVersion
cryptsetup_projectcryptsetup
2.2.0
redhatenterprise_linux
8.0
canonicalubuntu_linux
20.04
𝑥
= Vulnerable software versions
Debian logo
Debian Releases
Debian Product
Codename
cryptsetup
bullseye (security)
2:2.3.7-1+deb11u1
fixed
bullseye
2:2.3.7-1+deb11u1
fixed
buster
not-affected
stretch
not-affected
bookworm
2:2.6.1-4~deb12u2
fixed
sid
2:2.7.5-1
fixed
trixie
2:2.7.5-1
fixed
Ubuntu logo
Ubuntu Releases
Ubuntu Product
Codename
cryptsetup
focal
Fixed 2:2.2.2-3ubuntu2.2
released
bionic
not-affected
xenial
not-affected
trusty
not-affected