Bug 616826 - avc: denied { transition } for ... comm="env" path="/etc/rc.d/init.d/ricci" ...
avc: denied { transition } for ... comm="env" path="/etc/rc.d/init.d/ricci" ...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Miroslav Grepl
Milos Malik
: RHELNAK
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-21 09:44 EDT by Milos Malik
Modified: 2012-10-16 08:30 EDT (History)
2 users (show)

See Also:
Fixed In Version: selinux-policy-3.7.19-33.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-10 16:35:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Milos Malik 2010-07-21 09:44:35 EDT
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 Product and Program Management 2010-07-21 09:57:58 EDT
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 10:09:23 EDT
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 10:34:27 EDT
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 11:18:32 EDT
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 11:19:58 EDT
What problems are  you seeing with vhostmd?
Comment 6 Miroslav Grepl 2010-07-22 02:53:54 EDT
(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 03:37:26 EDT
(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 16:35:26 EST
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.