Bug 1326251 (CVE-2016-3111)

Summary: CVE-2016-3111 pulp: Race condition when generating RSA keys for authenticating messages between server and consumers
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: bkearney, cbillett, jcline, jmatthew, mmccune, ohadlevy, rbarlow, security-response-team, tjay, tlestach, tsanders
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
It was found that the private RSA key was created in a directory that is world-readable for a small amount of time. A local user could possibly use this flaw to gain access to the private key information in the file.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-19 19:03:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1326913, 1326919    
Bug Blocks: 1325942    
Attachments:
Description Flags
Proposed patch none

Description Adam Mariš 2016-04-12 09:07:22 UTC
It was found that spec file generating RSA keys, used for authenticating messages between server and consumers, as post installation step does this in world-readable directories for a brief moment.

Vulnerable code:

https://github.com/pulp/pulp/blob/master/pulp.spec#L473-L486
https://github.com/pulp/pulp/blob/master/pulp.spec#L894-L903

Comment 1 Adam Mariš 2016-04-12 09:07:31 UTC
Acknowledgments:

Name: Jeremy Cline (Red Hat)

Comment 2 Randy Barlow 2016-04-12 13:29:25 UTC
The Fedora spec file is also vulnerable in this way:

http://pkgs.fedoraproject.org/cgit/rpms/pulp.git/tree/pulp.spec#n317

and

http://pkgs.fedoraproject.org/cgit/rpms/pulp.git/tree/pulp.spec#n620

Additionally, the Fedora spec file fails to protect the key but that is reported in a separate issue:

https://bugzilla.redhat.com/show_bug.cgi?id=1325693

Comment 4 Jeremy Cline 2016-04-12 15:38:07 UTC
Created attachment 1146522 [details]
Proposed patch

Comment 7 Kurt Seifried 2016-09-19 19:03:05 UTC
This issue has been addressed in the following products:

  Red Hat Satellite 6.2

Via RHSA-2016:1501