Bug 1645567 - SELinux is preventing systemd-logind from 'ioctl' accesses on the blk_file /dev/nvme0n1.
Summary: SELinux is preventing systemd-logind from 'ioctl' accesses on the blk_file /d...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 29
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:1dd6dcbd0965feebdf545602a89...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-02 14:39 UTC by Braden McDaniel
Modified: 2018-11-07 02:41 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.14.2-41.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-07 02:41:39 UTC


Attachments (Terms of Use)

Description Braden McDaniel 2018-11-02 14:39:14 UTC
Description of problem:
Started VM in GNOME Boxes.
SELinux is preventing systemd-logind from 'ioctl' accesses on the blk_file /dev/nvme0n1.

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

If you believe that systemd-logind should be allowed ioctl access on the nvme0n1 blk_file 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-logind' --raw | audit2allow -M my-systemdlogind
# semodule -X 300 -i my-systemdlogind.pp

Additional Information:
Source Context                system_u:system_r:systemd_logind_t:s0
Target Context                system_u:object_r:nvme_device_t:s0
Target Objects                /dev/nvme0n1 [ blk_file ]
Source                        systemd-logind
Source Path                   systemd-logind
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.2-40.fc29.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.18.16-300.fc29.x86_64 #1 SMP Sat
                              Oct 20 23:24:08 UTC 2018 x86_64 x86_64
Alert Count                   36
First Seen                    2018-11-02 10:32:14 EDT
Last Seen                     2018-11-02 10:34:30 EDT
Local ID                      94fb5fd7-bff2-4c69-9b93-a02dad53dd4f

Raw Audit Messages
type=AVC msg=audit(1541169270.875:296): avc:  denied  { ioctl } for  pid=914 comm="systemd-logind" path="/dev/nvme0n1" dev="devtmpfs" ino=1592 ioctlcmd=0x1268 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:nvme_device_t:s0 tclass=blk_file permissive=0


Hash: systemd-logind,systemd_logind_t,nvme_device_t,blk_file,ioctl

Version-Release number of selected component:
selinux-policy-3.14.2-40.fc29.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.6
hashmarkername: setroubleshoot
kernel:         4.18.16-300.fc29.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2018-11-02 16:29:12 UTC
commit c6e14c8e0fe178b24a59eb98792291c7a42e5df8 (HEAD -> rawhide, origin/rawhide)
Author: Lukas Vrabec <lvrabec@redhat.com>
Date:   Fri Nov 2 17:27:57 2018 +0100

    Allow systemd_logind_t domain to read nvme devices BZ(1645567)

Comment 2 Fedora Update System 2018-11-04 10:07:24 UTC
selinux-policy-3.14.2-41.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-506e97bb9b

Comment 3 Fedora Update System 2018-11-05 04:19:42 UTC
selinux-policy-3.14.2-41.fc29 has been pushed to the Fedora 29 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-506e97bb9b

Comment 4 Fedora Update System 2018-11-07 02:41:39 UTC
selinux-policy-3.14.2-41.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, 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.