Bug 1631376

Summary: SELinux is preventing agetty from 'read' accesses on the lnk_file motd.
Product: [Fedora] Fedora Reporter: Stephen Gallagher <sgallagh>
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, sumitkbhardwaj
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:5845981392c4259453b4b5875f2b539960a4f57d514733401e578082f3a4c0f1;VARIANT_ID=workstation;
Fixed In Version: selinux-policy-3.14.2-37.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 17:23:27 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 Stephen Gallagher 2018-09-20 12:50:17 UTC
Description of problem:
Cockpit places a symlink in /etc/issue.d/cockpit.issue to /run/cockpit/motd which is intended
to show the admin console URL on the non-graphical login console of the system. The
selinux policy is now denying agetty the ability to read this file, which it was allowing
properly in the past.
SELinux is preventing agetty from 'read' accesses on the lnk_file motd.

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

If you believe that agetty should be allowed read access on the motd lnk_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 'agetty' --raw | audit2allow -M my-agetty
# semodule -X 300 -i my-agetty.pp

Additional Information:
Source Context                system_u:system_r:getty_t:s0-s0:c0.c1023
Target Context                system_u:object_r:cockpit_var_run_t:s0
Target Objects                motd [ lnk_file ]
Source                        agetty
Source Path                   agetty
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.2-35.fc29.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.18.7-300.fc29.x86_64 #1 SMP Mon
                              Sep 10 15:37:17 UTC 2018 x86_64 x86_64
Alert Count                   1
First Seen                    2018-09-20 08:47:18 EDT
Last Seen                     2018-09-20 08:47:18 EDT
Local ID                      2bae4d9c-054a-48a9-be58-6877cdf70a71

Raw Audit Messages
type=AVC msg=audit(1537447638.112:320): avc:  denied  { read } for  pid=3707 comm="agetty" name="motd" dev="tmpfs" ino=30806 scontext=system_u:system_r:getty_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cockpit_var_run_t:s0 tclass=lnk_file permissive=0


Hash: agetty,getty_t,cockpit_var_run_t,lnk_file,read

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

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

Comment 1 Sumit Bhardwaj 2018-10-01 16:16:49 UTC
Description of problem:
I just started my system and after login, got this message.

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

Additional info:
reporter:       libreport-2.9.5
hashmarkername: setroubleshoot
kernel:         4.18.10-300.fc29.x86_64
type:           libreport

Comment 2 Fedora Update System 2018-10-10 07:48:08 UTC
selinux-policy-3.14.2-37.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-b1d8c6335d

Comment 3 Fedora Update System 2018-10-10 15:50:17 UTC
selinux-policy-3.14.2-37.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-b1d8c6335d

Comment 4 Fedora Update System 2018-10-30 17:23:27 UTC
selinux-policy-3.14.2-37.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.