Bug 1946020 - SELinux is preventing brltty from 'create' accesses on the bluetooth_socket labeled brltty_t.
Summary: SELinux is preventing brltty from 'create' accesses on the bluetooth_socket l...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 33
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:44ef6b930993f946970d4152677...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-03 15:33 UTC by Francisco Tissera
Modified: 2021-05-09 01:15 UTC (History)
8 users (show)

Fixed In Version: selinux-policy-3.14.6-37.fc33
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-09 01:15:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Francisco Tissera 2021-04-03 15:33:23 UTC
Description of problem:
SELinux is preventing brltty from 'create' accesses on the bluetooth_socket labeled brltty_t.

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

If you believe that brltty should be allowed create access on bluetooth_socket labeled brltty_t 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:
# ausearch -c 'brltty' --raw | audit2allow -M my-brltty
# semodule -X 300 -i my-brltty.pp

Additional Information:
Source Context                system_u:system_r:brltty_t:s0
Target Context                system_u:system_r:brltty_t:s0
Target Objects                Unknown [ bluetooth_socket ]
Source                        brltty
Source Path                   brltty
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-3.14.6-36.fc33.noarch
Local Policy RPM              selinux-policy-targeted-3.14.6-36.fc33.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.11.11-200.fc33.x86_64 #1 SMP Tue
                              Mar 30 16:53:32 UTC 2021 x86_64 x86_64
Alert Count                   12
First Seen                    2021-04-03 17:21:40 CEST
Last Seen                     2021-04-03 17:22:35 CEST
Local ID                      846027de-4cb8-401d-85f4-6d5dccdd8f40

Raw Audit Messages
type=AVC msg=audit(1617463355.470:556): avc:  denied  { create } for  pid=697 comm="brltty" scontext=system_u:system_r:brltty_t:s0 tcontext=system_u:system_r:brltty_t:s0 tclass=bluetooth_socket permissive=0


Hash: brltty,brltty_t,brltty_t,bluetooth_socket,create
							

Version-Release number of selected component:
selinux-policy-targeted-3.14.6-36.fc33.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.14.0
hashmarkername: setroubleshoot
kernel:         5.11.11-200.fc33.x86_64
type:           libreport

Comment 1 Zdenek Pytela 2021-04-06 16:43:44 UTC
Francisco,

Can you switch the system into SELinux permissive mode, or create a custom policy:

# cat local_brltty.cil
(allow brltty_t brltty_t (bluetooth_socket (create ioctl read getattr lock write setattr append bind connect getopt setopt shutdown)))
# semodule -i local_brltty.cil

to check if there are any additional denials?


I've submitted a Fedora PR to address the issue:
https://github.com/fedora-selinux/selinux-policy/pull/682

Comment 2 Francisco Tissera 2021-04-07 13:48:50 UTC
Hello there,

Since I do not need selinux for anything, I completely disabled it, and everything after that was fine.
I simply wanted to report it so you'd be aware of it.
Thank you and kind regards.

Comment 3 Zdenek Pytela 2021-04-07 14:05:32 UTC
Francisco,

Thank you for the report, the PR is already there and the fix, hopefully complete, will be a part of the next build.

Comment 4 Zdenek Pytela 2021-04-09 13:22:47 UTC
Backported to F33.

Comment 5 Fedora Update System 2021-04-28 11:34:11 UTC
FEDORA-2021-050d4e8def has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-050d4e8def

Comment 6 Fedora Update System 2021-04-29 01:45:47 UTC
FEDORA-2021-050d4e8def has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-050d4e8def`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-050d4e8def

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2021-05-09 01:15:13 UTC
FEDORA-2021-050d4e8def has been pushed to the Fedora 33 stable repository.
If problem still persists, 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.