UBUNTU-CVE-2020-14382

Source
https://ubuntu.com/security/CVE-2020-14382
Import Source
https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2020/UBUNTU-CVE-2020-14382.json
JSON Data
https://api.osv.dev/v1/vulns/UBUNTU-CVE-2020-14382
Related
Published
2020-09-03T00:00:00Z
Modified
2025-01-13T10:22:13Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
Details

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/luks2jsonmetadata.c' in function hdrvalidatesegments(struct cryptdevice *cd, jsonobject 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.

References

Affected packages

Ubuntu:20.04:LTS / cryptsetup

Package

Name
cryptsetup
Purl
pkg:deb/ubuntu/cryptsetup@2:2.2.2-3ubuntu2.2?arch=source&distro=focal

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2:2.2.2-3ubuntu2.2

Affected versions

2:2.*

2:2.2.0-3ubuntu1
2:2.2.1-1ubuntu1
2:2.2.2-1ubuntu1
2:2.2.2-2ubuntu1
2:2.2.2-3ubuntu1
2:2.2.2-3ubuntu2

Ecosystem specific

{
    "availability": "No subscription required",
    "ubuntu_priority": "medium",
    "binaries": [
        {
            "binary_version": "2:2.2.2-3ubuntu2.2",
            "binary_name": "cryptsetup"
        },
        {
            "binary_version": "2:2.2.2-3ubuntu2.2",
            "binary_name": "cryptsetup-bin"
        },
        {
            "binary_version": "2:2.2.2-3ubuntu2.2",
            "binary_name": "cryptsetup-bin-dbgsym"
        },
        {
            "binary_version": "2:2.2.2-3ubuntu2.2",
            "binary_name": "cryptsetup-dbgsym"
        },
        {
            "binary_version": "2:2.2.2-3ubuntu2.2",
            "binary_name": "cryptsetup-initramfs"
        },
        {
            "binary_version": "2:2.2.2-3ubuntu2.2",
            "binary_name": "cryptsetup-run"
        },
        {
            "binary_version": "2:2.2.2-3ubuntu2.2",
            "binary_name": "cryptsetup-udeb"
        },
        {
            "binary_version": "2:2.2.2-3ubuntu2.2",
            "binary_name": "libcryptsetup-dev"
        },
        {
            "binary_version": "2:2.2.2-3ubuntu2.2",
            "binary_name": "libcryptsetup12"
        },
        {
            "binary_version": "2:2.2.2-3ubuntu2.2",
            "binary_name": "libcryptsetup12-dbgsym"
        },
        {
            "binary_version": "2:2.2.2-3ubuntu2.2",
            "binary_name": "libcryptsetup12-udeb"
        }
    ]
}