Bug 1258089 - SELinux is preventing bluetooth from 'connect' accesses on the socket Unknown.
Summary: SELinux is preventing bluetooth from 'connect' accesses on the socket Unknown.
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 23
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:8eac06190343a00796aff149494...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-29 00:00 UTC by Herbert Carl Meyer
Modified: 2016-12-20 14:30 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.13.1-150.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-20 14:30:38 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: mypol.te (142 bytes, text/plain)
2015-08-29 00:00 UTC, Herbert Carl Meyer
no flags Details
File: mypol.pp (855 bytes, application/octet-stream)
2015-08-29 00:00 UTC, Herbert Carl Meyer
no flags Details

Description Herbert Carl Meyer 2015-08-29 00:00:18 UTC
Description of problem:
after discovering the correct form for a bluetooth printer URI (bluetooth://001a0cc5dfdb/spp, in my case), I have configured my bluetooth printer, and am attempting to print a test page. Selinux is in enforcing mode. 
SELinux is preventing bluetooth from 'connect' accesses on the socket Unknown.

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

If you believe that bluetooth should be allowed connect access on the Unknown socket 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 bluetooth /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:cupsd_t:s0-s0:c0.c1023
Target Context                system_u:system_r:cupsd_t:s0-s0:c0.c1023
Target Objects                Unknown [ socket ]
Source                        bluetooth
Source Path                   bluetooth
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-144.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.2.0-0.rc8.git0.1.fc23.x86_64 #1
                              SMP Mon Aug 24 14:45:39 UTC 2015 x86_64 x86_64
Alert Count                   3
First Seen                    2015-08-28 17:56:21 EDT
Last Seen                     2015-08-28 19:49:35 EDT
Local ID                      2f4be09f-cf88-4942-b65e-3c15e06c6fa4

Raw Audit Messages
type=AVC msg=audit(1440805775.978:595): avc:  denied  { connect } for  pid=2652 comm="bluetooth" scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tclass=socket permissive=0


Hash: bluetooth,cupsd_t,cupsd_t,socket,connect

I have attemptted to generate a local policy module by following the above instructions, but I continue to receive this error.

Version-Release number of selected component:
selinux-policy-3.13.1-144.fc23.noarch

Additional info:
reporter:       libreport-2.6.2
hashmarkername: setroubleshoot
kernel:         4.2.0-0.rc8.git0.1.fc23.x86_64
type:           libreport

Comment 1 Herbert Carl Meyer 2015-08-29 00:00:20 UTC
Created attachment 1068178 [details]
File: mypol.te

Comment 2 Herbert Carl Meyer 2015-08-29 00:00:21 UTC
Created attachment 1068179 [details]
File: mypol.pp

Comment 3 Miroslav Grepl 2015-09-11 08:28:57 UTC
Thank you for testing.

Comment 4 Fedora Update System 2015-10-09 14:14:30 UTC
selinux-policy-3.13.1-150.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-f4305656a5

Comment 5 Fedora Update System 2015-10-11 08:25:37 UTC
selinux-policy-3.13.1-150.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update selinux-policy'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-f4305656a5

Comment 6 Herbert Carl Meyer 2015-10-12 01:30:06 UTC
not fixed yet.

rpm -qi selinux-policy returns:

Name        : selinux-policy
Version     : 3.13.1
Release     : 150.fc23
Architecture: noarch
Install Date: Sun 11 Oct 2015 08:03:28 PM EDT
Group       : System Environment/Base
Size        : 18187
License     : GPLv2+
Signature   : RSA/SHA256, Fri 09 Oct 2015 10:15:13 AM EDT, Key ID 32474cf834ec9cba
Source RPM  : selinux-policy-3.13.1-150.fc23.src.rpm
Build Date  : Thu 08 Oct 2015 10:17:50 AM EDT
Build Host  : buildvm-23.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : http://github.com/TresysTechnology/refpolicy/wiki
Summary     : SELinux policy configuration
Description :
SELinux Base package for SELinux Reference Policy - modular.
Based off of reference policy: Checked out revision  2.20091117

so update was installed. opening printer settings, attempting to print test page produces selinux alert popup with:

The Source Process: label
attempted this access: label
on this file: label

Not very informative.

The printer troubleshooter, when opened says:

Queue Not Enabled

The que 'HP-Photosmart-c5500 is not enabled. The reason giving is 'Rendering completed'

To enable it, select the 'Enabled' checkbox ...

I enabled the checkbox, the error re-occured, no new alert generated.

Alert was defective, no details appeared when the details button was pressed, alerts list is empty.

Comment 7 Fedora Update System 2015-10-13 00:04:54 UTC
selinux-policy-3.13.1-150.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Herbert Carl Meyer 2015-10-13 20:17:22 UTC
As stated in the 2015-10-11 post, this problem is not fixed, and the bug report should not be closed. Please post instructions on how to make the printer function, if you believe it fixed.

Comment 9 Lukas Vrabec 2015-11-20 14:00:24 UTC
Could you attach related AVC msgs? (#ausearch -m AVC)

Comment 10 Herbert Carl Meyer 2015-11-21 00:11:48 UTC
Using printer settings to re-enable the printer produced:

time->Fri Nov 20 19:08:37 2015
type=AVC msg=audit(1448064517.459:639): avc:  denied  { create } for  pid=3467 comm="bluetooth" scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tclass=socket permissive=0

thank you, Miroslav

Comment 11 Fedora End Of Life 2016-11-24 12:24:20 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Fedora End Of Life 2016-12-20 14:30:38 UTC
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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