This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1264790 - (CVE-2015-5284) CVE-2015-5284 ipa: ipa-kra-install includes certificate and private key in world readable file
CVE-2015-5284 ipa: ipa-kra-install includes certificate and private key in wo...
Status: CLOSED NOTABUG
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
high Severity high
: ---
: ---
Assigned To: Red Hat Product Security
impact=important,public=20151008,repo...
: Security
Depends On: 1264793
Blocks: 1264794
  Show dependency treegraph
 
Reported: 2015-09-21 04:46 EDT by Martin Prpič
Modified: 2015-10-08 17:44 EDT (History)
8 users (show)

See Also:
Fixed In Version: ipa 4.2.2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-08 07:45:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Proposed patch (5.27 KB, patch)
2015-09-21 06:48 EDT, Jan Cholasta
no flags Details | Diff
Proposed patch (5.03 KB, patch)
2015-09-21 08:39 EDT, Jan Cholasta
mbasti: review+
Details | Diff

  None (edit)
Description Martin Prpič 2015-09-21 04:46:26 EDT
It was discovered that ipa-kra-install puts the CA agent certificate and private key to a world readable file, /etc/httpd/alias/kra-agent.pem. This allows users on an IPA server where ipa-kra-install was run to issue arbitrary certificates with the IPA CA.

The ipa-kra-install script configures the KRA subsystem of Dogtag, which is used for the Password Vault feature of IPA. During the configuration process, a KRA agent user account is created in Dogtag, which is used by IPA to authenticate to the KRA. Currently the KRA agent uses the same certificate and private key as the CA agent, which IPA uses to authenticate to the CA.

The kra-agent.pem file is necessary because the Dogtag client Python library does not support using a certificate and private key from a NSS database for authentication, so it is not possible to use the CA agent certificate and private key directly from their primary location, which is the NSS database at /etc/httpd/alias.
Comment 2 Martin Prpič 2015-09-21 04:56:04 EDT
Statement:

This issue did not affect the versions of ipa as shipped with Red Hat Enterprise Linux 6 and 7 as they did not include the affected KRA subsystem.
Comment 3 Martin Prpič 2015-09-21 05:53:19 EDT
Acknowledgements:

This issue was discovered by Jan Cholasta of Red Hat.
Comment 4 Jan Cholasta 2015-09-21 06:48 EDT
Created attachment 1075455 [details]
Proposed patch

See attachment for a patch fixing the issue.
Comment 5 Jan Cholasta 2015-09-21 08:39 EDT
Created attachment 1075511 [details]
Proposed patch

Found a copy & paste issue in the patch, updated patch attached.
Comment 6 Martin Bašti 2015-09-22 02:51:08 EDT
The updated patch works for me, ACK.
Comment 7 Simo Sorce 2015-09-22 18:05:32 EDT
Patch looks good to me.
Comment 8 Tomas Hoger 2015-09-25 07:37:20 EDT
Just to explicitly confirm, do the upgrade.py part of the patch take care of automatically fixing existing installations that already have the file with bad permissions?  I see ipa-server's %posttrans runs ipa-server-upgrade.  Is no manual action required after that?
Comment 9 Martin Bašti 2015-09-25 07:45:27 EDT
Yes, upgrade will fix permissions on file, no manual action is needed.
Comment 10 Tomas Hoger 2015-09-25 07:53:43 EDT
Affected functionality was introduced in IPA 4.2.  Therefore, this issue did not affect IPA versions as shipped with Red Hat Enterprise Linux 6 and 7.  The new IPA 4.2 is part of Red Hat Enterprise Linux 7.2 Beta and it is planned to be addressed before the final release of Red Hat Enterprise Linux 7.2.
Comment 11 Jan Cholasta 2015-09-30 01:24:28 EDT
Actually, the certificate is not revoked during the upgrade, so anyone with a copy of kra-agent.pem can still authenticate with it after the upgrade. To prevent this, the private key and certificate must be manually replaced after the upgrade.
Comment 12 Tomas Hoger 2015-10-08 07:42:46 EDT
Lifting embargo.
Comment 13 Tomas Hoger 2015-10-08 07:45:54 EDT
No released Red Hat Enterprise Linux or Fedora version was affected by this flaw.

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