Bug 1945685 - plymouth should transition to system_u:system_r:plymouthd_t:s0 once the rootfs is mounted
Summary: plymouth should transition to system_u:system_r:plymouthd_t:s0 once the rootf...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: plymouth
Version: 40
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Ray Strode [halfline]
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-01 16:07 UTC by Hans de Goede
Modified: 2024-05-01 11:38 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1945585 1 medium CLOSED selinux-policy is blocking plymouth from starting /usr/libexec/plymouth/plymouthd-drm-escrow 2021-04-05 00:17:53 UTC

Description Hans de Goede 2021-04-01 16:07:41 UTC
This is not really a selinux-polciy bug, although it will probably require selinux-policy changes.

During my recent work on plymouth (see bug 1945585) it has become clear to me that plymouthd does not run under the system_u:system_r:plymouthd_t:s0 context when it is started from the initrd; and by default Fedora always uses an initrd so that means that when plymouthd is running to display the boot-splash it is never running as
system_u:system_r:plymouthd_t:s0, but instead it is running in the default context.

This is understandable because the selinux-policy is only loaded once the rootfs has been mounted.

plymouth already gets a message from a special service once the rootfs has been mounted read-write, so that it can e.g. start writing debug logs there if debugging is enabled.

I was thinking that given that there is a whole selinux-policy for plymouth, it would be good if plymouth would transition to the system_u:system_r:plymouthd_t:s0 context once the selinux policy has been loaded.

So some questions for the selinux people:

1. Do you agree that doing such a transition would be a good idea ?
2. Are you aware of other daemons doing something similar and can you point me to some example code?

Comment 1 Ben Cotton 2021-08-10 13:46:28 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 35 development cycle.
Changing version to 35.

Comment 2 Petr Lautrbach 2022-03-03 10:22:03 UTC
So the plymouthd started from initramfs runs with system_u:system_r:kernel_t:s0.

I think it's a good idea to do the transition as soon as possible.

There are basically 2 ways how to do it:

1. re-exec - plymouthd would need to re-exec itself after a policy a loaded. In this case the transition would be handled automatically by a kernel. afaik systemd does re-exec after switch-root when the policy is loaded -   this would be preferred.

2. plymouthd could transition to the new domain using setcon()

Comment 3 Zdenek Pytela 2022-04-19 19:20:45 UTC
Switching the component based on #c2.
Let us know if the agreed change needs to be backed by a selinux-policy rule, too.

Comment 4 Ben Cotton 2022-08-09 13:36:42 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle.
Changing version to 37.

Comment 5 Aoife Moloney 2023-11-23 00:05:13 UTC
This message is a reminder that Fedora Linux 37 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 37 on 2023-12-05.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '37'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 37 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 6 Hans de Goede 2023-11-23 09:22:58 UTC
This is still relevant / still needs to be fixed, changing version to rawhide.

Comment 7 Aoife Moloney 2024-02-15 22:53:56 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle.
Changing version to 40.


Note You need to log in before you can comment on or make changes to this bug.