Bug 355651

Summary: hcid not allowed to remove file
Product: [Fedora] Fedora Reporter: Ulrich Drepper <drepper>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: bnocera
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Current Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-30 19:21:03 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 Ulrich Drepper 2007-10-28 05:28:00 UTC
Description of problem:
I got AVC when using bluetooth to transport data from or to a phone.

Version-Release number of selected component (if applicable):
selinux-policy-targeted-3.0.8-33.fc8.noarch

How reproducible:
Haven't explicitly tried but seems to have happened multiple times.

Steps to Reproduce:
1.I guess, try to connect phone and computer.
2.
3.
  
Actual results:
AVC, see below.

Expected results:
No AVC.

Additional info:
Summary
    SELinux is preventing hcid (bluetooth_t) "unlink" to <Unknown> (var_run_t).

Detailed Description
    SELinux denied access requested by hcid. It is not expected that this access
    is required by hcid and this access may signal an intrusion attempt. It is
    also possible that the specific version or configuration of the application
    is causing it to require additional access.

Allowing Access
    Sometimes labeling problems can cause SELinux denials.  You could try to
    restore the default system file context for <Unknown>, restorecon -v
    <Unknown> If this does not work, there is currently no automatic way to
    allow this access. Instead,  you can generate a local policy module to allow
    this access - see http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385
    Or you can disable SELinux protection altogether. Disabling SELinux
    protection is not recommended. Please file a
    http://bugzilla.redhat.com/bugzilla/enter_bug.cgi against this package.

Additional Information        

Source Context                system_u:system_r:bluetooth_t:s0
Target Context                system_u:object_r:var_run_t:s0
Target Objects                None [ file ]
Affected RPM Packages         
Policy RPM                    selinux-policy-3.0.8-32.fc8
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   plugins.catchall_file
Host Name                     x61.akkadia.org
Platform                      Linux x61.akkadia.org 2.6.23.1-31.fc8 #1 SMP Tue
                              Oct 23 14:54:38 EDT 2007 x86_64 x86_64
Alert Count                   1
First Seen                    Thu 25 Oct 2007 07:49:32 AM PDT
Last Seen                     Thu 25 Oct 2007 07:49:32 AM PDT
Local ID                      abd7c26b-61ec-4665-8d84-a575597db4cb
Line Numbers                  

Raw Audit Messages            

avc: denied { unlink } for comm=hcid dev=sda5 name=bluetoothd_address pid=1919
scontext=system_u:system_r:bluetooth_t:s0 tclass=file
tcontext=system_u:object_r:var_run_t:s0

Comment 1 Daniel Walsh 2007-10-30 02:26:35 UTC
hcid is trying to delete /var/run/bluetoothd_address

This is a new file?  Which does not have the correct label on it.  If you remove
the file and restart the service everything should work.  I will fix the labeling.

Fixed in selinux-policy-3.0.8-40.fc8.src.rpm


Comment 2 Daniel Walsh 2008-01-30 19:21:03 UTC
Bulk closing all bugs in Fedora updates in the modified state.  If you bug is
not fixed, please reopen.