Repository navigation
Conversation
Ubuntu 25.04+ hosts (including GitHub ubuntu-latest, now 26.04) apply an AppArmor profile to fusermount3 by path, even in containers started with apparmor=unconfined, so every bridge file-sharing mount failed with 'fusermount3: mount failed: Permission denied'. The interceptor runs as root with CAP_SYS_ADMIN, so call mount(2) directly via go-fuse DirectMount and keep fusermount as the fallback. Co-authored-by: vercel-v[bot] <353008837+vercel-v[bot]@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bridge interceptnow calls mount(2) directly when it runs as root, so file sharing works on Ubuntu 25.04+ hosts, including GitHub's currentubuntu-latest.Why
Since
ubuntu-latestmoved to Ubuntu 26.04, no bridge FUSE mount comes up in the devcontainer. The vercel/api Managed Drives E2E with added diagnostics (vercel/api#114289, job 137931066030) logs this for every path inBRIDGE_MOUNT_PATHS:In the same container
/dev/fuseexists and CapEff includesCAP_SYS_ADMIN. The mount fails only in the setuid helper.Ubuntu 25.04+ ships an AppArmor profile that attaches to
fusermount3by path. That includes the binary inside a container started withapparmor=unconfined, so the profile denies these mounts (moby/moby#50013). Intercept only logs a warning and continues, so pod files such as/var/run/vsm/ca/ca.crtand the secrets-init/usr/share/.envnever appear in the devcontainer. This had gone unnoticed until staging switched to TLS VSM (vercel/api#107140), which made the app require/var/run/vsm/ca/ca.crt.Approach
Intercept runs as root with
CAP_SYS_ADMINand doesn't need the setuid helper. Setting go-fuse'sMountOptions.DirectMountwheneuid == 0skipsfusermount3and the AppArmor profile attached to it. go-fuse still falls back to fusermount if the direct mount fails. Unmount also triessyscall.Unmountfirst, so shutdown needs no helper either. Non-root callers keep the current behavior.Validation
go vetandgo test ./pkg/fsmount/...pass.typescript-node:24devcontainer withSYS_ADMIN,/dev/fuse, andapparmor:unconfined.fusermount3is replaced with a stub that prints the AppArmor denial and exits 1./var/run/vsm/cais empty./etc/bridge/tls). Thenodeuser can read/var/run/vsm/ca/ca.crtand/usr/share/.env, and all mounts are removed cleanly on shutdown.Co-authored-by: vercel-v[bot] <353008837+vercel-v[bot]@users.noreply.github.com>