From 948274b7bd76db65f1c69e4b5aab2bec0d63e8eb Mon Sep 17 00:00:00 2001 From: castrojo Date: Fri, 13 Nov 2026 19:33:39 -0500 Subject: [PATCH] fix(e2e): preserve container storage on lifecycle reboots Remove the redundant recursive tmpfiles home rule. Existing d entries create, label, and constrain the home directories without walking container storage on every boot. The full SELinux denial gate is unchanged. Assisted-by: GPT-6.1 Sol via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/e2e.yml | 3 +-- .../ci-ops/e2e-workflow/references/selinux-enforcing.md | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index c491cd4fc..35b6e9c21 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -727,8 +727,7 @@ jobs: # Create home dir via tmpfiles.d so it exists at runtime regardless # of whether bootc initialises the stateroot var from the image's /var. sudo mkdir -p "${DEP}/etc/tmpfiles.d/" - printf 'Z /var/home/bluefin-test 0700 %d %d -\nd /var/home/bluefin-test 0700 %d %d -\nd /var/home/bluefin-test/.ssh 0700 %d %d -\n' \ - "${BFT_UID}" "${BFT_UID}" \ + printf 'd /var/home/bluefin-test 0700 %d %d -\nd /var/home/bluefin-test/.ssh 0700 %d %d -\n' \ "${BFT_UID}" "${BFT_UID}" \ "${BFT_UID}" "${BFT_UID}" | \ sudo tee "${DEP}/etc/tmpfiles.d/ci-user.conf" diff --git a/docs/skills/ci-ops/e2e-workflow/references/selinux-enforcing.md b/docs/skills/ci-ops/e2e-workflow/references/selinux-enforcing.md index 33d8af4ea..84605c69b 100644 --- a/docs/skills/ci-ops/e2e-workflow/references/selinux-enforcing.md +++ b/docs/skills/ci-ops/e2e-workflow/references/selinux-enforcing.md @@ -65,6 +65,15 @@ read only by `ostree`/`bootc`, which run unconfined. Never fix a denial by relabeling the whole tree, `-F` over candidate files, `chcon` to a broad type, `setenforce 0`, or a permissive domain. +The injected `ci-user.conf` uses non-recursive `d` entries for the home and +`.ssh` directories. `d` creates them and adjusts their own mode, ownership +and SELinux label on later boots. Do not add a recursive `Z` home rule: after +the runner container is loaded, it would rewrite Podman storage below the +home on every lifecycle reboot. Run 43526643244 showed it traversing image +hardlinks and generating `systemd_tmpfiles_t` denials while reading +`/proc/sys/fs/protected_hardlinks`. Keep the AVC gate unchanged; fix the +harness traversal, not the candidate policy or the allowlist. + ## AVC collection and canary `selinux_collect_avc.sh` runs in the guest as root and prints AVC/USER_AVC