Bug 755161

Summary: SELinux is preventing /usr/sbin/mcelog from 'create' accesses on the file mcelog.pid.
Product: [Fedora] Fedora Reporter: macleod2486
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: bm.hartsuiker, braden, chrys87, cra, dan, danielbelton, david.m.beer, dgates, djidanetribal62, dominick.grift, dwalsh, eblake, edosurina, entropy92, eric_v2_2, fengchen_rs, frankly3d, hadfieldster, jamundso, jan.skowron, kevin.w.wall, krikoon, lb.pirat, lech.lobocki, long, marco.guazzone, mgrepl, mitr, mjs, old.uncle.z, olivares14031, owlbrudder, peter, rafiii48, rbwang1225, reis.lucia, senthilkumarsr, simon.lewis, slawomir.czarko, stehlikl, stressfreechozeme, themiskont, vbudrevic
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:ab6874de6842c8c8e44b66240e15069ef9d7035237d6939393ddd6fc565c78c9
Fixed In Version: selinux-policy-3.9.16-50.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-17 20:25:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 756088    

Description macleod2486 2011-11-19 08:22:07 UTC
SELinux is preventing /usr/sbin/mcelog from 'create' accesses on the file mcelog.pid.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that mcelog should be allowed create access on the mcelog.pid file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep mcelog /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:mcelog_t:s0
Target Context                system_u:object_r:var_run_t:s0
Target Objects                mcelog.pid [ file ]
Source                        mcelog
Source Path                   /usr/sbin/mcelog
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           mcelog-1.0-0.3.6e4e2a00.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-48.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.41.1-1.fc15.i686.PAE #1
                              SMP Fri Nov 11 21:43:42 UTC 2011 i686 i686
Alert Count                   1
First Seen                    Sat 19 Nov 2011 02:20:34 AM CST
Last Seen                     Sat 19 Nov 2011 02:20:34 AM CST
Local ID                      d6bc4a19-fa1f-4fbd-ba22-3a245fc457d0

Raw Audit Messages
type=AVC msg=audit(1321690834.768:67): avc:  denied  { create } for  pid=2317 comm="mcelog" name="mcelog.pid" scontext=system_u:system_r:mcelog_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=file


type=SYSCALL msg=audit(1321690834.768:67): arch=i386 syscall=open success=no exit=EACCES a0=805daf8 a1=241 a2=1b6 a3=0 items=0 ppid=1 pid=2317 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=mcelog exe=/usr/sbin/mcelog subj=system_u:system_r:mcelog_t:s0 key=(null)

Hash: mcelog,mcelog_t,var_run_t,file,create

audit2allow

#============= mcelog_t ==============
allow mcelog_t var_run_t:file create;

audit2allow -R

#============= mcelog_t ==============
allow mcelog_t var_run_t:file create;

Comment 1 Miroslav Grepl 2011-11-21 11:35:50 UTC
*** Bug 755244 has been marked as a duplicate of this bug. ***

Comment 2 Miroslav Grepl 2011-11-21 11:42:12 UTC
Fixed in selinux-policy-3.9.16-49.fc15

Comment 3 Daniel Belton 2011-11-21 17:59:48 UTC
Is it also fixed in Fedora 16 (as my original bug was for (Bug 755244))?

Comment 4 Miroslav Grepl 2011-11-23 07:50:29 UTC
Yes, it is.

http://koji.fedoraproject.org/koji/buildinfo?buildID=275035

Comment 5 Boy Hartsuiker 2011-11-29 12:48:53 UTC
This is not fixed with selinux-policy-3.10.0-56.fc16 and mcelog-2:1.0-0.3.6e4e2a00.fc16 installed.

Comment 6 Miroslav Grepl 2011-11-29 12:54:26 UTC
Yes, this is not fixed in -56.fc16 release but in the -58.fc16 release how I wrote in the comment #4.

execute

# yum update selinux-policy-targeted --enablerepo=updates-testing 

in F16.

Comment 7 Boy Hartsuiker 2011-11-29 13:24:09 UTC
Excuse me, I didn't pay enough attention to the version numbers.

Comment 8 Fedora Update System 2011-12-14 13:40:23 UTC
selinux-policy-3.9.16-50.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-50.fc15

Comment 9 Fedora Update System 2011-12-14 23:30:15 UTC
Package selinux-policy-3.9.16-50.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.9.16-50.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-17089/selinux-policy-3.9.16-50.fc15
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2012-01-17 20:25:54 UTC
selinux-policy-3.9.16-50.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.