Bug 689113

Summary: SELinux is preventing /usr/bin/python from 'write' accesses on the file cpufv.
Product: [Fedora] Fedora Reporter: rockonthemoonfm
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: dwalsh, jskarvad, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:daa460bb9650f4f4a2f4334c03365f0f0f31ab69c38685773ef22d687447972f
Fixed In Version: selinux-policy-3.9.16-6.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-25 07:04:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description rockonthemoonfm 2011-03-19 15:54:55 UTC
SELinux is preventing /usr/bin/python from 'write' accesses on the file cpufv.

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

If you believe that python should be allowed write access on the cpufv 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 tuned /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:tuned_t:s0
Target Context                system_u:object_r:sysfs_t:s0
Target Objects                cpufv [ file ]
Source                        tuned
Source Path                   /usr/bin/python
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           python-2.7.1-6.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-1.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.38-0.rc8.git0.1.fc15.i686 #1 SMP Tue Mar 8
                              08:24:57 UTC 2011 i686 i686
Alert Count                   1
First Seen                    Sat 19 Mar 2011 04:41:49 PM CET
Last Seen                     Sat 19 Mar 2011 04:41:49 PM CET
Local ID                      757ce25b-f267-49fd-8384-193202582b06

Raw Audit Messages
type=AVC msg=audit(1300549309.448:82): avc:  denied  { write } for  pid=2848 comm="tuned" name="cpufv" dev=sysfs ino=16807 scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file


type=SYSCALL msg=audit(1300549309.448:82): arch=i386 syscall=open success=no exit=EACCES a0=9995a78 a1=8241 a2=1b6 a3=0 items=0 ppid=1 pid=2848 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=tuned exe=/usr/bin/python subj=system_u:system_r:tuned_t:s0 key=(null)

Hash: tuned,tuned_t,sysfs_t,file,write

audit2allow

#============= tuned_t ==============
allow tuned_t sysfs_t:file write;

audit2allow -R

#============= tuned_t ==============
allow tuned_t sysfs_t:file write;

Comment 1 Daniel Walsh 2011-03-21 22:04:58 UTC
Fixed in selinux-policy-3.9.16-5.fc156

Comment 2 Fedora Update System 2011-03-22 23:07:29 UTC
selinux-policy-3.9.16-6.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-6.fc15

Comment 3 Miroslav Grepl 2011-03-23 22:23:15 UTC
*** Bug 690295 has been marked as a duplicate of this bug. ***

Comment 4 Fedora Update System 2011-03-25 07:03:54 UTC
selinux-policy-3.9.16-6.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.