Bug 883928

Summary: tuned: please allow tuned to use lsblk
Product: [Fedora] Fedora Reporter: Jaroslav Škarvada <jskarvad>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: dominick.grift, dwalsh, jvcelak, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-18 06:55:00 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 Jaroslav Škarvada 2012-12-05 15:32:52 UTC
Description of problem:
New tuned can call lsblk (in some profiles)

Version-Release number of selected component (if applicable):
tuned-2.1.0-1
selinux-policy-3.11.1-59.fc18.noarch

How reproducible:
Always

Steps to Reproduce:
1. service tuned start
2. tuned-adm profile throughput-performance

  
Actual results:
----
type=SYSCALL msg=audit(12/05/2012 10:17:45.856:620) : arch=i386 syscall=open success=yes exit=9 a0=0xbf9346fc a1=O_RDONLY|UNKNOWN|O_CLOEXEC a2=0x1b6 a3=0x88150c0 items=0 ppid=3139 pid=4471 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=lsblk exe=/usr/bin/lsblk subj=system_u:system_r:tuned_t:s0 key=(null) 
type=AVC msg=audit(12/05/2012 10:17:45.856:620) : avc:  denied  { open } for  pid=4471 comm=lsblk path=/run/udev/data/b8:0 dev="tmpfs" ino=11638 scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=file 
type=AVC msg=audit(12/05/2012 10:17:45.856:620) : avc:  denied  { read } for  pid=4471 comm=lsblk name=b8:0 dev="tmpfs" ino=11638 scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=file 
----
type=SYSCALL msg=audit(12/05/2012 10:17:45.865:621) : arch=i386 syscall=fstat64 success=yes exit=0 a0=0x9 a1=0xbf9344e0 a2=0xb76c6000 a3=0x88150c0 items=0 ppid=3139 pid=4471 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=lsblk exe=/usr/bin/lsblk subj=system_u:system_r:tuned_t:s0 key=(null) 
type=AVC msg=audit(12/05/2012 10:17:45.865:621) : avc:  denied  { getattr } for  pid=4471 comm=lsblk path=/run/udev/data/b8:0 dev="tmpfs" ino=11638 scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=file 
----
type=SYSCALL msg=audit(12/05/2012 10:17:45.868:622) : arch=i386 syscall=stat64 success=yes exit=0 a0=0xb7776851 a1=0xbf938e00 a2=0xb76c6000 a3=0xbf9394c8 items=0 ppid=3139 pid=4471 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=lsblk exe=/usr/bin/lsblk subj=system_u:system_r:tuned_t:s0 key=(null) 
type=AVC msg=audit(12/05/2012 10:17:45.868:622) : avc:  denied  { getattr } for  pid=4471 comm=lsblk path=/run/mount/utab dev="tmpfs" ino=8598 scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:object_r:mount_var_run_t:s0 tclass=file 
----
type=SYSCALL msg=audit(12/05/2012 10:17:45.873:623) : arch=i386 syscall=open success=yes exit=9 a0=0xb7776851 a1=O_RDONLY|UNKNOWN a2=0x1b6 a3=0x8815ef8 items=0 ppid=3139 pid=4471 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=lsblk exe=/usr/bin/lsblk subj=system_u:system_r:tuned_t:s0 key=(null) 
type=AVC msg=audit(12/05/2012 10:17:45.873:623) : avc:  denied  { open } for  pid=4471 comm=lsblk path=/run/mount/utab dev="tmpfs" ino=8598 scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:object_r:mount_var_run_t:s0 tclass=file 
type=AVC msg=audit(12/05/2012 10:17:45.873:623) : avc:  denied  { read } for  pid=4471 comm=lsblk name=utab dev="tmpfs" ino=8598 scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:object_r:mount_var_run_t:s0 tclass=file 


Expected results:
No AVC

Additional info:
Encountered when running from the livecd.

Comment 1 Miroslav Grepl 2012-12-05 16:30:49 UTC
Could we test all default profiles which come from tuned pkg by default to see all AVC msgs?

Comment 2 Jaroslav Škarvada 2012-12-06 12:53:08 UTC
(In reply to comment #1)
> Could we test all default profiles which come from tuned pkg by default to
> see all AVC msgs?

Yep, this is the result of such test case run on the base profile set.

I also re-run the test on compat profiles (tuned-profiles-compat package) there are some AVCs with the spindown-disk profile (because it uses find on /etc), but we will fix this in the next tuned release, so probably no need to add selinux rules for it.

Comment 3 Miroslav Grepl 2012-12-06 15:42:25 UTC
Ok, Added.

Comment 4 Fedora Update System 2012-12-11 17:52:01 UTC
selinux-policy-3.11.1-62.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-62.fc18

Comment 5 Fedora Update System 2012-12-11 23:28:38 UTC
Package selinux-policy-3.11.1-62.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.11.1-62.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-20203/selinux-policy-3.11.1-62.fc18
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2012-12-17 17:40:24 UTC
selinux-policy-3.11.1-66.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-66.fc18

Comment 7 Fedora Update System 2012-12-18 06:55:02 UTC
selinux-policy-3.11.1-66.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.