Skip to content

build(glibc): check the reserved prefix landed, rather than assume it - #523

Merged
Sunrisepeak merged 1 commit into
mainfrom
fix/glibc-prefix-assert
Aug 6, 2026
Merged

build(glibc): check the reserved prefix landed, rather than assume it#523
Sunrisepeak merged 1 commit into
mainfrom
fix/glibc-prefix-assert

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Follow-up to #522, which landed AD-11's reserved prefix
(`/nonexistent/xlings-use-rpath-not-default-search`) but merged before this
check was pushed.

`--prefix` is a decision about the artifact — it is compiled into ld.so as
its default library search path and into glibc's own binaries as their INTERP —
so the build now checks the artifact (R4).

Without it, a `--prefix` that silently failed to take, or a future edit that
reverts it, yields a loader whose default search path is a real directory on the
build machine, with nothing anywhere saying so.

That is not hypothetical: it is exactly how the old prefix survived across
several releases. The value was wrong, every build succeeded, and the only
symptom was a payload leaking the builder's home layout — which is what #522's
relocation code existed to scrub back out, badly.

Two checks on the built loader:

  • it carries the reserved prefix;
  • it carries no path from the build machine's `$HOME`.

The prefix is a decision about the ARTIFACT, so the build now checks the
artifact (R4). Without it, a `--prefix` that silently failed to take -- or a
future edit that reverts it -- yields a loader whose default library search
path is a real directory on the build machine, with nothing anywhere saying so.

That is not hypothetical. It is exactly how the old prefix survived across
several releases: the value was wrong, every build succeeded, and the only
symptom was a payload that leaked the builder's home layout.

Two checks, both on the built loader: it carries the reserved prefix, and it
carries no path from this machine's $HOME.
@Sunrisepeak
Sunrisepeak merged commit 2ae8a01 into main Aug 6, 2026
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