Repository navigation
A zone binds its images' /usr through a descriptor opened as host root, as it does the broker's socket - #533
Merged
Conversation
…t, as it does the broker's socket The set is stacked under /run/kryptik, root's alone, and pid 1 binds it after taking the zone's ids, so looking up the bind's source failed with EACCES and no zone that names images started. intermediate_main opens the set O_PATH beside the broker's and the Wayland socket's descriptors, after the mount namespace is unshared and before the id switch, and pivot_into binds /proc/self/fd/N.
DevomB
marked this pull request as ready for review
October 15, 2026 17:20
DevomB
added a commit
that referenced
this pull request
Oct 15, 2026
… images' /usr through a descriptor opened as host root
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.
Round 4 (Distro 38765674759) mounted every image once #531 gave them 4 KiB blocks. Every zone that names images then failed one step later, building its root:
It failed on all four probe runs in the update, install and build/production parts, and the zones that carry the browser would hit the same error.
Cause.
images::preparestacks the set at/run/kryptik/usr/<set>, and/run/kryptikis 0700 host root.rootfs::pivot_intobinds that path onto the zone's/usrfrom pid 1, after the zone's ids are taken. As the mapped root, pid 1 cannot search/run/kryptik, so looking up the bind's source fails with EACCES. The ext4 and overlay mounts are fine, because kryptikd makes them as host root and overlayfs reads its lowers with the mounter's credentials. Only zones that name images take this path, and none do on main.Fix. This is the broker socket's pattern.
intermediate_mainopens the set's directoryO_PATH | O_DIRECTORY | O_NOFOLLOWwhere it opens the broker's and the Wayland socket's descriptors:/proc/self/fdpasses the mount-namespace check;setresuid, while its kuid is still host 0, the owner of/run/kryptik.pivot_into then binds
/proc/self/fd/N, and bind_ro_dir follows the magic link. pid 1 inherits the descriptor, and its descriptor sweep closes it, as with the broker's. A zone with no images keeps the root's/usrpath./run/kryptikstays 0700, and software-delivery.md says how the bind reaches the set.No unit test can show this without a user namespace and a real mount. The proof is acceptance's probe checks (update, install, production) and the zones and desktop parts' zones that carry the browser.