Bug 1346051 (CVE-2016-4982) - CVE-2016-4982 authd insecure /etc/ident.key file creation
Summary: CVE-2016-4982 authd insecure /etc/ident.key file creation
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2016-4982
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1346052
Blocks: 1346019 1349160
TreeView+ depends on / blocked
 
Reported: 2016-06-13 19:10 UTC by Kurt Seifried
Modified: 2021-02-17 03:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-13 10:07:15 UTC
Embargoed:


Attachments (Terms of Use)

Description Kurt Seifried 2016-06-13 19:10:02 UTC
Kurt Seifried of Red Hat reports:

The authd rpm creates the /etc/ident.key file using the following rpm postinstall script:

/usr/bin/openssl rand -base64 -out /etc/ident.key 32
echo CHANGE THE LINE ABOVE TO A PASSPHRASE >> /etc/ident.key
/bin/chown ident:ident /etc/ident.key
chmod o-rw /etc/ident.key

this can lead to the contents of the file being exposed between the time the file is created and the chmod command runs. I would suggest setting umask 077 first. 

Additionally this secret value needs to be unique per instance or install but this value is created at install-time and not during the first run. All container and image instances created would share the same password as this password is set at rpm install time, and each instance should recieve a unique password. 

This bug is being file because Product Security considers "first run problems" to be bugs with the source package and with the container or image only in the aggregate. This view is in collaboration with upstream Fedora. See: https://fedorahosted.org/fpc/ticket/506

The recommended resolution for services is to follow the "First-time Service Setup" pattern (see: https://fedoraproject.org/wiki/Packaging:Initial_Service_Setup ). Other packages may should use a runtime check and generation or similar procedure.

Comment 1 Kurt Seifried 2016-06-13 19:10:10 UTC
Acknowledgments:

Name: Kurt Seifried (Red Hat)

Comment 2 Kurt Seifried 2016-06-13 19:12:02 UTC
Created authd tracking bugs for this issue:

Affects: fedora-all [bug 1346052]


Note You need to log in before you can comment on or make changes to this bug.