Bug 2183752

Summary: SELinux is preventing plymouthd from 'read' accesses on the file stat.
Product: [Fedora] Fedora Reporter: Matt Fagnani <matt.fagnani>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 38CC: dwalsh, lvrabec, matt.fagnani, mmalik, omosnacek, pkoncity, vmojzis, zpytela
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:f9c692f2853e907b78b1e7f34b457c373f0b1388db354443d8a3d9cbb399cf6f;VARIANT_ID=kde;
Fixed In Version: selinux-policy-38.15-1.fc38 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-31 17:32:09 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:
Attachments:
Description Flags
File: os_info
none
File: description none

Description Matt Fagnani 2023-04-01 18:43:49 UTC
Description of problem:
I booted a Fedora 38 KDE Plasma installation with plymouth.debug=stream:/dev/null added to the 6.2.9 kernel command line as suggested by Hans de Goede at https://bugzilla.redhat.com/show_bug.cgi?id=2183743 to troubleshoot a problem with the boot splash screen showing a theme with three dots instead of the selected Spinner theme. plymouthd was denied reading cmdline repeatedly on each of a few boots with plymouth.debug=stream:/dev/null on the kernel command line.
type=AVC msg=audit(1680373014.556:258): avc:  denied  { read } for  pid=382 comm="plymouthd" name="stat" dev="proc" ino=20331 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:init_t:s0 tclass=file permissive=0

The denials didn't happen without that added to the kernel command line. I'm using the targeted policy from selinux-policy-38.9-1.fc38.noarch in enforcing mode. Hans mentioned denials like this at https://bugzilla.redhat.com/show_bug.cgi?id=1945585#c2

SELinux is preventing plymouthd from 'read' accesses on the file stat.

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

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

Additional Information:
Source Context                system_u:system_r:kernel_t:s0
Target Context                system_u:system_r:init_t:s0
Target Objects                stat [ file ]
Source                        plymouthd
Source Path                   plymouthd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-38.9-1.fc38.noarch
Local Policy RPM              selinux-policy-targeted-38.9-1.fc38.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.2.9-300.fc38.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Thu Mar 30 22:32:58 UTC 2023
                              x86_64
Alert Count                   34
First Seen                    2023-04-01 14:16:52 EDT
Last Seen                     2023-04-01 14:16:54 EDT
Local ID                      12533528-3d83-4080-af55-597e0c2c9a22

Raw Audit Messages
type=AVC msg=audit(1680373014.556:258): avc:  denied  { read } for  pid=382 comm="plymouthd" name="stat" dev="proc" ino=20331 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:init_t:s0 tclass=file permissive=0


Hash: plymouthd,kernel_t,init_t,file,read

Version-Release number of selected component:
selinux-policy-targeted-38.9-1.fc38.noarch

Additional info:
reporter:       libreport-2.17.9
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.2.9-300.fc38.x86_64
component:      selinux-policy
package:        selinux-policy-targeted-38.9-1.fc38.noarch
reason:         SELinux is preventing plymouthd from 'read' accesses on the file stat.
component:      selinux-policy

Comment 1 Matt Fagnani 2023-04-01 18:43:51 UTC
Created attachment 1955108 [details]
File: os_info

Comment 2 Matt Fagnani 2023-04-01 18:43:53 UTC
Created attachment 1955109 [details]
File: description

Comment 3 Fedora Update System 2023-05-30 19:31:29 UTC
FEDORA-2023-a19eb5132c has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-a19eb5132c

Comment 4 Fedora Update System 2023-05-31 02:50:39 UTC
FEDORA-2023-a19eb5132c has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-a19eb5132c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-a19eb5132c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2023-05-31 17:32:09 UTC
FEDORA-2023-a19eb5132c has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.