Skip to content

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 contai...

HighCVSS 7.8 EPSS 1.2%
Published
Updated
Exploit status
No public exploit known
Technology
UbuntuDebianRed Hat

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.

Upgrade path

22 packages: 18 fixed.

PackageAffectedFixed inStatus
alpine/cryptsetup(Alpine v3.11) < 2.2.2-r1 2.2.2-r1 Fixed
alpine/cryptsetup(Alpine v3.12) < 2.3.2-r1 2.3.2-r1 Fixed
alpine/cryptsetup(Alpine v3.13) < 2.3.4-r0 2.3.4-r0 Fixed
alpine/cryptsetup(Alpine v3.14) < 2.3.4-r0 2.3.4-r0 Fixed
alpine/cryptsetup(Alpine v3.15) < 2.3.4-r0 2.3.4-r0 Fixed
alpine/cryptsetup(Alpine v3.16) < 2.3.4-r0 2.3.4-r0 Fixed
alpine/cryptsetup(Alpine v3.17) < 2.3.4-r0 2.3.4-r0 Fixed
alpine/cryptsetup(Alpine v3.18) < 2.3.4-r0 2.3.4-r0 Fixed
alpine/cryptsetup(Alpine v3.19) < 2.3.4-r0 2.3.4-r0 Fixed
alpine/cryptsetup(Alpine v3.20) < 2.3.4-r0 2.3.4-r0 Fixed
alpine/cryptsetup(Alpine v3.21) < 2.3.4-r0 2.3.4-r0 Fixed
alpine/cryptsetup(Alpine v3.22) < 2.3.4-r0 2.3.4-r0 Fixed
alpine/cryptsetup(Alpine v3.23) < 2.3.4-r0 2.3.4-r0 Fixed
alpine/cryptsetup(Alpine v3.24) < 2.3.4-r0 2.3.4-r0 Fixed
debian/cryptsetup(Debian 12) < 2:2.3.4-1 2:2.3.4-1 Fixed
debian/cryptsetup(Debian 13) < 2:2.3.4-1 2:2.3.4-1 Fixed
debian/cryptsetup(Debian 14) < 2:2.3.4-1 2:2.3.4-1 Fixed
ubuntu/cryptsetup(Ubuntu 20.04) < 2:2.2.2-3ubuntu2.2; = 2:2.2.0-3ubuntu1; = 2:2.2.1-1ubuntu1; = 2:2.2.2-1ubuntu1 +3 more 2:2.2.2-3ubuntu2.2 Fixed
Canonical Ubuntu Linux = 20.04 No fix listed Versions listed
cryptsetup project cryptsetup = 2.2.0 No fix listed Versions listed
fedoraproject fedora = 31; = 33 No fix listed Versions listed
redhat enterprise linux = 8.0 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
debian/cryptsetup(Debian:12) < 2:2.3.4-1 2:2.3.4-1
debian/cryptsetup(Debian:13) < 2:2.3.4-1 2:2.3.4-1
debian/cryptsetup(Debian:14) < 2:2.3.4-1 2:2.3.4-1
cryptsetup project cryptsetup = 2.2.0 No fix listed
redhat enterprise linux = 8.0 No fix listed
Canonical Ubuntu Linux = 20.04 No fix listed
fedoraproject fedora = 31 No fix listed
fedoraproject fedora = 33 No fix listed
alpine/cryptsetup(Alpine:v3.11) < 2.2.2-r1 2.2.2-r1
alpine/cryptsetup(Alpine:v3.12) < 2.3.2-r1 2.3.2-r1
alpine/cryptsetup(Alpine:v3.13) < 2.3.4-r0 2.3.4-r0
alpine/cryptsetup(Alpine:v3.14) < 2.3.4-r0 2.3.4-r0
alpine/cryptsetup(Alpine:v3.15) < 2.3.4-r0 2.3.4-r0
alpine/cryptsetup(Alpine:v3.16) < 2.3.4-r0 2.3.4-r0
alpine/cryptsetup(Alpine:v3.17) < 2.3.4-r0 2.3.4-r0
alpine/cryptsetup(Alpine:v3.18) < 2.3.4-r0 2.3.4-r0
alpine/cryptsetup(Alpine:v3.19) < 2.3.4-r0 2.3.4-r0
alpine/cryptsetup(Alpine:v3.20) < 2.3.4-r0 2.3.4-r0
alpine/cryptsetup(Alpine:v3.21) < 2.3.4-r0 2.3.4-r0
alpine/cryptsetup(Alpine:v3.22) < 2.3.4-r0 2.3.4-r0
alpine/cryptsetup(Alpine:v3.23) < 2.3.4-r0 2.3.4-r0
alpine/cryptsetup(Alpine:v3.24) < 2.3.4-r0 2.3.4-r0
ubuntu/cryptsetup(Ubuntu:20.04) < 2:2.2.2-3ubuntu2.2 2:2.2.2-3ubuntu2.2
ubuntu/cryptsetup(Ubuntu:20.04) = 2:2.2.0-3ubuntu1 No fix listed
ubuntu/cryptsetup(Ubuntu:20.04) = 2:2.2.1-1ubuntu1 No fix listed
Show 4 more
ProductAffected versionsFixed in
ubuntu/cryptsetup(Ubuntu:20.04) = 2:2.2.2-1ubuntu1 No fix listed
ubuntu/cryptsetup(Ubuntu:20.04) = 2:2.2.2-2ubuntu1 No fix listed
ubuntu/cryptsetup(Ubuntu:20.04) = 2:2.2.2-3ubuntu1 No fix listed
ubuntu/cryptsetup(Ubuntu:20.04) = 2:2.2.2-3ubuntu2 No fix listed

References