Bug 1276451 - SELinux is preventing systemd-localed from 'ioctl' accesses on the file /sys/fs/kdbus/0-system/bus.
SELinux is preventing systemd-localed from 'ioctl' accesses on the file /sys/...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2015-10-29 14:15 EDT by Ömer Fadıl Usta
Modified: 2016-01-21 10:47 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-01-21 10:47:08 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ömer Fadıl Usta 2015-10-29 14:15:33 EDT
Description of problem:
after enabling kdbus
SELinux is preventing systemd-localed from 'ioctl' accesses on the file /sys/fs/kdbus/0-system/bus.

*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/sys/fs/kdbus/0-system/bus default label should be sysfs_t.
Then you can run restorecon.
# /sbin/restorecon -v /sys/fs/kdbus/0-system/bus

*****  Plugin catchall (1.49 confidence) suggests   **************************

If you believe that systemd-localed should be allowed ioctl access on the bus file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# grep systemd-localed /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:systemd_localed_t:s0
Target Context                system_u:object_r:kdbusfs_t:s0
Target Objects                /sys/fs/kdbus/0-system/bus [ file ]
Source                        systemd-localed
Source Path                   systemd-localed
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-156.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.3.0-0.rc7.git1.1.fc24.x86_64 #1
                              SMP Tue Oct 27 16:50:25 UTC 2015 x86_64 x86_64
Alert Count                   4
First Seen                    2015-10-29 21:05:56 EEST
Last Seen                     2015-10-29 21:08:57 EEST
Local ID                      b141cbc2-8715-48d7-a4a1-6720df4e046a

Raw Audit Messages
type=AVC msg=audit(1446142137.721:654): avc:  denied  { ioctl } for  pid=2926 comm="systemd-localed" path="/sys/fs/kdbus/0-system/bus" dev="kdbusfs" ino=4 ioctlcmd=9582 scontext=system_u:system_r:systemd_localed_t:s0 tcontext=system_u:object_r:kdbusfs_t:s0 tclass=file permissive=1

Hash: systemd-localed,systemd_localed_t,kdbusfs_t,file,ioctl

Version-Release number of selected component:

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.3.0-0.rc7.git1.1.fc24.x86_64
type:           libreport
Comment 1 Miroslav Grepl 2016-01-21 10:47:08 EST
kdbus has been dropped for F24.

If you want to allow it, please add a local policy.

# grep kdbus /var/log/audit/audit.log | audit2allow -M mykdbus
# semodule -i mykdbus.pp

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