Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 906207 - (CVE-2012-6116) CVE-2012-6116 Candlepin: bootstrap RPM deploys CA certificate file with mode 666
CVE-2012-6116 Candlepin: bootstrap RPM deploys CA certificate file with mode 666
Status: CLOSED WONTFIX
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20130221,repor...
: Security
: 876580 (view as bug list)
Depends On: 877387 896255 906208 924247 995675 995676
Blocks: 906209 906638 917158
  Show dependency treegraph
 
Reported: 2013-01-31 01:27 EST by Kurt Seifried
Modified: 2015-08-21 17:05 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-21 17:05:48 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)
Fix for the permissions issue (in installer) (1.67 KB, patch)
2013-02-22 09:38 EST, Martin Bacovsky
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0547 normal SHIPPED_LIVE Moderate: CloudForms System Engine 1.1.2 update 2013-02-21 19:01:10 EST
Red Hat Product Errata RHSA-2013:0686 normal SHIPPED_LIVE Moderate: Subscription Asset Manager 1.2.1 update 2013-03-26 19:16:44 EDT

  None (edit)
Description Kurt Seifried 2013-01-31 01:27:17 EST
Dominic Cleal reports 

Description of problem:
katello-configure generates a bootstrap RPM for installation on clients to be 
connected to the Katello server.  This contains a CA certificate for Candlepin
which has a mode set of 0666, permitting other users on a client system to 
modify the CA used to trust the remote Katello server.

The RPM is named after the FQDN of the Katello server, e.g.
candlepin-cert-consumer-$FQDN

# ll /etc/rhsm/ca/candlepin-local.pem 
-rw-rw-rw-. 1 root root 5385 Nov 12 16:21 /etc/rhsm/ca/candlepin-local.pem

# rpm -qalv candlepin-cert-consumer-\*
-rw-rw-rw-    1 root    root  5385 Nov 12 16:21 /etc/rhsm/ca/candlepin-local.pem

Version-Release number of selected component (if applicable):
Tested on 1.1 release, verified code present in git master.

How reproducible:
Always.

Steps to Reproduce:
1. install Katello (https://fedorahosted.org/katello/wiki/Install)
2. run: katello-configure
3. run: rpm -qplv /var/www/html/pub/candlepin-cert-consumer-*noarch.rpm

Actual results:
-rw-rw-rw-    1 root    root  5385 Nov 12 16:21 /etc/rhsm/ca/candlepin-local.pem

Expected results:
-rw-r--r--    1 root    root  5385 Nov 12 16:21 /etc/rhsm/ca/candlepin-local.pem

Additional info:
katello-configure generates the RPM from within the certs::config puppet class:

  exec { "generate-candlepin-consumer-certificate":
    cwd       => "${katello_www_pub_dir}",
    command   => "gen-rpm.sh --name '${candlepin_consumer_name}' --version 1.0 --release 1 --packager None --vendor None --group 'Applications/System' --summary '${candlepin_consumer_summary}' --description '${candlepin_consumer_description}' --requires subscription-manager --post ${ssl_build_path}/rhsm-katello-reconfigure /etc/rhsm/ca/candlepin-local.pem:666=${ssl_build_path}/$candlepin_cert_name.crt 2>>${katello::params::configure_log_base}/certificates.log && /sbin/restorecon ./*rpm",
    path      => "/usr/share/katello/certs:/usr/bin:/bin",
    creates   => "${katello_www_pub_dir}/${candlepin_consumer_name}-1.0-1.noarch.rpm",
    require   => [Exec["generate-candlepin-certificate"], File["${ssl_build_path}/rhsm-katello-reconfigure"], File["${katello::params::configure_log_base}"]]
  }

In the middle of this command it passes in the permissions "666" to the gen-rpm.sh script, which get put into the RPM spec as the %attr for the CA cert file.

The gen-rpm.sh script is also used by katello-ssl-tool, but a quick test shows that this doesn't explicitly set the mode when it generates a CA RPM, so the RPM is generated with the file having default 644 permissions.
Comment 2 Kurt Seifried 2013-02-01 01:48:50 EST
*** Bug 876580 has been marked as a duplicate of this bug. ***
Comment 3 Murray McAllister 2013-02-14 04:25:57 EST
Acknowledgements:

This issue was discovered by Dominic Cleal and James Laska of Red Hat.
Comment 5 errata-xmlrpc 2013-02-21 14:07:24 EST
This issue has been addressed in following products:

  CloudForms for RHEL 6

Via RHSA-2013:0547 https://rhn.redhat.com/errata/RHSA-2013-0547.html
Comment 6 Bryan Kearney 2013-02-22 08:43:28 EST
commit 65f1e42b7bda0f3410931c50598540d944d8bf0d
Author: Marek Hulan <ares@igloonet.cz>
Date:   Tue Jan 22 12:48:10 2013 +0100

    877387 - Candlepin CA certificate mode in RPM
    
    File mode is set to 0644 when RPM is generated.
Comment 7 Martin Bacovsky 2013-02-22 09:38:37 EST
Created attachment 701212 [details]
Fix for the permissions issue (in installer)
Comment 8 sthirugn@redhat.com 2013-03-20 12:01:14 EDT
Verified in SAM compose:

SAM 1.1 version:
* candlepin-0.6.5-1.el6_2.noarch
* candlepin-tomcat6-0.6.5-1.el6_2.noarch
* elasticsearch-0.18.4-11.el6.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.1.5-1.el6_2.noarch
* katello-cli-common-0.3.5-2.el6_2.noarch
* katello-cli-headpin-0.2.2-1.el6_2.noarch
* katello-common-0.3.3-1.el6_2.noarch
* katello-configure-0.3.7-1.el6_2.noarch
* katello-glue-candlepin-0.3.3-1.el6_2.noarch
* katello-headpin-0.2.13-1.el6_2.noarch
* katello-headpin-all-0.2.13-1.el6_2.noarch
* katello-selinux-0.2.4-1.el6_2.noarch
* thumbslug-0.0.24-1.el6_2.noarch

SAM 1.2.1 Version:
* candlepin-0.7.24-1.el6_3.noarch
* candlepin-cert-consumer-gizmo.idm.lab.bos.redhat.com-1.0-1.noarch
* candlepin-selinux-0.7.24-1.el6_3.noarch
* candlepin-tomcat6-0.7.24-1.el6_3.noarch
* elasticsearch-0.19.9-5.el6_3.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.2.1-1h.el6_3.noarch
* katello-cli-1.2.1-12h.el6_3.noarch
* katello-cli-common-1.2.1-12h.el6_3.noarch
* katello-common-1.2.1.1-1h.el6_4.noarch
* katello-configure-1.2.3.1-4h.el6_4.noarch
* katello-glue-candlepin-1.2.1.1-1h.el6_4.noarch
* katello-headpin-1.2.1.1-1h.el6_4.noarch
* katello-headpin-all-1.2.1.1-1h.el6_4.noarch
* katello-selinux-1.2.1-2h.el6_3.noarch
* thumbslug-0.0.28.1-1.el6_4.noarch
* thumbslug-selinux-0.0.28.1-1.el6_4.noarch
Comment 9 errata-xmlrpc 2013-03-26 15:17:15 EDT
This issue has been addressed in following products:

  Red Hat Subscription Asset Manager 1.2

Via RHSA-2013:0686 https://rhn.redhat.com/errata/RHSA-2013-0686.html
Comment 10 Kurt Seifried 2013-07-26 03:41:17 EDT
The Red Hat Security Response Team has rated this issue as having moderate security impact in CloudForms 1.1. This issue is not currently planned to be addressed in future updates.

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