Bug 2292502

Summary: SELinux is preventing /usr/lib/systemd/systemd-executor from 'connectto' accesses on the unix_stream_socket /run/systemd/io.systemd.NamespaceResource.
Product: [Fedora] Fedora Reporter: Mikhail <mikhail.v.gavrilov>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dwalsh, lvrabec, mikhail.v.gavrilov, mmalik, omosnacek, pkoncity, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:6d4e48787a04804033cf20762657c0ab20558f70e40cc845366f419f4ac46e28;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-06-17 16:01: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: description
none
File: os_info none

Description Mikhail 2024-06-15 15:01:40 UTC
Description of problem:
SELinux is preventing /usr/lib/systemd/systemd-executor from 'connectto' accesses on the unix_stream_socket /run/systemd/io.systemd.NamespaceResource.

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

If you believe that systemd-executor should be allowed connectto access on the io.systemd.NamespaceResource unix_stream_socket 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 '(leshootd)' --raw | audit2allow -M my-leshootd
# semodule -X 300 -i my-leshootd.pp

Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                system_u:system_r:systemd_nsresourced_t:s0
Target Objects                /run/systemd/io.systemd.NamespaceResource [
                              unix_stream_socket ]
Source                        (leshootd)
Source Path                   /usr/lib/systemd/systemd-executor
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-256-1.fc41.x86_64
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-41.3-1.fc41.noarch
Local Policy RPM              selinux-policy-targeted-41.3-1.fc41.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 6.9.0-rc7-09-
                              5fa8a6baff817c1b427aa7a8bfc1482043be6d58+ #467 SMP
                              PREEMPT_DYNAMIC Sat Jun 15 18:01:42 +05 2024
                              x86_64
Alert Count                   1
First Seen                    2024-06-15 20:01:22 +05
Last Seen                     2024-06-15 20:01:22 +05
Local ID                      f06189ca-c4fb-4fe6-a7a3-67a8ce1b0141

Raw Audit Messages
type=AVC msg=audit(1718463682.883:474): avc:  denied  { connectto } for  pid=12275 comm="(leshootd)" path="/run/systemd/io.systemd.NamespaceResource" scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:systemd_nsresourced_t:s0 tclass=unix_stream_socket permissive=1


type=SYSCALL msg=audit(1718463682.883:474): arch=x86_64 syscall=connect success=yes exit=0 a0=7 a1=7fffc0867950 a2=33 a3=160 items=1 ppid=1 pid=12275 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=(leshootd) exe=/usr/lib/systemd/systemd-executor subj=system_u:system_r:init_t:s0 key=(null)

type=CWD msg=audit(1718463682.883:474): cwd=/

type=PATH msg=audit(1718463682.883:474): item=0 name=/run/systemd/userdb/io.systemd.NamespaceResource inode=1369 dev=00:1b mode=0140666 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:init_var_run_t:s0 nametype=NORMAL cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0

Hash: (leshootd),init_t,systemd_nsresourced_t,unix_stream_socket,connectto

Version-Release number of selected component:
selinux-policy-targeted-41.3-1.fc41.noarch

Additional info:
reporter:       libreport-2.17.15
reason:         SELinux is preventing /usr/lib/systemd/systemd-executor from 'connectto' accesses on the unix_stream_socket /run/systemd/io.systemd.NamespaceResource.
package:        selinux-policy-targeted-41.3-1.fc41.noarch
component:      selinux-policy
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.9.0-rc7-09-5fa8a6baff817c1b427aa7a8bfc1482043be6d58+
component:      selinux-policy

Comment 1 Mikhail 2024-06-15 15:01:42 UTC
Created attachment 2037447 [details]
File: description

Comment 2 Mikhail 2024-06-15 15:01:43 UTC
Created attachment 2037448 [details]
File: os_info

Comment 3 Zdenek Pytela 2024-06-17 16:01:09 UTC

*** This bug has been marked as a duplicate of bug 2290477 ***