CVE-2021-4122 – cryptsetup: disable encryption via header rewrite
https://notcve.org/view.php?id=CVE-2021-4122
It was found that a specially crafted LUKS header could trick cryptsetup into disabling encryption during the recovery of the device. An attacker with physical access to the medium, such as a flash disk, could use this flaw to force a user into permanently disabling the encryption layer of that medium. Se ha detectado que un encabezado LUKS especialmente diseñada podía engañar a cryptsetup para que deshabilitara el cifrado durante la recuperación del dispositivo. Un atacante con acceso físico al medio, como un disco flash, podría usar este fallo para forzar a un usuario a deshabilitar permanentemente la capa de cifrado de ese medio. • https://access.redhat.com/security/cve/CVE-2021-4122 https://bugzilla.redhat.com/show_bug.cgi?id=2031859 https://bugzilla.redhat.com/show_bug.cgi?id=2032401 https://gitlab.com/cryptsetup/cryptsetup/-/commit/0113ac2d889c5322659ad0596d4cfc6da53e356c https://mirrors.edge.kernel.org/pub/linux/utils/cryptsetup/v2.4/v2.4.3-ReleaseNotes • CWE-345: Insufficient Verification of Data Authenticity CWE-349: Acceptance of Extraneous Untrusted Data With Trusted Data •
CVE-2020-14382 – cryptsetup: Out-of-bounds write when validating segments
https://notcve.org/view.php?id=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. Se encontró una vulnerabilidad en la versión previa cryptsetup-2.2.0 donde se presenta un error en el código de comprobación del formato LUKS2, que es invocado efectivamente en cada dispositivo e imagen que se presenta como contenedor de LUKS2. • https://bugzilla.redhat.com/show_bug.cgi?id=1874712 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OJTQ4KSVCW2NMSU5WFVPOHY46WMNF4OB https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TD6YSD63LLRRC4WQ7DJLSXWNUCY6FWBM https://usn.ubuntu.com/4493-1 https://access.redhat.com/security/cve/CVE-2020-14382 • CWE-787: Out-of-bounds Write •