Bug 2365799 - SELinux is preventing systemd-user-ru from connectto access on the unix_stream_socket /systemd/userdb/io.systemd.DynamicUser
Summary: SELinux is preventing systemd-user-ru from connectto access on the unix_strea...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 42
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-05-13 05:48 UTC by Daniel Mendizabal
Modified: 2025-05-15 01:56 UTC (History)
7 users (show)

Fixed In Version: selinux-policy-41.40-1.fc42
Clone Of:
Environment:
Last Closed: 2025-05-15 01:56:00 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github fedora-selinux selinux-policy pull 2687 0 None Merged Allow systemd-user-runtime-dir connect to systemd-userdbd over a unix… 2025-05-15 06:58:42 UTC

Description Daniel Mendizabal 2025-05-13 05:48:27 UTC
SELinux is triggered when trying to login to a systemd-homed user, and the following selinux alert is being triggered:

Additional Information:
Source Context                system_u:system_r:systemd_user_runtimedir_t:s0
Target Context                system_u:system_r:kernel_t:s0
Target Objects                /systemd/userdb/io.systemd.DynamicUser [
                              unix_stream_socket ]
Source                        systemd-user-ru
Source Path                   systemd-user-ru
Port                          <Unknown>
Host                          io
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-41.39-1.fc42.noarch
Local Policy RPM              
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     io
Platform                      Linux io 6.14.5-300.fc42.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Fri May  2 14:16:46 UTC 2025
                              x86_64


type=AVC msg=audit(1747089881.911:266): avc:  denied  { connectto } for  pid=3954 comm="systemd-user-ru" path="/systemd/userdb/io.systemd.DynamicUser" scontext=system_u:system_r:systemd_user_runtimedir_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=unix_stream_socket permissive=1


Hash: systemd-user-ru,systemd_user_runtimedir_t,kernel_t,unix_stream_socket,connectto


Reproducible: Always

Steps to Reproduce:
1.Create a systemd-homed user: homectl create test (--storage luks / subvolume / directory)
2.Reboot and login to user: test
3.Run: sealert -l "*"

Comment 1 Fedora Update System 2025-05-13 19:17:57 UTC
FEDORA-2025-5e64167ac4 (selinux-policy-41.40-1.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-5e64167ac4

Comment 2 Fedora Update System 2025-05-14 02:07:55 UTC
FEDORA-2025-5e64167ac4 has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-5e64167ac4`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-5e64167ac4

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

Comment 3 Fedora Update System 2025-05-15 01:56:00 UTC
FEDORA-2025-5e64167ac4 (selinux-policy-41.40-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.


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