Bug 2223894 - SELinux denials appear during the start of ipa-dnskeysyncd or ipa-ods-exporter services
Summary: SELinux denials appear during the start of ipa-dnskeysyncd or ipa-ods-exporte...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: freeipa
Version: 39
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: IPA Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-19 08:26 UTC by Milos Malik
Modified: 2024-11-27 21:16 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-11-27 21:16:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-10164 0 None None None 2023-07-19 08:29:24 UTC

Description Milos Malik 2023-07-19 08:26:58 UTC
freeipa-client-4.10.2-1.fc39.2.x86_64
freeipa-client-common-4.10.2-1.fc39.2.noarch
freeipa-common-4.10.2-1.fc39.2.noarch
freeipa-healthcheck-core-0.12-5.fc39.noarch
freeipa-selinux-4.10.2-1.fc39.2.noarch
freeipa-server-4.10.2-1.fc39.2.x86_64
freeipa-server-common-4.10.2-1.fc39.2.noarch
freeipa-server-dns-4.10.2-1.fc39.2.noarch


Reproducible: Always

Steps to Reproduce:
1. get a Fedora rawhide machine (targeted policy is active)
2. start the ipa-dnskeysyncd service (the attempt may not succeed)
3. start the ipa-ods-exporter service (the attempt may not succeed)
4. search for SELinux denials
Actual Results:  
----
type=PROCTITLE msg=audit(07/19/2023 04:22:49.595:1272) : proctitle=/usr/bin/python3 -I /usr/libexec/ipa/ipa-ods-exporter 
type=PATH msg=audit(07/19/2023 04:22:49.595:1272) : item=0 name=/sys/devices/system/cpu/possible inode=42 dev=00:15 mode=file,444 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:sysfs_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 
type=CWD msg=audit(07/19/2023 04:22:49.595:1272) : cwd=/ 
type=SYSCALL msg=audit(07/19/2023 04:22:49.595:1272) : arch=x86_64 syscall=openat success=no exit=EACCES(Permission denied) a0=AT_FDCWD a1=0x7f870a7a8a20 a2=O_RDONLY|O_CLOEXEC a3=0x0 items=1 ppid=1 pid=7516 auid=unset uid=ods gid=ods euid=ods suid=ods fsuid=ods egid=ods sgid=ods fsgid=ods tty=(none) ses=unset comm=ipa-ods-exporte exe=/usr/bin/python3.12 subj=system_u:system_r:ipa_ods_exporter_t:s0 key=(null) 
type=AVC msg=audit(07/19/2023 04:22:49.595:1272) : avc:  denied  { read } for  pid=7516 comm=ipa-ods-exporte name=possible dev="sysfs" ino=42 scontext=system_u:system_r:ipa_ods_exporter_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=0 
----
type=PROCTITLE msg=audit(07/19/2023 04:22:49.596:1273) : proctitle=/usr/bin/python3 -I /usr/libexec/ipa/ipa-ods-exporter 
type=PATH msg=audit(07/19/2023 04:22:49.596:1273) : item=0 name=/proc/stat inode=4026532026 dev=00:14 mode=file,444 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:proc_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 
type=CWD msg=audit(07/19/2023 04:22:49.596:1273) : cwd=/ 
type=SYSCALL msg=audit(07/19/2023 04:22:49.596:1273) : arch=x86_64 syscall=openat success=no exit=EACCES(Permission denied) a0=AT_FDCWD a1=0x7f870a7a2a17 a2=O_RDONLY|O_CLOEXEC a3=0x0 items=1 ppid=1 pid=7516 auid=unset uid=ods gid=ods euid=ods suid=ods fsuid=ods egid=ods sgid=ods fsgid=ods tty=(none) ses=unset comm=ipa-ods-exporte exe=/usr/bin/python3.12 subj=system_u:system_r:ipa_ods_exporter_t:s0 key=(null) 
type=AVC msg=audit(07/19/2023 04:22:49.596:1273) : avc:  denied  { read } for  pid=7516 comm=ipa-ods-exporte name=stat dev="proc" ino=4026532026 scontext=system_u:system_r:ipa_ods_exporter_t:s0 tcontext=system_u:object_r:proc_t:s0 tclass=file permissive=0 
----
type=PROCTITLE msg=audit(07/19/2023 04:22:51.842:1278) : proctitle=/usr/bin/python3 -I /usr/libexec/ipa/ipa-dnskeysyncd 
type=PATH msg=audit(07/19/2023 04:22:51.842:1278) : item=0 name=/sys/devices/system/cpu/possible inode=42 dev=00:15 mode=file,444 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:sysfs_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 
type=CWD msg=audit(07/19/2023 04:22:51.842:1278) : cwd=/ 
type=SYSCALL msg=audit(07/19/2023 04:22:51.842:1278) : arch=x86_64 syscall=openat success=no exit=EACCES(Permission denied) a0=AT_FDCWD a1=0x7eff381a8a20 a2=O_RDONLY|O_CLOEXEC a3=0x0 items=1 ppid=1 pid=7522 auid=unset uid=ods gid=named euid=ods suid=ods fsuid=ods egid=named sgid=named fsgid=named tty=(none) ses=unset comm=ipa-dnskeysyncd exe=/usr/bin/python3.12 subj=system_u:system_r:ipa_dnskey_t:s0 key=(null) 
type=AVC msg=audit(07/19/2023 04:22:51.842:1278) : avc:  denied  { read } for  pid=7522 comm=ipa-dnskeysyncd name=possible dev="sysfs" ino=42 scontext=system_u:system_r:ipa_dnskey_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=0 
----

Expected Results:  
no SELinux denials

When full auditing is enabled, SELinux denials contain the "type=PATH" records which show the accessed files:
 * https://lukas-vrabec.com/index.php/2018/07/16/how-to-enable-full-auditing-in-audit-daemon/

Comment 1 Milos Malik 2023-07-19 08:33:01 UTC
I'm guessing that glibc functions try to the access the files:

# ldd /usr/bin/python3.12
	linux-vdso.so.1 (0x00007ffc4edb6000)
	libpython3.12.so.1.0 => /lib64/libpython3.12.so.1.0 (0x00007fb55dc00000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fb55d800000)
	libm.so.6 => /lib64/libm.so.6 (0x00007fb55e347000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fb55e436000)
# strings /lib64/libc.so.6 | grep possible
I/O possible
Operation not possible due to RF-kill
/sys/devices/system/cpu/possible
# strings /lib64/libc.so.6 | grep /proc/
/proc/se
/proc/self/maps
/proc/self/task/%u/comm
/proc/self/fd
/proc/mounts
/proc/sys/kernel/rtsig-max
/proc/sys/kernel/ngroups_max
/proc/stat
/proc/self/fd/
/proc/meminfo
/proc/self/loginuid
/proc/sys/vm/overcommit_memory
#

Comment 2 Alexander Bokovoy 2023-07-19 08:34:18 UTC
Upstream issue: https://pagure.io/freeipa/issue/9386

Comment 3 Alexander Bokovoy 2023-07-19 08:35:10 UTC
This is the same as https://github.com/fedora-selinux/selinux-policy/pull/1260, we figured out the reason couple months ago but most people were on PTO.

Comment 4 Fedora Release Engineering 2023-08-16 08:13:10 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.

Comment 5 Aoife Moloney 2024-11-08 10:56:01 UTC
This message is a reminder that Fedora Linux 39 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 39 on 2024-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '39'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 39 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 6 Aoife Moloney 2024-11-27 21:16:05 UTC
Fedora Linux 39 entered end-of-life (EOL) status on 2024-11-26.

Fedora Linux 39 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


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