Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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

Summary: com.redhat.RHSM1.Config.Set is accessible by non-root users
Product: Red Hat Enterprise Linux 7 Reporter: Kevin Howell <khowell>
Component: subscription-managerAssignee: Kevin Howell <khowell>
Status: CLOSED ERRATA QA Contact: Sean Toner <stoner>
Severity: high Docs Contact:
Priority: high    
Version: 7.4CC: jmolet, redakkan, skallesh, stoner
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 19:21:47 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:

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