Bug 1326242 (CVE-2016-3112) - CVE-2016-3112 pulp: Agent certificate containing private key is stored in world-readable file
Summary: CVE-2016-3112 pulp: Agent certificate containing private key is stored in wor...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2016-3112
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1326913 1326919
Blocks: 1325942
TreeView+ depends on / blocked
 
Reported: 2016-04-12 08:53 UTC by Adam Mariš
Modified: 2021-02-17 04:05 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
It was found that the private key for the agent certificate was contained in a world-readable file. A local user could possibly use this flaw to gain access to the private key information in the file.
Clone Of:
Environment:
Last Closed: 2016-09-19 19:02:56 UTC
Embargoed:


Attachments (Terms of Use)
Proposed patch (1.72 KB, patch)
2016-04-12 15:50 UTC, Jeremy Cline
no flags Details | Diff
python2.4-compatible patch (1.29 KB, patch)
2016-04-12 16:29 UTC, Jeremy Cline
no flags Details | Diff

Description Adam Mariš 2016-04-12 08:53:59 UTC
It was reported that certificate that identifies agent is written to etc/pki/pulp/consumer/consumer-cert.pem with 644 permissions and contains also the private key, making it world-readable.

Comment 1 Adam Mariš 2016-04-12 08:54:08 UTC
Acknowledgments:

Name: Jeremy Cline (Red Hat)

Comment 3 Jeremy Cline 2016-04-12 15:50:09 UTC
Created attachment 1146527 [details]
Proposed patch

This fixes the issue where new certificates and keys are written with 644 permissions, but it doesn't do anything for all the keys and certificates that already exist.

Comment 4 Randy Barlow 2016-04-12 16:00:09 UTC
From a security perspective, the current proposed patch seems OK, but I believe this code needs to be able to work in Python 2.4 (RHEL 5) which does not have the with statement available.

Comment 5 Jeremy Cline 2016-04-12 16:29:43 UTC
Created attachment 1146538 [details]
python2.4-compatible patch

This patch works with Python 2.4 which is a requirement, as Randy noted. Thanks, Randy!

Comment 6 Randy Barlow 2016-04-13 14:19:48 UTC
This patch looks good to me, thanks jcline!

Comment 9 Kurt Seifried 2016-09-19 19:02:56 UTC
This issue has been addressed in the following products:

  Red Hat Satellite 6.2

Via RHSA-2016:1501


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