Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: SELinux is preventing chcon from using the 'mac_admin' capabilities. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that chcon should have the mac_admin capability by default. Then ezt jelentenie kell, mint hibát. Hogy engedélyezze ezt a hozzáférést előállíthat egy helyi szabálymodult. Do allow this access for now by executing: # ausearch -c 'chcon' --raw | audit2allow -M my-chcon # semodule -X 300 -i my-chcon.pp Additional Information: Source Context system_u:system_r:tuned_t:s0 Target Context system_u:system_r:tuned_t:s0 Target Objects Ismeretlen [ capability2 ] Source chcon Source Path chcon Port <Ismeretlen> Host (removed) Source RPM Packages Target RPM Packages SELinux Policy RPM selinux-policy-targeted-44.8-1.fc44.noarch Local Policy RPM selinux-policy-targeted-44.8-1.fc44.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 7.2.5-200.fc44.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Sep 11 15:11:05 UTC 2026 x86_64 Alert Count 2 First Seen 2026-09-15 16:24:03 CEST Last Seen 2026-09-15 16:24:03 CEST Local ID f9142ba9-ce5e-4053-a6a4-63fed1bb3212 Raw Audit Messages type=AVC msg=audit(1789482243.483:291): avc: denied { mac_admin } for pid=1341 comm="chcon" capability=33 scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:system_r:tuned_t:s0 tclass=capability2 permissive=0 Hash: chcon,tuned_t,tuned_t,capability2,mac_admin Version-Release number of selected component: selinux-policy-targeted-44.8-1.fc44.noarch Additional info: reporter: libreport-2.17.15 reason: SELinux is preventing chcon from using the 'mac_admin' capabilities. package: selinux-policy-targeted-44.8-1.fc44.noarch hashmarkername: setroubleshoot component: selinux-policy type: libreport kernel: 7.2.5-200.fc44.x86_64 component: selinux-policy
Created attachment 2157764 [details] File: os_info
Created attachment 2157765 [details] File: description
The following SELinux denial appears in enforcing mode: ---- type=PROCTITLE msg=audit(09/16/2026 16:16:05.827:1415) : proctitle=chcon -t invalid_bootcinstall_testlabel_t /tmp/.tmp1Yvsjm type=PATH msg=audit(09/16/2026 16:16:05.827:1415) : item=0 name=/tmp/.tmp1Yvsjm inode=46109 dev=00:2b mode=file,600 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:tuned_tmp_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 type=CWD msg=audit(09/16/2026 16:16:05.827:1415) : cwd=/ type=SYSCALL msg=audit(09/16/2026 16:16:05.827:1415) : arch=x86_64 syscall=setxattr success=no exit=EINVAL(Invalid argument) a0=0x55604ebdc110 a1=0x7fbfcd14406f a2=0x55604ebdda00 a3=0x36 items=1 ppid=244209 pid=244214 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=chcon exe=/usr/bin/chcon subj=system_u:system_r:tuned_t:s0 key=(null) type=SELINUX_ERR msg=audit(09/16/2026 16:16:05.827:1415) : op=setxattr invalid_context=system_u:object_r:invalid_bootcinstall_testlabel_t:s0 type=AVC msg=audit(09/16/2026 16:16:05.827:1415) : avc: denied { mac_admin } for pid=244214 comm=chcon capability=mac_admin scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:system_r:tuned_t:s0 tclass=capability2 permissive=0 ---- # rpm -qa seli\* tuned\* | sort selinux-policy-44.8-1.fc44.noarch selinux-policy-devel-44.8-1.fc44.noarch selinux-policy-doc-44.8-1.fc44.noarch selinux-policy-targeted-44.8-1.fc44.noarch tuned-2.28.0-1.fc44.noarch tuned-gtk-2.28.0-1.fc44.noarch tuned-ppd-2.28.0-1.fc44.noarch tuned-utils-2.28.0-1.fc44.noarch #
The tuned package brings many plugins. One of them calls the bootc command if it's installed: # rpm -qla tuned\* | grep bootloader /usr/lib/python3.14/site-packages/tuned/plugins/__pycache__/plugin_bootloader.cpython-314.opt-1.pyc /usr/lib/python3.14/site-packages/tuned/plugins/__pycache__/plugin_bootloader.cpython-314.pyc /usr/lib/python3.14/site-packages/tuned/plugins/plugin_bootloader.py # grep '"bootc"' /usr/lib/python3.14/site-packages/tuned/plugins/plugin_bootloader.py cmd = ["bootc", "loader-entries", "set-options-for-source", ["bootc", "loader-entries", "set-options-for-source", # And the bootc command intentionally triggers the SELinux denial: * https://github.com/bootc-dev/bootc/blob/03fa72b194070f6973451aeb52279957535567b0/crates/lib/src/lsm.rs#L50 I removed the bootc package because I don't use the bootc command on my Fedora 44 machine. The SELinux denials do not appear anymore. They appeared with each power cable plug/unplug which was very annoying.
SELinux policy does not define the invalid_bootcinstall_testlabel_t type. I wonder what would happen if it was defined :-D
*** Bug 2535630 has been marked as a duplicate of this bug. ***
*** Bug 2537253 has been marked as a duplicate of this bug. ***