obsolete

selinux-policy-41.8-2.fc41

FEDORA-2024-1daf053916 created by zbyszek 11 months ago for Fedora 41

Automatic update for selinux-policy-41.8-2.fc41.

Changelog
* Thu Jul 11 2024 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 41.8-5
- Manually bump Release
* Thu Jul 11 2024 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 41.8-4
- Relabel files under /usr/bin to fix stale context after sbin merge
* Wed Jul 10 2024 Zdenek Pytela <zpytela@redhat.com> - 41.8-2
- Drop the publicfile module
* Wed Jul 10 2024 Zdenek Pytela <zpytela@redhat.com> - 41.8-1
- Drop publicfile module
- Remove permissive domain for systemd_nsresourced_t
- Change fs_dontaudit_write_cgroup_files() to apply to cgroup_t
- Label /usr/bin/samba-gpupdate with samba_gpupdate_exec_t
- Allow to create and delete socket files created by rhsm.service
- Allow virtnetworkd exec shell when virt_hooks_unconfined is on
- Allow unconfined_service_t transition to passwd_t
- Support /var is empty
- Allow abrt-dump-journal read all non_security socket files
- Allow timemaster write to sysfs files
- Dontaudit domain write cgroup files
- Label /usr/lib/node_modules/npm/bin with bin_t
- Allow ip the setexec permission
- Allow systemd-networkd write files in /var/lib/systemd/network
- Fix typo in systemd_nsresourced_prog_run_bpf()
* Fri Jun 28 2024 Zdenek Pytela <zpytela@redhat.com> - 41.7-1
- Confine libvirt-dbus
- Allow virtqemud the kill capability in user namespace
- Allow rshim get options of the netlink class for KOBJECT_UEVENT family
- Allow dhcpcd the kill capability
- Allow systemd-networkd list /var/lib/systemd/network
- Allow sysadm_t run systemd-nsresourced bpf programs
- Update policy for systemd generators interactions
- Allow create memory.pressure files with cgroup_memory_pressure_t
- Add support for libvirt hooks
* Wed Jun 19 2024 Zdenek Pytela <zpytela@redhat.com> - 41.6-1
- Allow certmonger read and write tpm devices
- Allow all domains to connect to systemd-nsresourced over a unix socket
- Allow systemd-machined read the vsock device
- Update policy for systemd generators
- Allow ptp4l_t request that the kernel load a kernel module
- Allow sbd to trace processes in user namespace
- Allow request-key execute scripts
- Update policy for haproxyd
* Tue Jun 18 2024 Zdenek Pytela <zpytela@redhat.com> - 41.5-1
- Update policy for systemd-nsresourced
- Correct sbin-related file context entries
* Mon Jun 17 2024 Zdenek Pytela <zpytela@redhat.com> - 41.4-1
- Allow login_userdomain execute systemd-tmpfiles in the caller domain
- Allow virt_driver_domain read files labeled unconfined_t
- Allow virt_driver_domain dbus chat with policykit
- Allow virtqemud manage nfs files when virt_use_nfs boolean is on
- Add rules for interactions between generators
- Label memory.pressure files with cgroup_memory_pressure_t
- Revert "Allow some systemd services write to cgroup files"
- Update policy for systemd-nsresourced
- Label /usr/bin/ntfsck with fsadm_exec_t
- Allow systemd_fstab_generator_t read tmpfs files
- Update policy for systemd-nsresourced
- Alias /usr/sbin to /usr/bin and change all /usr/sbin paths to /usr/bin
- Remove a few lines duplicated between {dkim,milter}.fc
- Alias /bin → /usr/bin and remove redundant paths
- Drop duplicate line for /usr/sbin/unix_chkpwd
- Drop duplicate paths for /usr/sbin

This update was automatically created

11 months ago

This update's test gating status has been changed to 'waiting'.

11 months ago

This update has been obsoleted by selinux-policy-41.8-3.fc41.

11 months ago

This update's test gating status has been changed to 'failed'.

11 months ago
User Icon adamwill commented & provided feedback 11 months ago
karma

This still failed on SELinux denials on FreeIPA tests.

In the straight Fedora 41 tests like this one, this is what happens:

  • Boot a pre-existing Fedora Rawhide base disk image which has selinux-policy-41.3-1.fc41 (the current Rawhide version), no FreeIPA or httpd packages installed yet
  • Update the whole system, including updating to selinux-policy-41.8-2.fc41 (the version in this update)
  • Reboot
  • Attempt to deploy the system as a FreeIPA server using ipa-server-install, which causes httpd to be installed and started

