RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1434094 - com.redhat.RHSM1.Config.Set is accessible by non-root users
Summary: com.redhat.RHSM1.Config.Set is accessible by non-root users
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Kevin Howell
QA Contact: Sean Toner
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-20 17:19 UTC by Kevin Howell
Modified: 2017-08-01 19:21 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 19:21:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 1565 0 None None None 2017-03-20 18:00:24 UTC
Red Hat Product Errata RHBA-2017:2083 0 normal SHIPPED_LIVE python-rhsm and subscription-manager bug fix and enhancement update 2017-08-01 18:14:19 UTC

Description Kevin Howell 2017-03-20 17:19:17 UTC
Description of problem:
com.redhat.RHSM1.Config.Set can be called by any user.


How reproducible: 100%


Steps to Reproduce:
1. As non-root execute ex. gdbus call --system --dest=com.redhat.RHSM1 -o /com/redhat/RHSM1/Config -m com.redhat.RHSM1.Config.Set server.port "<'444'>"

Actual results:
Observe that port in rhsm.conf is changed


Expected results:
Non-root should not be able to alter rhsm.conf this way.

Comment 3 Sean Toner 2017-04-17 19:20:09 UTC
Tested this out on subscription-manager-1.19.7

Checked what the current port is:
=================================
[stoner@stoner-rhel-74 root]$ cat /etc/rhsm/rhsm.conf | grep "port ="
port = 443
proxy_port =

Switched to a non-root user
===========================
[stoner@stoner-rhel-74 root]$ su robin
Password: 
[robin@stoner-rhel-74 root]$ groups
robin

Tried to call config set service
================================
[robin@stoner-rhel-74 root]$ gdbus call --system --dest=com.redhat.RHSM1 -o /com/redhat/RHSM1/Config -m com.redhat.RHSM1.Config.Set server.port "<'444'>"
Error: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 3 matched rules; type="method_call", sender=":1.37940" (uid=1002 pid=12886 comm="gdbus call --system --dest=com.redhat.RHSM1 -o /co") interface="com.redhat.RHSM1.Config" member="Set" error name="(unset)" requested_reply="0" destination="com.redhat.RHSM1" (uid=0 pid=12113 comm="python /usr/libexec/rhsm-service ")

Switched to root, and checked that the conf file didn't change
==============================================================
[robin@stoner-rhel-74 root]$ su
Password: 
[root@stoner-rhel-74 ~]# cat /etc/rhsm/rhsm.cond | grep "port ="
cat: /etc/rhsm/rhsm.cond: No such file or directory
[root@stoner-rhel-74 ~]# cat /etc/rhsm/rhsm.conf | grep "port ="
port = 443
proxy_port =

As root, called the same command to set the port
================================================
[root@stoner-rhel-74 ~]# gdbus call --system --dest=com.redhat.RHSM1 -o /com/redhat/RHSM1/Config -m com.redhat.RHSM1.Config.Set server.port "<'444'>"
()

Verified the port was set as root user
======================================
[root@stoner-rhel-74 ~]# cat /etc/rhsm/rhsm.conf | grep "port ="
port = 444
proxy_port =

Comment 4 errata-xmlrpc 2017-08-01 19:21:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2083


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