Bug 1346016 (CVE-2016-4980) - CVE-2016-4980 xguest insecure password creation
Summary: CVE-2016-4980 xguest insecure password creation
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2016-4980
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: 1346017
Blocks: 1346019 1349160
TreeView+ depends on / blocked
 
Reported: 2016-06-13 16:44 UTC by Kurt Seifried
Modified: 2019-09-29 13:51 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-28 05:00:03 UTC


Attachments (Terms of Use)

Description Kurt Seifried 2016-06-13 16:44:59 UTC
Kurt Seifried of Red Hat reports:

The xguest rpm creates a user and sets a password using the following rpm postinstall script:

head -1 /dev/urandom | passwd xguest --stdin > /dev/null

this can lead to insufficient randomness being used (in testing with head -n 1 /dev/urandom | wc -c it took an average of 10 attempts to get only 2 characters out). This password is required due to GDM requiring a password for automated passwordless logins at the console. 

A better method would be to use a tool such as openssl to get a guaranteed amount of entropy to create the password. 

Additionally this password 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 16:45:09 UTC
Acknowledgments:

Name: Kurt Seifried (Red Hat)

Comment 2 Kurt Seifried 2016-06-13 16:46:15 UTC
Created xguest tracking bugs for this issue:

Affects: fedora-all [bug 1346017]

Comment 3 Steve Grubb 2016-06-13 16:54:47 UTC
Probably head -c 24 (or some number) would fix it. The issue is that if the random string contains 0x0A, then head sees it as a new line and stops collecting random bytes.

Comment 4 Fedora Update System 2016-06-29 12:56:19 UTC
xguest-1.0.10-34.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2016-06-29 17:22:59 UTC
xguest-1.0.10-33.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 6 Kurt Seifried 2016-07-15 18:05:50 UTC
(In reply to Steve Grubb from comment #3)
> Probably head -c 24 (or some number) would fix it. The issue is that if the
> random string contains 0x0A, then head sees it as a new line and stops
> collecting random bytes.

dd is much safer as you get a definite quantity of entropy.


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