When the IPA install process tries to start httpd, it fails because of an SELinux denial, and so the test fails:

    Jul 11 14:12:30 ipa002.test.openqa.fedoraproject.org systemd[1]: Starting httpd.service - The Apache HTTP Server...
    Jul 11 14:12:32 ipa002.test.openqa.fedoraproject.org audit[10243]: AVC avc:  denied  { execute } for  pid=10243 comm="(httpd)" name="httpd" dev="dm-0" ino=8568055 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=file permissive=0 trawcon="system_u:object_r:publicfile_exec_t:s0"
    Jul 11 14:12:32 ipa002.test.openqa.fedoraproject.org (httpd)[10243]: httpd.service: Unable to locate executable '/usr/sbin/httpd': Permission denied
    Jul 11 14:12:32 ipa002.test.openqa.fedoraproject.org audit[10243]: SYSCALL arch=c000003e syscall=21 success=no exit=-13 a0=7ffe66a94f10 a1=1 a2=0 a3=0 items=0 ppid=1 pid=10243 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="(httpd)" exe="/usr/lib/systemd/systemd-executor" subj=system_u:system_r:init_t:s0 key=(null)
    Jul 11 14:12:32 ipa002.test.openqa.fedoraproject.org audit: PROCTITLE proctitle="(httpd)"
    Jul 11 14:12:32 ipa002.test.openqa.fedoraproject.org (httpd)[10243]: httpd.service: Failed at step EXEC spawning /usr/sbin/httpd: Permission denied
    Jul 11 14:12:32 ipa002.test.openqa.fedoraproject.org systemd[1]: httpd.service: Main process exited, code=exited, status=203/EXEC
    Jul 11 14:12:32 ipa002.test.openqa.fedoraproject.org systemd[1]: httpd.service: Failed with result 'exit-code'.
    Jul 11 14:12:32 ipa002.test.openqa.fedoraproject.org systemd[1]: Failed to start httpd.service - The Apache HTTP Server.

In the Fedora 40 to 41 upgrade test, this is what happens:

  • Boot a pre-existing Fedora 40 base disk image which has selinux-policy-40.23-1.fc40 (the current Fedora 40 version), no FreeIPA or httpd packages installed yet
  • Deploy the system as a FreeIPA server using ipa-server-install, which causes httpd to be installed and started
  • Verify that this worked and the system is functioning fine as a FreeIPA server
  • Upgrade the whole system to Fedora 41, including upgrading DIRECTLY to selinux-policy-41.8-2.fc41 (the version in this update)
  • Reboot
  • Check that the system is still working as a FreeIPA server and ipa.service is running

This check fails because ipa.service is not running, and so the test fails. This is because httpd failed to start:

Jul 11 14:51:49 ipa001.test.openqa.fedoraproject.org systemd[1]: Starting httpd.service - The Apache HTTP Server...
Jul 11 14:51:50 ipa001.test.openqa.fedoraproject.org ipa-httpd-kdcproxy[2245]: ipa: INFO: KDC proxy enabled
Jul 11 14:51:50 ipa001.test.openqa.fedoraproject.org ipa-httpd-kdcproxy[2245]: ipa-httpd-kdcproxy: INFO     KDC proxy enabled
Jul 11 14:51:50 ipa001.test.openqa.fedoraproject.org (httpd)[2249]: httpd.service: Referenced but unset environment variable evaluates to an empty string: OPTIONS
Jul 11 14:51:50 ipa001.test.openqa.fedoraproject.org audit[2249]: AVC avc:  denied  { create } for  pid=2249 comm="httpd" scontext=system_u:system_r:publicfile_t:s0 tcontext=system_u:system_r:publicfile_t:s0 tclass=netlink_route_socket permissive=0
Jul 11 14:51:50 ipa001.test.openqa.fedoraproject.org httpd[2249]: httpd: Could not open configuration file /etc/httpd/conf/httpd.conf: Permission denied
Jul 11 14:51:50 ipa001.test.openqa.fedoraproject.org audit[2249]: AVC avc:  denied  { create } for  pid=2249 comm="httpd" scontext=system_u:system_r:publicfile_t:s0 tcontext=system_u:system_r:publicfile_t:s0 tclass=udp_socket permissive=0
Jul 11 14:51:50 ipa001.test.openqa.fedoraproject.org audit[2249]: AVC avc:  denied  { create } for  pid=2249 comm="httpd" scontext=system_u:system_r:publicfile_t:s0 tcontext=system_u:system_r:publicfile_t:s0 tclass=udp_socket permissive=0
Jul 11 14:51:50 ipa001.test.openqa.fedoraproject.org audit[2249]: AVC avc:  denied  { search } for  pid=2249 comm="httpd" name="httpd" dev="dm-0" ino=13713984 scontext=system_u:system_r:publicfile_t:s0 tcontext=system_u:object_r:httpd_config_t:s0 tclass=dir permissive=0
Jul 11 14:51:50 ipa001.test.openqa.fedoraproject.org systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Jul 11 14:51:50 ipa001.test.openqa.fedoraproject.org systemd[1]: httpd.service: Failed with result 'exit-code'.
Jul 11 14:51:50 ipa001.test.openqa.fedoraproject.org systemd[1]: Failed to start httpd.service - The Apache HTTP Server.

