Bug 184536

Summary: setenforce 0 causes system hang
Product: [Fedora] Fedora Reporter: Brian Brock <bbrock>
Component: xenAssignee: James Morris <jmorris>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: bstein, katzj, riel, sct
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.6.16-2080_FC5xen0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-04-24 15:24:26 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:
Bug Depends On:    
Bug Blocks: 185595    

Description Brian Brock 2006-03-09 18:25:48 UTC
running `setenforce 0` causes a system to hang

kernel-xen0-2.6.15-1.2032_FC5
audit-libs-python-1.1.5-1
audit-libs-1.1.5-1
selinux-policy-2.2.23-11
selinux-policy-targeted-2.2.23-11
libselinux-1.29.7-1.2
libselinux-python-1.29.7-1.2

boot kernel-xen0-2.6.15-1.2032_FC5 system with no selinux options specified.
run `getenforce`
run `setenforce 0`

# getenforce
Enforcing
# setenforce 0
audit(timestamp): avc: granted { granted } for pid=2398 comm="setenforce"
scontext=root:system_r:undefined_t:s0-s0:c0.255
tcontext=system_u:object_r:security_t:s0 tclass=security
<system is now hardlocked>

fully reproducible

Expected results:
no hard locking executing admin commands

Comment 1 Jeremy Katz 2006-03-09 18:27:31 UTC
Anything on serial console?

Comment 2 Brian Brock 2006-03-09 18:44:54 UTC
nothing output to serial console.

disable the xen serial console during boot stops it.  Here's my current
grub.conf boot stanzas:
title Fedora Core (2.6.15-1.2032_FC5xen0) noserial
        root (hd0,0)
        kernel /xen.gz-2.6.15-1.2032_FC5
        module /vmlinuz-2.6.15-1.2032_FC5xen0 ro root=LABEL=/1
        module /initrd-2.6.15-1.2032_FC5xen0.img
title Fedora Core (2.6.15-1.2032_FC5xen0)
        root (hd0,0)
        kernel /xen.gz-2.6.15-1.2032_FC5 com1=115200,8n1
        module /vmlinuz-2.6.15-1.2032_FC5xen0 ro root=LABEL=/1 console=ttyS0
console=tty0
        module /initrd-2.6.15-1.2032_FC5xen0.img

The first reliably works.  The second reliably hangs, but generates serial
output (including the (XEN) section) until just befere the hang.

Comment 3 Brian Brock 2006-03-09 18:54:42 UTC
hang does not occur if 'sync_console' is appended to the kernel line in grub.conf

Comment 5 James Morris 2006-03-22 21:50:00 UTC
Do you know if you had auditd running?

Comment 6 James Morris 2006-03-22 22:27:39 UTC
I've not been able to reproduce this with FC5.

Let me know if you still see it.

Comment 7 Brian Brock 2006-04-24 15:24:26 UTC
Haven't reproduced this with FC-5 GA or with current rawhide.