Bug 1726542 (CVE-2019-13179)

Summary: CVE-2019-13179 calamares: incorrect permission leads to disclosure of decryption keys for LUKS container
Product: [Other] Security Response Reporter: Dhananjay Arunesh <darunesh>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: damianatorrpm, kevin, mattia.verga, me
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-03 09:08:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1726543    
Bug Blocks:    

Description Dhananjay Arunesh 2019-07-03 06:59:18 UTC
Calamares through 3.2.4 copies a LUKS encryption keyfile from /crypto_keyfile.bin (mode 0600 owned by root) to /boot within a globally readable initramfs image with insecure permissions, which allows this originally protected file to be read by any user, thereby disclosing decryption keys for LUKS containers created with Full Disk Encryption.

Reference:
https://github.com/calamares/calamares/issues/1191

Comment 1 Dhananjay Arunesh 2019-07-03 06:59:30 UTC
Created calamares tracking bugs for this issue:

Affects: fedora-all [bug 1726543]

Comment 2 Kevin Kofler 2019-07-03 09:08:30 UTC
This CVE only affects the Debian mkinitramfs (initramfs-tools), which is not used in the Fedora configuration for Calamares. The underlying tool is also not shipped at all by Fedora. Therefore, Fedora is NOT affected by this vulnerability.

Dracut does not require the caller (Calamares in this case) to set the umask, it already does this automatically, and has been doing so since 2012 (since 2016 for one special case). See CVE-2012-4453 (https://github.com/dracutdevs/dracut/commit/e1b48995c26c4f06d1a718539cb1bd5b0179af91) and CVE-2016-8637 (https://github.com/dracutdevs/dracut/commit/0db98910a11c12a454eac4c8e86dc7a7bbc764a4).

Calamares on Fedora IS affected by the related CVE-2019-13178, though.

Comment 3 Kevin Kofler 2019-07-03 11:53:20 UTC
Please note that the upstream version numbers in both CVEs are incorrect, all versions of Calamares up to and including 3.2.10 are affected (but this particular CVE does not affect Fedora, as I explained).