Bug 1756463

Summary: SELinux is preventing systemd-logind from 'read' accesses on the blk_file mmcblk0p1.
Product: [Fedora] Fedora Reporter: rvbhute
Component: selinux-policyAssignee: Patrik Koncity <pkoncity>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 31CC: dwalsh, lvrabec, mailinglists35, mgrepl, plautrba, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:b70851ec7665187712cb43a73dacc9b71315d967329365a27b2532781e33de65;
Fixed In Version: selinux-policy-3.14.4-39.fc31 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-29 01:27:59 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 rvbhute 2019-09-27 17:15:51 UTC
Description of problem:
Installed Fedora 31 Xfce Beta. This error came on first login.
SELinux is preventing systemd-logind from 'read' accesses on the blk_file mmcblk0p1.

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

If you believe that systemd-logind should be allowed read access on the mmcblk0p1 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:removable_device_t:s0
Target Objects                mmcblk0p1 [ 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.4-31.fc31.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.3.0-0.rc6.git0.1.fc31.x86_64 #1
                              SMP Mon Aug 26 13:01:25 UTC 2019 x86_64 x86_64
Alert Count                   1
First Seen                    2019-09-27 22:38:48 IST
Last Seen                     2019-09-27 22:38:48 IST
Local ID                      731d50ad-93d9-407c-b165-76b702e5c6a7

Raw Audit Messages
type=AVC msg=audit(1569604128.505:198): avc:  denied  { read } for  pid=780 comm="systemd-logind" name="mmcblk0p1" dev="devtmpfs" ino=14079 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:removable_device_t:s0 tclass=blk_file permissive=0


Hash: systemd-logind,systemd_logind_t,removable_device_t,blk_file,read

Version-Release number of selected component:
selinux-policy-3.14.4-31.fc31.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.10.1
hashmarkername: setroubleshoot
kernel:         5.3.0-0.rc6.git0.1.fc31.x86_64
type:           libreport

Potential duplicate: bug 1652616

Comment 1 Lukas Vrabec 2019-10-02 10:51:47 UTC
Hi, 

Are you able to reproduce it with every login? 

THanks,
Lukas.

Comment 2 rvbhute 2019-10-02 17:22:44 UTC
Yes, it happens on every login.

Comment 3 Lukas Vrabec 2019-10-04 15:27:17 UTC
commit 15a5bb0236df39bd14afbfb918514988b53951ce (HEAD -> rawhide, origin/rawhide)
Author: Patrik Koncity <pkoncity>
Date:   Fri Oct 4 15:07:02 2019 +0200

    Allow systemd_logind_t domain to read blk_files in domain removable_device_t
    
    Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1756463

Comment 4 Fedora Update System 2019-10-22 19:32:47 UTC
FEDORA-2019-7ef1fde499 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-7ef1fde499

Comment 5 Fedora Update System 2019-10-23 15:44:45 UTC
selinux-policy-3.14.4-38.fc31 has been pushed to the Fedora 31 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-2019-7ef1fde499

Comment 6 Fedora Update System 2019-10-26 16:59:33 UTC
FEDORA-2019-7d65c50fd6 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-7d65c50fd6

Comment 7 Fedora Update System 2019-10-27 04:02:58 UTC
selinux-policy-3.14.4-39.fc31 has been pushed to the Fedora 31 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-2019-7d65c50fd6

Comment 8 Fedora Update System 2019-10-29 01:27:59 UTC
selinux-policy-3.14.4-39.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.