Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 804222 - SELinux: emerging sys-kernel/gentoo-kernel fails with realabelto denial
Summary: SELinux: emerging sys-kernel/gentoo-kernel fails with realabelto denial
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: SELinux (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: SE Linux Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-25 20:17 UTC by Emily Rowlands
Modified: 2021-07-27 10:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Extract of /var/log/audit.log from the merge phase (uncompressed size 1.7M) (audit.log.gz,64.75 KB, application/gzip)
2021-07-25 20:17 UTC, Emily Rowlands
Details
emerge --info selinux-base selinux-base-policy (file_804222.txt,5.71 KB, text/plain)
2021-07-25 20:19 UTC, Emily Rowlands
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emily Rowlands 2021-07-25 20:17:21 UTC
Created attachment 726972 [details]
Extract of /var/log/audit.log from the merge phase (uncompressed size 1.7M)

During copying files to /, the relabelto permission is denied to the portage_t domain. The full log will be attached but here's a summary generated by audit2allow:

#============= gcc_config_t ==============
allow gcc_config_t self:capability dac_read_search;

#============= kmod_t ==============
allow kmod_t portage_tmp_t:dir search;

#============= portage_t ==============
allow portage_t dmesg_exec_t:file relabelto;
allow portage_t etc_runtime_t:file relabelto;
allow portage_t etc_t:file relabelto;
allow portage_t fsadm_exec_t:file relabelto;
allow portage_t gcc_config_t:process { noatsecure rlimitinh siginh };
allow portage_t kmod_exec_t:file relabelto;
allow portage_t kmod_t:process { noatsecure rlimitinh siginh };
allow portage_t ld_so_t:file relabelto;
allow portage_t ldconfig_t:process { noatsecure rlimitinh siginh };
allow portage_t modules_dep_t:file relabelto;
allow portage_t modules_object_t:file relabelto;
allow portage_t mount_exec_t:file relabelto;
allow portage_t portage_tmp_t:chr_file create;
allow portage_t self:netlink_route_socket nlmsg_write;
allow portage_t setfiles_t:process { noatsecure rlimitinh siginh };
allow portage_t shell_exec_t:file relabelto;
allow portage_t udev_exec_t:file relabelto;
allow portage_t udev_rules_t:file relabelto;
allow portage_t udevadm_exec_t:file relabelto;
allow portage_t usr_t:dir relabelto;
allow portage_t usr_t:file relabelto;

#============= setfiles_t ==============
allow setfiles_t sysctl_kernel_t:dir search;

Whilst this particular log and errorset is for sys-kernel/gentoo-kernel, I also experienced a similar failure when merging sys-fs/zfs-kmod. However, I did not see merge failures with sys-process/htop (although there were some AVC denials for { noatsecure rlimitinh siginh } ).

emerge --info to follow
Comment 1 Emily Rowlands 2021-07-25 20:19:37 UTC
Created attachment 726975 [details]
emerge --info selinux-base selinux-base-policy
Comment 2 Emily Rowlands 2021-07-27 10:31:54 UTC
Additional note: this audit.log was taken with dontaudit rules disabled. The { noatsecure rlimitinh siginh } do not appear after running `semodule -B` to re-enable them.