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 829274 - MLS: chkconfig SERVICE on/off doesn't work well for root:sysadm_r:sysadm_t
Summary: MLS: chkconfig SERVICE on/off doesn't work well for root:sysadm_r:sysadm_t
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-06 11:13 UTC by Milos Malik
Modified: 2018-11-29 20:07 UTC (History)
2 users (show)

Fixed In Version: selinux-policy-3.7.19-156.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 08:35:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0314 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2013-02-20 20:35:01 UTC

Description Milos Malik 2012-06-06 11:13:21 UTC
Description of problem:


Version-Release number of selected component (if applicable):
selinux-policy-mls-3.7.19-154.el6.noarch
selinux-policy-3.7.19-154.el6.noarch
selinux-policy-minimum-3.7.19-154.el6.noarch
selinux-policy-targeted-3.7.19-154.el6.noarch
selinux-policy-doc-3.7.19-154.el6.noarch

How reproducible:
always

Steps to Reproduce:
# id -Z
root:sysadm_r:sysadm_t:s0-s15:c0.c1023
# sestatus 
SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   enforcing
Mode from config file:          enforcing
Policy version:                 24
Policy from config file:        mls
# chkconfig cgconfig on
failed to make symlink /etc/rc0.d/K00rgmanager: File exists
failed to make symlink /etc/rc1.d/K00rgmanager: File exists
failed to make symlink /etc/rc2.d/K00rgmanager: File exists
failed to make symlink /etc/rc3.d/K00rgmanager: File exists
failed to make symlink /etc/rc4.d/K00rgmanager: File exists
failed to make symlink /etc/rc5.d/K00rgmanager: File exists
failed to make symlink /etc/rc6.d/K00rgmanager: File exists
failed to make symlink /etc/rc0.d/K95cgconfig: File exists
failed to make symlink /etc/rc1.d/K95cgconfig: File exists
failed to make symlink /etc/rc2.d/K95cgconfig: File exists
failed to make symlink /etc/rc3.d/K95cgconfig: File exists
failed to make symlink /etc/rc4.d/K95cgconfig: File exists
failed to make symlink /etc/rc5.d/K95cgconfig: File exists
failed to make symlink /etc/rc6.d/K95cgconfig: File exists
failed to make symlink /etc/rc2.d/S05cgconfig: Permission denied
failed to make symlink /etc/rc3.d/S05cgconfig: Permission denied
failed to make symlink /etc/rc4.d/S05cgconfig: Permission denied
failed to make symlink /etc/rc5.d/S05cgconfig: Permission denied
# chkconfig cgconfig off
failed to make symlink /etc/rc0.d/K00rgmanager: File exists
failed to make symlink /etc/rc1.d/K00rgmanager: File exists
failed to make symlink /etc/rc2.d/K00rgmanager: File exists
failed to make symlink /etc/rc3.d/K00rgmanager: File exists
failed to make symlink /etc/rc4.d/K00rgmanager: File exists
failed to make symlink /etc/rc5.d/K00rgmanager: File exists
failed to make symlink /etc/rc6.d/K00rgmanager: File exists
failed to make symlink /etc/rc0.d/K95cgconfig: File exists
failed to make symlink /etc/rc1.d/K95cgconfig: File exists
failed to make symlink /etc/rc2.d/K95cgconfig: File exists
failed to make symlink /etc/rc3.d/K95cgconfig: File exists
failed to make symlink /etc/rc4.d/K95cgconfig: File exists
failed to make symlink /etc/rc5.d/K95cgconfig: File exists
failed to make symlink /etc/rc6.d/K95cgconfig: File exists
failed to make symlink /etc/rc2.d/K95cgconfig: File exists
failed to make symlink /etc/rc3.d/K95cgconfig: File exists
failed to make symlink /etc/rc4.d/K95cgconfig: File exists
failed to make symlink /etc/rc5.d/K95cgconfig: File exists
#
  
Actual results:
----
time->Wed Jun  6 13:03:39 2012
type=SYSCALL msg=audit(1338980619.861:180): arch=40000003 syscall=83 success=no exit=-13 a0=bfe626bc a1=bfe62784 a2=bfe62784 a3=bfe626bc items=0 ppid=1300 pid=1389 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="chkconfig" exe="/sbin/chkconfig" subj=root:sysadm_r:sysadm_t:s0-s15:c0.c1023 key=(null)
type=AVC msg=audit(1338980619.861:180): avc:  denied  { create } for  pid=1389 comm="chkconfig" name="S05cgconfig" scontext=root:sysadm_r:sysadm_t:s0-s15:c0.c1023 tcontext=root:object_r:etc_t:s0 tclass=lnk_file
----
time->Wed Jun  6 13:03:42 2012
type=SYSCALL msg=audit(1338980622.399:182): arch=40000003 syscall=10 success=no exit=-13 a0=8761220 a1=8761150 a2=1 a3=8759fe8 items=0 ppid=1300 pid=1390 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="chkconfig" exe="/sbin/chkconfig" subj=root:sysadm_r:sysadm_t:s0-s15:c0.c1023 key=(null)
type=AVC msg=audit(1338980622.399:182): avc:  denied  { unlink } for  pid=1390 comm="chkconfig" name="K00rgmanager" dev=vda3 ino=138673 scontext=root:sysadm_r:sysadm_t:s0-s15:c0.c1023 tcontext=root:object_r:etc_t:s0 tclass=lnk_file
----

Expected results:
* no AVCs

Comment 2 Milos Malik 2012-06-06 11:21:19 UTC
On the other hand it works when run_init chkconfig ... is used. Do we have a proper documentation for such a scenario?

Comment 3 Miroslav Grepl 2012-06-06 12:51:07 UTC
We have fixed this one in Fedora.

Comment 4 Daniel Walsh 2012-06-07 15:57:12 UTC
Yes we should back port the fix.

Comment 5 RHEL Program Management 2012-07-10 08:19:10 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 6 RHEL Program Management 2012-07-11 01:56:35 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 8 Josh 2012-09-17 12:20:34 UTC
This also affects targeted policy with unconfined removed.

Comment 11 errata-xmlrpc 2013-02-21 08:35:43 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.

http://rhn.redhat.com/errata/RHBA-2013-0314.html


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