Bug 1013813

Summary: carbon-aggregator and carbon-relay run as root in default config, should run as user "carbon"
Product: [Fedora] Fedora Reporter: James Juran <james.juran>
Component: python-carbonAssignee: Jonathan Steffan <jonathansteffan>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jonathansteffan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-carbon-0.9.12-3.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-05 02:53:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Define USER=carbon for carbon-aggregator and carbon-relay none

Description James Juran 2013-09-30 20:21:41 UTC
Created attachment 805518 [details]
Define USER=carbon for carbon-aggregator and carbon-relay

Description of problem:

In the default config, carbon-aggregator and carbon-relay daemons run as root, rather than user "carbon". This is because the USER parameter must be defined in each of the [cache], [aggregator], and [relay] sections of the config file.

Version-Release number of selected component (if applicable):

python-carbon-0.9.12-2.el6.noarch

How reproducible:

Always

Steps to Reproduce:
1. service carbon-aggregator start
2. change RELAY_METHOD = aggregated-consistent-hashing to allow carbon-relay to start.
2. service carbon-relay start

Actual results:

[root@]# ps -eo user,comm | grep carbon
root     carbon-aggregat
root     carbon-relay
carbon   carbon-cache

Expected results:

[root@]# ps -eo user,comm | grep carbon
carbon   carbon-aggregat
carbon   carbon-relay
carbon   carbon-cache

Additional info:

This obviously weakens the security of the machine, as any flaw in these daemons will potentially allow execution as root, rather than as the unprivileged user carbon.

I am running successfully in production with USER=carbon defined for each daemon, as shown in the attached patch.

Comment 1 Jonathan Steffan 2013-10-01 01:47:53 UTC
Thanks for the report. As I've not been using the aggregator nor relay yet I did not catch this. I'll update the shipped configurations and will do builds to address this but will not be issuing an update until I can get the currently pending fixes through -testing so we get those fixes out there first.

Comment 2 Jonathan Steffan 2013-10-01 02:45:38 UTC
http://koji.fedoraproject.org/koji/buildinfo?buildID=468642 has this fix applied. Once I get all the current pending packages past -testing I will issue an update for this (and likely any other bugs I can get fixed before the next round of updates.)

Comment 3 Fedora Update System 2013-10-25 15:08:59 UTC
python-carbon-0.9.12-3.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/python-carbon-0.9.12-3.fc18

Comment 4 Fedora Update System 2013-10-25 15:09:08 UTC
python-carbon-0.9.12-3.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/python-carbon-0.9.12-3.fc19

Comment 5 Fedora Update System 2013-10-25 15:09:16 UTC
python-carbon-0.9.12-3.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/python-carbon-0.9.12-3.el6

Comment 6 Fedora Update System 2013-10-25 15:09:24 UTC
python-carbon-0.9.12-3.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/python-carbon-0.9.12-3.fc20

Comment 7 Fedora Update System 2013-10-25 17:40:14 UTC
Package python-carbon-0.9.12-3.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing python-carbon-0.9.12-3.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2013-11955/python-carbon-0.9.12-3.el6
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2013-11-05 02:53:52 UTC
python-carbon-0.9.12-3.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2013-11-05 02:55:50 UTC
python-carbon-0.9.12-3.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2013-11-10 06:25:04 UTC
python-carbon-0.9.12-3.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2013-11-10 20:18:19 UTC
python-carbon-0.9.12-3.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.