Bug 853893

Summary: SELinux AVC Denial while Anaconda is installing GRUB on Live CD KDE Spin F18 Alpha TC5
Product: [Fedora] Fedora Reporter: xset1980
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: agk, bmarzins, bmr, dominick.grift, dwalsh, dwysocha, heinzm, jonathan, lvm-team, mgrepl, msnitzer, prajnoha, prockai, zkabelac
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-20 16:24:42 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 xset1980 2012-09-03 09:21:36 UTC
Description of problem:

SELinux show a AVC Denial while Anaconda is install the grub loader, and the message is:


"
SELinux is preventing /usr/sbin/setfiles from 'read, write' accesses on the chr_file /dev/mapper/control.

*****  Plugin leaks (86.2 confidence) suggests  ******************************

If you want to ignore setfiles trying to read write access the control chr_file, because you believe it should not need this access.
Then you should report this as a bug.  
You can generate a local policy module to dontaudit this access.
Do
# grep /usr/sbin/setfiles /var/log/audit/audit.log | audit2allow -D -M mypol
# semodule -i mypol.pp

*****  Plugin catchall (14.7 confidence) suggests  ***************************

If you believe that setfiles should be allowed read write access on the control chr_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 restorecon /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c102
                              3
Target Context                system_u:object_r:lvm_control_t:s0
Target Objects                /dev/mapper/control [ chr_file ]
Source                        restorecon
Source Path                   /usr/sbin/setfiles
Port                          <Unknown>
Host                          localhost.localdomain
Source RPM Packages           policycoreutils-2.1.12-5.fc18.i686
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-7.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     localhost.localdomain
Platform                      Linux localhost.localdomain
                              3.6.0-0.rc2.git2.1.fc18.i686 #1 SMP Wed Aug 22
                              12:22:10 UTC 2012 i686 i686
Alert Count                   1
First Seen                    2012-09-03 05:12:59 EDT
Last Seen                     2012-09-03 05:12:59 EDT
Local ID                      545a01d9-0f6b-4d0b-964f-0e2e058e2b17

Raw Audit Messages
type=AVC msg=audit(1346663579.282:323): avc:  denied  { read write } for  pid=3466 comm="restorecon" path="/dev/mapper/control" dev="devtmpfs" ino=5992 scontext=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lvm_control_t:s0 tclass=chr_file


type=SYSCALL msg=audit(1346663579.282:323): arch=i386 syscall=execve success=yes exit=0 a0=974ad10 a1=974b478 a2=974b2b0 a3=974b478 items=0 ppid=3465 pid=3466 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm=restorecon exe=/usr/sbin/setfiles subj=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023 key=(null)

Hash: restorecon,setfiles_t,lvm_control_t,chr_file,read,write

audit2allow

#============= setfiles_t ==============
allow setfiles_t lvm_control_t:chr_file { read write };

audit2allow -R

#============= setfiles_t ==============
allow setfiles_t lvm_control_t:chr_file { read write };

"

Version-Release number of selected component (if applicable):

Fedora 18 Alpha TC5 Live CD KDE Spin i686
md5sum: b26a6da9d0ddbb0ed9e22212bd0f613d

How reproducible:

Always

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Daniel Walsh 2012-09-07 03:21:45 UTC
Fixed in selinux-policy-3.11.1-16.fc18.noarch

Comment 2 Fedora Update System 2012-10-23 20:33:20 UTC
selinux-policy-3.11.1-43.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-43.fc18

Comment 3 Fedora Update System 2012-10-26 15:35:49 UTC
selinux-policy-3.11.1-46.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-46.fc18

Comment 4 Fedora Update System 2012-10-26 19:25:11 UTC
Package selinux-policy-3.11.1-46.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-46.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-16862/selinux-policy-3.11.1-46.fc18
then log in and leave karma (feedback).

Comment 5 xset1980 2012-11-30 04:38:56 UTC
Fixed on Fedora 18 beta rc1

Comment 6 Fedora Update System 2012-12-20 16:24:44 UTC
selinux-policy-3.11.1-46.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.