Bug 1557595

Summary: SELinux is preventing systemd-rfkill from using the 'sys_admin' capabilities.
Product: [Fedora] Fedora Reporter: Christian Kujau <redhat>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: dwalsh, lvrabec, mgrepl, mmalik, plautrba, pmoore
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:a6fb9202cab62ee4ddf1e4169f4785c093cb9ae91d57d895217c8df7e859734c;VARIANT_ID=workstation;
Fixed In Version: selinux-policy-3.13.1-283.29.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-27 20:14:57 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 Christian Kujau 2018-03-17 00:27:19 UTC
Description of problem:
In Gnome3, enable Bluetooth in the status bar or via the control center settings window. Bluetooth works, but this AVC alert pops up every time BT is enabled.
SELinux is preventing systemd-rfkill from using the 'sys_admin' capabilities.

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

If you believe that systemd-rfkill should have the sys_admin capability 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 'systemd-rfkill' --raw | audit2allow -M my-systemdrfkill
# semodule -X 300 -i my-systemdrfkill.pp

Additional Information:
Source Context                system_u:system_r:systemd_rfkill_t:s0
Target Context                system_u:system_r:systemd_rfkill_t:s0
Target Objects                Unknown [ capability ]
Source                        systemd-rfkill
Source Path                   systemd-rfkill
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-283.26.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.15.9-300.fc27.x86_64 #1 SMP Mon
                              Mar 12 17:07:55 UTC 2018 x86_64 x86_64
Alert Count                   14
First Seen                    2018-03-08 16:43:56 PST
Last Seen                     2018-03-16 17:24:10 PDT
Local ID                      b4c3e214-fdd6-4d11-9b47-450039ce0d54

Raw Audit Messages
type=AVC msg=audit(1521246250.915:2025): avc:  denied  { sys_admin } for  pid=11749 comm="systemd-rfkill" capability=21  scontext=system_u:system_r:systemd_rfkill_t:s0 tcontext=system_u:system_r:systemd_rfkill_t:s0 tclass=capability permissive=0


Hash: systemd-rfkill,systemd_rfkill_t,systemd_rfkill_t,capability,sys_admin

Version-Release number of selected component:
selinux-policy-3.13.1-283.26.fc27.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.15.9-300.fc27.x86_64
type:           libreport

Comment 1 Fedora Update System 2018-03-25 13:15:15 UTC
selinux-policy-3.13.1-283.29.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-ad9976b6a2

Comment 2 Fedora Update System 2018-03-25 22:42:49 UTC
selinux-policy-3.13.1-283.29.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-ad9976b6a2

Comment 3 Fedora Update System 2018-03-27 20:14:57 UTC
selinux-policy-3.13.1-283.29.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.