Bug 2437020

Summary: SELinux is preventing /usr/lib/systemd/systemd-machined from 'create' accesses on the directory /run/systemd/resolve.hook.
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:717ae2dd7dedd5c523467c03975f4c8bf16d79bf8cbc8c54c5cc5f77e8743149;VARIANT_ID=workstation;
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-02-05 13:27:48 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 2026-02-05 06:26:41 UTC
Description of problem:
SELinux is preventing /usr/lib/systemd/systemd-machined from 'create' accesses on the directory /run/systemd/resolve.hook.

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

If you believe that systemd-machined should be allowed create access on the resolve.hook directory 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-machine' --raw | audit2allow -M my-systemdmachine
# semodule -X 300 -i my-systemdmachine.pp

Additional Information:
Source Context                system_u:system_r:systemd_machined_t:s0
Target Context                system_u:object_r:init_var_run_t:s0
Target Objects                /run/systemd/resolve.hook [ dir ]
Source                        systemd-machine
Source Path                   /usr/lib/systemd/systemd-machined
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-container-259-9.fc44.x86_64
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-42.22-1.fc44.noarch
Local Policy RPM              selinux-policy-targeted-42.22-1.fc44.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 6.19.0-rc8-18f7fcd5e69a-v3+ #79
                              SMP PREEMPT_DYNAMIC Tue Feb 3 03:26:11 +05 2026
                              x86_64
Alert Count                   6
First Seen                    2026-02-03 01:59:28 +05
Last Seen                     2026-02-05 03:06:08 +05
Local ID                      94341c30-05cb-4139-9c72-70bd4c027500

Raw Audit Messages
type=AVC msg=audit(1770242768.609:66): avc:  denied  { create } for  pid=1566 comm="systemd-machine" name="resolve.hook" scontext=system_u:system_r:systemd_machined_t:s0 tcontext=system_u:object_r:init_var_run_t:s0 tclass=dir permissive=1


type=SYSCALL msg=audit(1770242768.609:66): arch=x86_64 syscall=mkdirat success=yes exit=0 a0=ffffff9c a1=7fff58d8a290 a2=1ed a3=7fff58d8a29d items=2 ppid=1 pid=1566 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemd-machine exe=/usr/lib/systemd/systemd-machined subj=system_u:system_r:systemd_machined_t:s0 key=(null)

type=CWD msg=audit(1770242768.609:66): cwd=/

type=PATH msg=audit(1770242768.609:66): item=0 name=/run/systemd/ inode=2 dev=00:1c mode=040755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:init_var_run_t:s0 nametype=PARENT cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0

type=PATH msg=audit(1770242768.609:66): item=1 name=/run/systemd/resolve.hook inode=4078 dev=00:1c mode=040755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:init_var_run_t:s0 nametype=CREATE cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0

Hash: systemd-machine,systemd_machined_t,init_var_run_t,dir,create

Version-Release number of selected component:
selinux-policy-targeted-42.22-1.fc44.noarch

Additional info:
reporter:       libreport-2.17.15
reason:         SELinux is preventing /usr/lib/systemd/systemd-machined from 'create' accesses on the directory /run/systemd/resolve.hook.
package:        selinux-policy-targeted-42.22-1.fc44.noarch
component:      selinux-policy
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.19.0-rc8-18f7fcd5e69a-v3+
component:      selinux-policy

Comment 1 Mikhail 2026-02-05 06:26:44 UTC
Created attachment 2128243 [details]
File: description

Comment 2 Mikhail 2026-02-05 06:26:46 UTC
Created attachment 2128244 [details]
File: os_info

Comment 3 Zdenek Pytela 2026-02-05 13:27:48 UTC

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