Bug 878486

Summary: SELinux is preventing dbus-daemon from 'write' accesses on the blk_file /dev/mmcblk0.
Product: [Fedora] Fedora Reporter: Alex Tucker <alex>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:e7c7a709029d348cff176fd7f4aad97529b00ea0c9fc1e1ad5baa6bc3ba70d7c
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-20 16:25:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: type
none
File: hashmarkername none

Description Alex Tucker 2012-11-20 14:36:27 UTC
Description of problem:
Using palimpsest to restore an image to an SD card fails if SELinux is enabled and enforcing.  Palimpsest works properly if SELinux is set to permissive.

Additional info:
libreport version: 2.0.18
kernel:         3.6.6-1.fc17.x86_64

description:
:SELinux is preventing dbus-daemon from 'write' accesses on the blk_file /dev/mmcblk0.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that dbus-daemon should be allowed write access on the mmcblk0 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 dbus-daemon /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:system_dbusd_t:s0-s0:c0.c1023
:Target Context                system_u:object_r:removable_device_t:s0
:Target Objects                /dev/mmcblk0 [ blk_file ]
:Source                        dbus-daemon
:Source Path                   dbus-daemon
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-159.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Permissive
:Host Name                     (removed)
:Platform                      Linux (removed) 3.6.6-1.fc17.x86_64 #1 SMP Mon Nov
:                              5 21:59:35 UTC 2012 x86_64 x86_64
:Alert Count                   2
:First Seen                    2012-11-20 11:40:53 GMT
:Last Seen                     2012-11-20 12:20:54 GMT
:Local ID                      3cec4651-ad51-4fd5-a6fa-26f9c7d59a5a
:
:Raw Audit Messages
:type=AVC msg=audit(1353414054.840:116): avc:  denied  { write } for  pid=900 comm="dbus-daemon" path="/dev/mmcblk0" dev="devtmpfs" ino=3640314 scontext=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:removable_device_t:s0 tclass=blk_file
:
:
:Hash: dbus-daemon,system_dbusd_t,removable_device_t,blk_file,write
:
:audit2allow
:
:#============= system_dbusd_t ==============
:allow system_dbusd_t removable_device_t:blk_file write;
:
:audit2allow -R
:
:#============= system_dbusd_t ==============
:allow system_dbusd_t removable_device_t:blk_file write;
:

Comment 1 Alex Tucker 2012-11-20 14:36:49 UTC
Created attachment 648539 [details]
File: type

Comment 2 Alex Tucker 2012-11-20 14:36:50 UTC
Created attachment 648540 [details]
File: hashmarkername

Comment 3 Miroslav Grepl 2012-11-20 15:17:18 UTC
Added.

commit 9d23e39c47ab3e81ac98cb70f6d054f0ccd24e3a
Author: Miroslav Grepl <mgrepl>
Date:   Tue Nov 20 16:15:33 2012 +0100

    Allow dbus-daemon to read/write inherited removable devices

commit f87bfa67a93985e407e0fa4a3be35ef50d27032d
Author: Miroslav Grepl <mgrepl>
Date:   Tue Nov 20 16:13:53 2012 +0100

    Add storage_rw_inherited_removable_device() interface

Comment 4 Fedora Update System 2012-11-21 11:55:04 UTC
selinux-policy-3.10.0-161.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-161.fc17

Comment 5 Alex Tucker 2012-11-21 12:30:31 UTC
selinux-policy-3.10.0-161.fc17 fixes the bug for me, thanks.

Comment 6 Fedora Update System 2012-11-22 03:58:31 UTC
Package selinux-policy-3.10.0-161.fc17:
* should fix your issue,
* was pushed to the Fedora 17 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.10.0-161.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-18787/selinux-policy-3.10.0-161.fc17
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2012-12-20 16:25:33 UTC
selinux-policy-3.10.0-161.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.