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 752376

Summary: vhostmd service dies in enforcing mode
Product: Red Hat Enterprise Linux 6 Reporter: Milos Malik <mmalik>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2CC: dwalsh, ebenes
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.7.19-125.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 10:20:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Milos Malik 2011-11-09 10:57:22 UTC
Description of problem:


Version-Release number of selected component (if applicable):
selinux-policy-mls-3.7.19-123.el6.noarch
selinux-policy-3.7.19-123.el6.noarch
selinux-policy-minimum-3.7.19-123.el6.noarch
selinux-policy-targeted-3.7.19-123.el6.noarch
selinux-policy-doc-3.7.19-123.el6.noarch
vhostmd-0.4-2.4.el6.x86_64

How reproducible:
always

Steps to Reproduce:
# sestatus 
SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   enforcing
Mode from config file:          enforcing
Policy version:                 24
Policy from config file:        targeted
# service vhostmd start
Starting vhostmd: [  OK  ]
# service vhostmd status
vhostmd dead but subsys locked
# service vhostmd stop
# ausearch -m avc -m user_avc -ts recent

Actual results:
----
time->Wed Nov  9 05:49:15 2011
type=SYSCALL msg=audit(1320835755.978:445728): arch=c000003e syscall=21 success=no exit=-13 a0=3c4c6665e8 a1=4 a2=0 a3=0 items=0 ppid=1 pid=2852 auid=0 uid=112 gid=112 euid=112 suid=112 fsuid=112 egid=112 sgid=112 fsgid=112 tty=(none) ses=115 comm="vhostmd" exe="/usr/sbin/vhostmd" subj=unconfined_u:system_r:vhostmd_t:s0 key=(null)
type=AVC msg=audit(1320835755.978:445728): avc:  denied  { read } for  pid=2852 comm="vhostmd" name="random" dev=devtmpfs ino=3656 scontext=unconfined_u:system_r:vhostmd_t:s0 tcontext=system_u:object_r:random_device_t:s0 tclass=chr_file
----
time->Wed Nov  9 05:49:15 2011
type=SYSCALL msg=audit(1320835755.978:445729): arch=c000003e syscall=234 success=no exit=-13 a0=b24 a1=b24 a2=6 a3=8 items=0 ppid=1 pid=2852 auid=0 uid=112 gid=112 euid=112 suid=112 fsuid=112 egid=112 sgid=112 fsgid=112 tty=(none) ses=115 comm="vhostmd" exe="/usr/sbin/vhostmd" subj=unconfined_u:system_r:vhostmd_t:s0 key=(null)
type=AVC msg=audit(1320835755.978:445729): avc:  denied  { signal } for  pid=2852 comm="vhostmd" scontext=unconfined_u:system_r:vhostmd_t:s0 tcontext=unconfined_u:system_r:vhostmd_t:s0 tclass=process
----
time->Wed Nov  9 05:49:15 2011
type=SYSCALL msg=audit(1320835755.978:445730): arch=c000003e syscall=234 success=no exit=-13 a0=b24 a1=b24 a2=6 a3=8 items=0 ppid=1 pid=2852 auid=0 uid=112 gid=112 euid=112 suid=112 fsuid=112 egid=112 sgid=112 fsgid=112 tty=(none) ses=115 comm="vhostmd" exe="/usr/sbin/vhostmd" subj=unconfined_u:system_r:vhostmd_t:s0 key=(null)
type=AVC msg=audit(1320835755.978:445730): avc:  denied  { signal } for  pid=2852 comm="vhostmd" scontext=unconfined_u:system_r:vhostmd_t:s0 tcontext=unconfined_u:system_r:vhostmd_t:s0 tclass=process
----

Expected results:
* no AVCs

Comment 1 Miroslav Grepl 2011-11-09 11:39:44 UTC
Does it work with these AVC msgs?

Comment 3 Milos Malik 2011-11-09 12:30:24 UTC
It works in permissive mode. In enforcing mode the daemon simply dies.

Comment 4 Miroslav Grepl 2011-11-09 12:41:05 UTC
I mean if you create a local policy from these AVC msgs.

Comment 5 Milos Malik 2011-11-09 12:58:56 UTC
Following policy module solved the problem. The daemon is running and AVCs do not appear any more.

module mypolicy 1.0;

require {
        type vhostmd_t;
        type random_device_t;
        class process signal;
        class chr_file read;
}

#============= vhostmd_t ==============
allow vhostmd_t random_device_t:chr_file read;
allow vhostmd_t self:process signal;

Comment 6 Miroslav Grepl 2011-11-09 15:17:17 UTC
Fixed in selinux-policy-3.7.19-125.el6

Comment 9 errata-xmlrpc 2011-12-06 10:20:57 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-2011-1511.html