Bug 520901

Summary: setroubleshoot: SELinux is preventing bluetoothd "write" access to device rfkill.
Product: [Fedora] Fedora Reporter: Matěj Cepl <mcepl>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: dwalsh, jkubin, mcepl, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:701bf7059b08bd17471524c83a21f6d2ea68218ce4b78920dcdf9083a10feeb7
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-08 10:17:44 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:

Description Matěj Cepl 2009-09-02 19:43:48 UTC
The following was filed automatically by setroubleshoot:

Souhrn:

SELinux is preventing bluetoothd "write" access to device rfkill.

Podrobný popis:

[SELinux is in permissive mode. This access was not denied.]

SELinux has denied bluetoothd "write" access to device rfkill. rfkill is
mislabeled, this device has the default label of the /dev directory, which
should not happen. All Character and/or Block Devices should have a label. You
can attempt to change the label of the file using restorecon -v 'rfkill'. If
this device remains labeled device_t, then this is a bug in SELinux policy.
Please file a bug report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi)
against the selinux-policy package. If you look at the other similar devices
labels, ls -lZ /dev/SIMILAR, and find a type that would work for rfkill, you can
use chcon -t SIMILAR_TYPE 'rfkill', If this fixes the problem, you can make this
permanent by executing semanage fcontext -a -t SIMILAR_TYPE 'rfkill' If the
restorecon changes the context, this indicates that the application that created
the device, created it without using SELinux APIs. If you can figure out which
application created the device, please file a bug report
(http://bugzilla.redhat.com/bugzilla/enter_bug.cgi) against this application.

Povolení přístupu:

Attempt restorecon -v 'rfkill' or chcon -t SIMILAR_TYPE 'rfkill'

Další informace:

Kontext zdroje                system_u:system_r:bluetooth_t:s0-s0:c0.c1023
Kontext cíle                 system_u:object_r:device_t:s0
Objekty cíle                 rfkill [ chr_file ]
Zdroj                         bluetoothd
Cesta zdroje                  /usr/sbin/bluetoothd
Port                          <Neznámé>
Počítač                    (removed)
RPM balíčky zdroje          bluez-4.47-6.fc12
RPM balíčky cíle           
RPM politiky                  selinux-policy-3.6.28-9.fc12
Selinux povolen               True
Typ politiky                  targeted
MLS povoleno                  True
Vynucovací režim            Permissive
Název zásuvného modulu     device
Název počítače            (removed)
Platforma                     Linux (removed) 2.6.31-0.190.rc8.fc12.x86_64 #1 SMP
                              Fri Aug 28 18:51:58 EDT 2009 x86_64 x86_64
Počet upozornění           2
Poprvé viděno               Út 1. září 2009, 07:25:01 CEST
Naposledy viděno             Út 1. září 2009, 07:25:01 CEST
Místní ID                   a5d1d4f4-2acf-48ba-8663-e4d7acd099e1
Čísla řádků              

Původní zprávy auditu      

node=(removed) type=AVC msg=audit(1251782701.97:206): avc:  denied  { write } for  pid=8066 comm="bluetoothd" name="rfkill" dev=tmpfs ino=9102 scontext=system_u:system_r:bluetooth_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file

node=(removed) type=AVC msg=audit(1251782701.97:206): avc:  denied  { open } for  pid=8066 comm="bluetoothd" name="rfkill" dev=tmpfs ino=9102 scontext=system_u:system_r:bluetooth_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file

node=(removed) type=SYSCALL msg=audit(1251782701.97:206): arch=c000003e syscall=2 success=yes exit=15 a0=7fed8eec2690 a1=2 a2=7fed8f2ab160 a3=7fffdf25b8c0 items=0 ppid=1 pid=8066 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="bluetoothd" exe="/usr/sbin/bluetoothd" subj=system_u:system_r:bluetooth_t:s0-s0:c0.c1023 key=(null)


audit2allow suggests:

#============= bluetooth_t ==============
allow bluetooth_t device_t:chr_file { write open };

Comment 1 Daniel Walsh 2009-09-08 10:17:44 UTC

*** This bug has been marked as a duplicate of bug 520900 ***