Skip to content

Linux: a matching link kept under its own spelling stays in the deny list - #690

Merged
ronleizrowice-ant merged 1 commit into
mainfrom
fix/linux-a-link-kept-as-spelled-keeps-its-mount
Oct 12, 2026
Merged

ronleizrowice-ant merged 1 commit into
mainfrom
fix/linux-a-link-kept-as-spelled-keeps-its-mount

Conversation

@ronleizrowice-ant

Copy link
Copy Markdown
Collaborator

A denyRead glob keeps a matching symlink under its own spelling when it cannot say where the link leads. The deny loop resolves it when the mounts are planned. The collapse of a pattern's locations treats every entry as a place, and a link's spelling is not where the link leads.

What changes (+9/-4)

  • Links kept as spelled take no part in the collapse and are always in the result.
  • A link that only its shorter name resolves, and to /, denies the directory that holds it, as any link to / does.

Who sees a difference

Linux only. With every link readable, the mounts and the file system calls are the same. Each link kept as spelled costs four calls and at most one mount.

Testing

  • Eight tests fail without the change, one of them on a real state with nothing injected. 12 mutations each fail a test.
  • 27,720 injected cases through the wrapper, under Node and under Bun: covers less than before in none.
  • Run with bubblewrap 0.11.2 and 0.4.1: the command starts in every case.

Follows #575.

…list

A denyRead glob keeps a matching symlink under its own spelling when it
cannot say where the link leads, and the deny loop resolves it when the
mounts are planned. The collapse of a pattern's locations treats every entry
as a place, and a link's spelling is not where the link leads.

Such links take no part in the collapse and are always in the result. One
that only its shorter name resolves, and to the root, denies the directory
that holds it, as any link to the root does.

@imichaelmoore imichaelmoore left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/stamp

@ronleizrowice-ant
ronleizrowice-ant merged commit b59244a into main Oct 12, 2026
16 checks passed
@ronleizrowice-ant
ronleizrowice-ant deleted the fix/linux-a-link-kept-as-spelled-keeps-its-mount branch October 12, 2026 14:15
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.

2 participants