Skip to content

fix(mount): resolve every symlink inside container rootfs - #191

Merged
bleggett merged 1 commit into
edera-dev:mainfrom
bleggett:bleggett/sanitize-symlink-resolution
Oct 23, 2026
Merged

bleggett merged 1 commit into
edera-dev:mainfrom
bleggett:bleggett/sanitize-symlink-resolution

Conversation

@bleggett

Copy link
Copy Markdown
Contributor

This makes mask_path and make_readonly resolve every symlink inside the container's rootfs, so a masked or read-only path always points to the container alone.

Ex: An image has the absolute symlink /bin -> /usr/bin, and styrolite is asked to mask /bin/ls. Before this, styrolite resolved /usr/bin from the outer root instead of the container rootfs, so the mask landed on the wrong file and was discarded at pivot, so the container's /bin/ls stayed readable. With this fix, it correctly follows /usr/bin inside the container rootfs and masks the container's own /usr/bin/ls.

@bleggett
bleggett merged commit b1c00b3 into edera-dev:main Oct 23, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants