Bug 2280934

Summary: SELinux is preventing /usr/lib/systemd/system-generators/systemd-sysv-generator from map_read, map_write access on the bpf /lib64/ld-linux-x86-64.so.2.
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:e5c0b29e1a31bd8b46477c142610f69758b2980b5818b6e4e2bdaba5bc313afc;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-05-17 17:56:44 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-05-17 06:54:27 UTC
Description of problem:
 Dnf running trigger-install scriptlet
SELinux is preventing /usr/lib/systemd/system-generators/systemd-sysv-generator from map_read, map_write access on the bpf /lib64/ld-linux-x86-64.so.2.

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

If you believe that systemd-sysv-generator should be allowed map_read map_write access on the ld-linux-x86-64.so.2 bpf 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 'systemd-sysv-ge' --raw | audit2allow -M my-systemdsysvge
# semodule -X 300 -i my-systemdsysvge.pp

Additional Information:
Source Context                system_u:system_r:systemd_sysv_generator_t:s0
Target Context                system_u:system_r:init_t:s0
Target Objects                /lib64/ld-linux-x86-64.so.2 [ bpf ]
Source                        systemd-sysv-ge
Source Path                   /usr/lib/systemd/system-generators/systemd-sysv-
                              generator
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-256~rc1^20240509git1781de1-2.fc41.x86_64
                              systemd-256~rc2-1.fc41.x86_64
Target RPM Packages           glibc-2.39.9000-18.fc41.x86_64
SELinux Policy RPM            selinux-policy-targeted-40.18-2.fc41.noarch
Local Policy RPM              selinux-policy-targeted-40.18-2.fc41.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 6.10.0-
                              0.rc0.20240516git3c999d1ae3c7.5.fc41.x86_64+debug
                              #1 SMP PREEMPT_DYNAMIC Thu May 16 13:41:37 UTC
                              2024 x86_64
Alert Count                   6
First Seen                    2024-05-17 11:52:50 +05
Last Seen                     2024-05-17 11:53:04 +05
Local ID                      fc88e827-c012-45cc-b827-d7360e874d5a

Raw Audit Messages
type=AVC msg=audit(1715928784.829:1139): avc:  denied  { map_read map_write } for  pid=122473 comm="systemd-sysv-ge" scontext=system_u:system_r:systemd_sysv_generator_t:s0 tcontext=system_u:system_r:init_t:s0 tclass=bpf permissive=1


type=SYSCALL msg=audit(1715928784.829:1139): arch=x86_64 syscall=execve success=yes exit=0 a0=558ee73b3510 a1=7ffc793bedb0 a2=558ee7312080 a3=558ee75712b0 items=2 ppid=122442 pid=122473 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemd-sysv-ge exe=/usr/lib/systemd/system-generators/systemd-sysv-generator subj=system_u:system_r:systemd_sysv_generator_t:s0 key=(null)

type=CWD msg=audit(1715928784.829:1139): cwd=/

type=PATH msg=audit(1715928784.829:1139): item=0 name=/usr/lib/systemd/system-generators/systemd-sysv-generator inode=1201042 dev=00:28 mode=0100755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:systemd_sysv_generator_exec_t:s0 nametype=NORMAL cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0

type=PATH msg=audit(1715928784.829:1139): item=1 name=/lib64/ld-linux-x86-64.so.2 inode=37659 dev=00:28 mode=0100755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:ld_so_t:s0 nametype=NORMAL cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0

Hash: systemd-sysv-ge,systemd_sysv_generator_t,init_t,bpf,map_read,map_write

Version-Release number of selected component:
selinux-policy-targeted-40.18-2.fc41.noarch

Additional info:
reporter:       libreport-2.17.15
reason:         SELinux is preventing /usr/lib/systemd/system-generators/systemd-sysv-generator from map_read, map_write access on the bpf /lib64/ld-linux-x86-64.so.2.
package:        selinux-policy-targeted-40.18-2.fc41.noarch
component:      selinux-policy
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.10.0-0.rc0.20240516git3c999d1ae3c7.5.fc41.x86_64+debug
comment:         Dnf running trigger-install scriptlet
component:      selinux-policy

Comment 1 Mikhail 2024-05-17 06:54:30 UTC
Created attachment 2033647 [details]
File: description

Comment 2 Mikhail 2024-05-17 06:54:32 UTC
Created attachment 2033648 [details]
File: os_info

Comment 3 Zdenek Pytela 2024-05-17 17:56:44 UTC

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