Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run build-time tests in a chroot or unprivileged container #1497

Open
smcv opened this issue Oct 30, 2024 · 0 comments · May be fixed by #1498
Open

Can't run build-time tests in a chroot or unprivileged container #1497

smcv opened this issue Oct 30, 2024 · 0 comments · May be fixed by #1498
Labels

Comments

@smcv
Copy link
Collaborator

smcv commented Oct 30, 2024

Operating System

Debian unstable

XDG Desktop Portal version

Other

XDG Desktop Portal version (Other)

1.19.0

Desktop Environment

Other

Desktop Environment (Other)

None (non-interactive automated build)

Expected Behavior

Tests either pass, or are skipped

Current Behavior

test-portals-notification fails and times out

Steps to Reproduce

  1. Configure with -Dsandboxed-image-validation=enabled
  2. Build in a chroot or an unprivileged container. bwrap is present, but cannot be used in this environment, either because as we know it doesn't work in a chroot (Failures in chroot containers/bubblewrap#135) or because CAP_SYS_ADMIN is not in the bounding set (bubblewrap inside unprivileged docker containers/bubblewrap#505)
  3. Run build-time tests (meson test)

Anything else we should know?

Debian has historically done all builds as an unprivileged user in a chroot environment, although the official autobuilders are moving towards doing builds in a container as a way to protect the host system better.

Unprivileged containers like Podman generally exclude CAP_SYS_ADMIN from the capability bounding set inside the container, because it is believed that CAP_SYS_ADMIN inside the container is likely to be enough to let the container payload elevate privileges, gaining arbitrary code execution outside the container as the same unprivileged user who started it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Needs Triage
Development

Successfully merging a pull request may close this issue.

1 participant