Bug 2280933

Summary: SELinux is preventing /usr/lib/systemd/systemd-journald from 'ioctl' accesses on the file /usr/lib/systemd/journald.conf.
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:501159d1bf9fc160ec537a4ff5ed7bd572ba94dbdef4a1e2bfdac20b6058e630;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:52:41 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:53:55 UTC
Description of problem:
 Dnf running trigger-install scriptlet
SELinux is preventing /usr/lib/systemd/systemd-journald from 'ioctl' accesses on the file /usr/lib/systemd/journald.conf.

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

If you believe that systemd-journald should be allowed ioctl access on the journald.conf file 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-journal' --raw | audit2allow -M my-systemdjournal
# semodule -X 300 -i my-systemdjournal.pp

Additional Information:
Source Context                system_u:system_r:syslogd_t:s0
Target Context                system_u:object_r:init_exec_t:s0
Target Objects                /usr/lib/systemd/journald.conf [ file ]
Source                        systemd-journal
Source Path                   /usr/lib/systemd/systemd-journald
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-256~rc2-1.fc41.x86_64
Target RPM Packages           systemd-256~rc2-1.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                   1
First Seen                    2024-05-17 11:53:03 +05
Last Seen                     2024-05-17 11:53:03 +05
Local ID                      d1e5c5b0-0913-4ebf-856d-7ff24b8394bd

Raw Audit Messages
type=AVC msg=audit(1715928783.451:1119): avc:  denied  { ioctl } for  pid=122215 comm="systemd-journal" path="/usr/lib/systemd/journald.conf" dev="nvme1n1p2" ino=1201019 ioctlcmd=0x5401 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:init_exec_t:s0 tclass=file permissive=1


type=SYSCALL msg=audit(1715928783.451:1119): arch=x86_64 syscall=ioctl success=no exit=ENOTTY a0=6e a1=5401 a2=7ffc4aee2d20 a3=4 items=0 ppid=1 pid=122215 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemd-journal exe=/usr/lib/systemd/systemd-journald subj=system_u:system_r:syslogd_t:s0 key=(null)

Hash: systemd-journal,syslogd_t,init_exec_t,file,ioctl

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/systemd-journald from 'ioctl' accesses on the file /usr/lib/systemd/journald.conf.
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:53:58 UTC
Created attachment 2033645 [details]
File: description

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

Comment 3 Zdenek Pytela 2024-05-17 17:52:41 UTC

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