Bug 1645567

Summary: SELinux is preventing systemd-logind from 'ioctl' accesses on the blk_file /dev/nvme0n1.
Product: [Fedora] Fedora Reporter: Braden McDaniel <braden>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 29CC: dwalsh, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:1dd6dcbd0965feebdf545602a891d2e85e9a28eb1c2db38a0a4b37035fb71526;VARIANT_ID=workstation;
Fixed In Version: selinux-policy-3.14.2-41.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-07 02:41:39 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 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>
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.