One thing I guess I should emphasize here: the bin/sbin merge has not landed because it also failed a lot of openQA tests, so it is gated. That means it is not involved in testing of this update. No packages from the bin/sbin merge are installed during the testing of this update.

I'll try to repeat the same result locally.

  1. Download https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Server/x86_64/images/Fedora-Server-KVM-Rawhide-20240711.n.0.x86_64.qcow2
  2. Run that under virt-manager. (I got the default BIOS mode, but I don't think this matters.)
  3. rpm -q selinux-policy → selinux-policy-41.3-1.fc41.noarch
  4. sudo dnf upgrade https://kojipkgs.fedoraproject.org//packages/selinux-policy/41.8/3.fc41/noarch/selinux-policy{,-targeted}-41.8-3.fc41.noarch.rpm sudo dnf upgrade → nothing
  5. sudo semanage fcontext -l|grep publicfile → nothing
  6. sudo reboot
  7. sudo dnf install /usr/sbin/ipa-server-install --setopt=install_weak_deps=0 -y
  8. ls -Z /usr/sbin/httpd → system_u:object_r:httpd_exec_t:s0

  9. sudo dnf -y group install freeipa-server

  10. sudo hostnamectl set-hostname tmp.openqa.fedoraproject.org
  11. sudo ipa-server-install -U --auto-forwarders --realm=TEST.OPENQA.FEDORAPROJECT.ORG --domain=test.openqa.fedoraproject.org --ds-password=monkeys123 --admin-password=monkeys123 --setup-dns --reverse-zone=2.16.172.in-addr.arpa --allow-zone-overlap

This finishes successfully. httpd.service is active.

So this seems all very straightforward. The test must be doing something strange to end up with the totally unexpected selinux context.

One thing I notice is that I see systemd-256.2-2.fc41 in my image, and 'systemd 256.1-8.fc41' in the logs from the failed CI run. But systemd-256.2-2.fc41 bodhi update went stable 2024-07-09 11:50:24 UTC.


"One thing I guess I should emphasize here: the bin/sbin merge has not landed because it also failed a lot of openQA tests, so it is gated. That means it is not involved in testing of this update. No packages from the bin/sbin merge are installed during the testing of this update."

True. But we have the conundrum that publicfile_t is somehow activated in this update. This update includes the selinux-policy merge of sbin: /usr/sbin is an alias to /usr/bin.


Anyway, let's hope that https://src.fedoraproject.org/rpms/selinux-policy/pull-request/447 fixes the issue.

What happend:

  • publicfile module defined selinux file context for /usr/bin/httpd which is different from the standard policy type for /usr/sbin/httpd
  • as part of sbin merge feature, selinux-policy started to ship /usr/sbin = /usr/bin equivalency -> /usr/sbin/httpd is translated to /usr/bin/httpd and after that selinux context is resolved to publicfile..._t
  • selinux-policy dropped publicfile module so that ^^ should not happen
  • BUT during update, selinux-policy rebuild was done in %post phase when publicfile module from the old policy is still installed

After these steps, current built and loaded policy would resolve /usr/sbin/httpd to publicfile..._t even though selinux policy store was already updated to the new version so any subsequent run ofsemodule -B fixed it.

It means that this bug was temporary and would be fixed with update from 41.8-1 (it it wasn't untagged) to anything new, or with semodule -B after update.


Please log in to add feedback.

Metadata
Type
unspecified
Karma
-1
Signed
Content Type
RPM
Test Gating
Autopush Settings
Unstable by Karma
-3
Stable by Karma
disabled
Stable by Time
0 days
Thresholds
Minimum Karma
+2
Minimum Testing
14 days
Dates
submitted
11 months ago
in testing
11 months ago

Automated Test Results