Bug 1315996

Summary: mcstrans daemon segfaults when secon -C asks for incomplete context
Product: Red Hat Enterprise Linux 7 Reporter: Milos Malik <mmalik>
Component: mcstransAssignee: Petr Lautrbach <plautrba>
Status: CLOSED WONTFIX QA Contact: Milos Malik <mmalik>
Severity: high Docs Contact:
Priority: high    
Version: 7.2CC: lvrabec, mgrepl, mmalik, plautrba
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1316680 1699784 (view as bug list) Environment:
Last Closed: 2017-06-29 12:57:02 UTC Type: Bug
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 2016-03-09 08:36:58 UTC
Description of problem:
[ 1014.283237] mcstransd[3117]: segfault at 0 ip 00007f80fe4b4341 sp 00007fff0a957348 error 4 in libc-2.17.so[7f80fe42e000+1b6000]
[ 1102.068204] mcstransd[3220]: segfault at 0 ip 00007f00ee66f341 sp 00007ffda6c364a8 error 4 in libc-2.17.so[7f00ee5e9000+1b6000]
[ 1198.803799] mcstransd[3312]: segfault at 0 ip 00007fe2a5a5c341 sp 00007fff46704b98 error 4 in libc-2.17.so[7fe2a59d6000+1b6000]
[ 1400.158179] mcstransd[3466]: segfault at 0 ip 00007ff84432c341 sp 00007ffdc72a2938 error 4 in libc-2.17.so[7ff8442a6000+1b6000]
[ 2083.961114] mcstransd[6323]: segfault at 0 ip 00007f6e9718a341 sp 00007ffd06e78a18 error 4 in libc-2.17.so[7f6e97104000+1b6000]

Version-Release number of selected component (if applicable):
RHEL-7.2
mcstrans-0.3.4-5.el7.x86_64
policycoreutils-2.2.5-20.el7.x86_64

How reproducible:
always

Steps to Reproduce:
0) get a RHEL-7.2 machine with active targeted policy
1) use the second example from the manual page of secolor.conf to create /etc/selinux/targeted/secolor.conf file
2) start mcstransd
3) run following command as common user or as root:
secon -C user_u:user_r:user_t:
4) check the status of mcstrans daemon

Actual results:
 * it segfaulted

Expected results:
 * it's running