Bug 906652 - SELinux is preventing /usr/sbin/smartd from 'read' accesses on the blk_file sdb.
Summary: SELinux is preventing /usr/sbin/smartd from 'read' accesses on the blk_file sdb.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:453735f82d817fc49574ad58f80...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-01 06:01 UTC by Steve Tyler
Modified: 2013-02-11 04:55 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-11 04:55:09 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Steve Tyler 2013-02-01 06:01:18 UTC
Description of problem:
This occurred while running qemu-kvm.
The VM was hosting the F18 installer in another VM with /dev/sdb configured as the install target.
SELinux is preventing /usr/sbin/smartd from 'read' accesses on the blk_file sdb.

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

If you believe that smartd should be allowed read access on the sdb blk_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 smartd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:fsdaemon_t:s0
Target Context                system_u:object_r:svirt_image_t:s0:c250,c697
Target Objects                sdb [ blk_file ]
Source                        smartd
Source Path                   /usr/sbin/smartd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           smartmontools-6.0-2.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-73.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.7.4-204.fc18.x86_64 #1 SMP Wed
                              Jan 23 16:44:29 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-01-31 21:52:52 PST
Last Seen                     2013-01-31 21:52:52 PST
Local ID                      10e70e46-c06b-4a33-825f-014789494157

Raw Audit Messages
type=AVC msg=audit(1359697972.253:355): avc:  denied  { read } for  pid=387 comm="smartd" name="sdb" dev="devtmpfs" ino=6522 scontext=system_u:system_r:fsdaemon_t:s0 tcontext=system_u:object_r:svirt_image_t:s0:c250,c697 tclass=blk_file


type=SYSCALL msg=audit(1359697972.253:355): arch=x86_64 syscall=open success=no exit=EACCES a0=7ff7881f8818 a1=800 a2=7ff78719d568 a3=7ff78719d568 items=0 ppid=1 pid=387 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=smartd exe=/usr/sbin/smartd subj=system_u:system_r:fsdaemon_t:s0 key=(null)

Hash: smartd,fsdaemon_t,svirt_image_t,blk_file,read

audit2allow

#============= fsdaemon_t ==============
#!!!! This avc is a constraint violation.  You will need to add an attribute to either the source or target type to make it work.
#Constraint rule: 
#	Possible cause source context and target context 'level' differ[08]
allow fsdaemon_t svirt_image_t:blk_file read;

audit2allow -R

#============= fsdaemon_t ==============
#!!!! This avc is a constraint violation.  You will need to add an attribute to either the source or target type to make it work.
#Constraint rule: 
#	Possible cause source context and target context 'level' differ[08]
allow fsdaemon_t svirt_image_t:blk_file read;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.7.4-204.fc18.x86_64
type:           libreport

Potential duplicate: bug 892525

Comment 1 Miroslav Grepl 2013-02-01 10:45:01 UTC
We allowed it in rawhide.

Comment 2 Fedora Update System 2013-02-05 09:23:35 UTC
selinux-policy-3.11.1-76.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-76.fc18

Comment 3 Fedora Update System 2013-02-08 02:35:54 UTC
Package selinux-policy-3.11.1-76.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-76.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-2101/selinux-policy-3.11.1-76.fc18
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-02-11 04:55:10 UTC
selinux-policy-3.11.1-76.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.