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 616826 - avc: denied { transition } for ... comm="env" path="/etc/rc.d/init.d/ricci" ...
Summary: avc: denied { transition } for ... comm="env" path="/etc/rc.d/init.d/ricci" ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-21 13:44 UTC by Milos Malik
Modified: 2012-10-16 12:30 UTC (History)
2 users (show)

Fixed In Version: selinux-policy-3.7.19-33.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-10 21:35:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Milos Malik 2010-07-21 13:44:35 UTC
Description of problem:


Version-Release number of selected component (if applicable):
selinux-policy-3.7.19-32.el6.noarch
selinux-policy-targeted-3.7.19-32.el6.noarch
ricci-0.16.2-9.el6.x86_64

How reproducible:
always

Steps to Reproduce:
# tps-rhts -d selinux-policy
# cd /mnt/testarea/tests/selinux-policy/Sanity/confined-admins-and-their-services/
# vim runtest.sh (remove all lines containing "_admin," string except for "ricci_admin,ricci" line)
# yum -y install ricci
# setenforce 0
# make run
# ausearch -m avc -ts recent

Actual results:
----
time->Wed Jul 21 09:36:01 2010
type=SYSCALL msg=audit(1279719361.493:45018): arch=c000003e syscall=59 success=yes exit=0 a0=7ffff7c7be8c a1=7ffff7c7af28 a2=18b8030 a3=10 items=0 ppid=30252 pid=30257 auid=501 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts3 ses=77 comm="ricci" exe="/bin/bash" subj=staff_u:system_r:initrc_t:s0 key=(null)
type=AVC msg=audit(1279719361.493:45018): avc:  denied  { transition } for  pid=30257 comm="env" path="/etc/rc.d/init.d/ricci" dev=dm-0 ino=524105 scontext=staff_u:confined_admin_r:confined_admin_t:s0 tcontext=staff_u:system_r:initrc_t:s0 tclass=process
----

Expected results:
no AVCs

Comment 1 RHEL Program Management 2010-07-21 13:57:58 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 2 Daniel Walsh 2010-07-21 14:09:23 UTC
confined_admin_t is not a domain that we ship,  This looks like a bug in the test or policy that the test is shipping?

Comment 3 Milos Malik 2010-07-21 14:34:27 UTC
confined_admin_t is an artificial domain which is in this specific case defined by following lines. The last line is modified in each run because we want to test different *_admin interface in each run.

----
policy_module(confined_admin,1.0.0)
userdom_admin_user_template(confined_admin)

require {
    role staff_r;
}
role confined_admin_r;
allow staff_r confined_admin_r;

domain_use_interactive_fds(confined_admin_t)
files_read_etc_files(confined_admin_t)
miscfiles_read_localization(confined_admin_t)
ricci_admin(confined_admin_t,confined_admin_r)
----

The purpose of the /CoreOS/selinux-policy/Sanity/confined-admins-and-their-services is to test all *_admin interfaces defined in selinux-policy package. There are 104 _admin interfaces defined in 3.7.19-32.el6. The test PASSed on 102 of them. The 2 remaining _admin interfaces which make the test FAIL are: vhostmd_admin and ricci_admin.

Comment 4 Daniel Walsh 2010-07-21 15:18:32 UTC
Ok I think I see the problem.

Miroslav can you make the ricci_admin interface look like

	allow $1 ricci_t:process { ptrace signal_perms };
	ps_process_pattern($1, ricci_t)

	ricci_initrc_domtrans($1)
	domain_system_change_exemption($1)
	role_transition $2 ricci_initrc_exec_t system_r;
	allow $2 system_r;

Comment 5 Daniel Walsh 2010-07-21 15:19:58 UTC
What problems are  you seeing with vhostmd?

Comment 6 Miroslav Grepl 2010-07-22 06:53:54 UTC
(In reply to comment #4)
> Ok I think I see the problem.
> 
> Miroslav can you make the ricci_admin interface look like
> 
>  allow $1 ricci_t:process { ptrace signal_perms };
>  ps_process_pattern($1, ricci_t)
> 
>  ricci_initrc_domtrans($1)
>  domain_system_change_exemption($1)
>  role_transition $2 ricci_initrc_exec_t system_r;
>  allow $2 system_r;    

Yes,

'allow $2 system_r' statement was missing. 

Added to selinux-policy-3.7.19-33.el6.noarch.

Comment 8 Milos Malik 2010-07-22 07:37:26 UTC
(In reply to comment #5)
> What problems are  you seeing with vhostmd?    

It has already been filed under bz#616783 which turned out not to be a selinux-policy issue.

Comment 9 releng-rhel@redhat.com 2010-11-10 21:35:26 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


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