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 1412727 - USER_AVC when enabling/disabling a non-existent service
Summary: USER_AVC when enabling/disabling a non-existent service
Keywords:
Status: CLOSED DUPLICATE of bug 1337041
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-12 16:07 UTC by Frantisek Sumsal
Modified: 2017-01-12 16:28 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-12 16:28:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Frantisek Sumsal 2017-01-12 16:07:42 UTC
Description of problem:
Enabling/disabling a non-existent service causes "Failed to execute operation: Access denied" error being thrown along with a USER_AVC. This is a possible regression, see BZ#1154065.

Version-Release number of selected component (if applicable):
systemd-219-30.el7.x86_64
selinux-policy-3.13.1-108.el7.noarch

How reproducible:
always

Steps to Reproduce:
# systemctl status definitely-a-non-existent-service.service
Unit definitely-a-non-existent-service.service could not be found.
# systemctl enable definitely-a-non-existent-service.service
Failed to execute operation: Access denied
# systemctl disable definitely-a-non-existent-service.service
Failed to execute operation: Access denied
# ausearch -m USER_AVC -i
----
type=USER_AVC msg=audit(01/12/2017 11:02:53.361:307) : pid=1 uid=root auid=unset ses=unset subj=system_u:system_r:init_t:s0 msg='avc:  denied  { enable } for auid=root uid=root gid=root cmdline="systemctl enable definitely-a-non-existent-service.service" scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=system_u:system_r:init_t:s0 tclass=service  exe=/usr/lib/systemd/systemd sauid=root hostname=? addr=? terminal=?' 
----
type=USER_AVC msg=audit(01/12/2017 11:02:55.839:308) : pid=1 uid=root auid=unset ses=unset subj=system_u:system_r:init_t:s0 msg='avc:  denied  { disable } for auid=root uid=root gid=root cmdline="systemctl disable definitely-a-non-existent-service.service" scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=system_u:system_r:init_t:s0 tclass=service  exe=/usr/lib/systemd/systemd sauid=root hostname=? addr=? terminal=?'

Expected results:
# setenforce 0
# systemctl enable definitely-a-non-existent-service.service
Failed to execute operation: No such file or directory
# systemctl disable definitely-a-non-existent-service.service
Failed to execute operation: No such file or directory

Comment 1 Milos Malik 2017-01-12 16:23:47 UTC
I believe this bug is duplicate of BZ#1337041.

Comment 2 Milos Malik 2017-01-12 16:25:40 UTC
Please see comment#6 in BZ#1337041.

Comment 3 Frantisek Sumsal 2017-01-12 16:28:51 UTC
Thank you, Milos, it's indeed the exactly same problem.

*** This bug has been marked as a duplicate of bug 1337041 ***


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