Log date · Mon
Can you trust strip in your build pipeline?
Strip changes compiled artifacts. We measure a small example and explain how to check the post-build tool trust chain.
Does strip belong in your build trust chain?
Yes. Strip changes a compiled binary, so its origin and execution environment belong in the build trust chain. On our own sample, Apple strip removed a local symbol and reduced the file from 33,848 to 33,464 bytes; both versions printed 42. Matching output does not establish that nothing else changed.
| Question | Finding |
|---|---|
| Does strip change the artifact? | The bytes differ and the sample shrank by 384 bytes. |
| What about symbol and behavior? | The local symbol disappeared; both runs printed 42. |
| Does that prove the tool is safe? | No; one functional check has limited coverage. |
The occasion is a paper submitted on 27 July 2026. Its authors showed how a tampered GNU strip could propagate through the NixOS bootstrap. [1]
What the paper demonstrated
The paper’s v1 was submitted at 12:59 UTC on 27 July 2026. Starting with a tampered binary seed, the researchers made strip pass a payload to the next generation of strip while processing finished ELF files. It persisted in the final standard environment after the seed left the dependency closure. On a real nixpkgs revision, they built a complete graphical installer and reported backdoors in almost every binary. [1]
This extends Thompson’s trusting-trust problem: reviewing clean source alone does not establish that an artifact produced by a compromised tool corresponds to that source. The paper’s tool neither needed to read nor generate source, and self-propagation was central to the study. [2] Removing a tool from a dependency list does not necessarily undo what it previously wrote.
A small comparison with Apple strip
We compiled a small C program with Apple clang 21.0.0 and Xcode 27.2, copied the binary and ran strip -x on the copy. Apple describes this mode as removing non-global symbols while preserving external symbols. [4] This is an illustration using macOS Mach-O and a different strip implementation, not a reproduction of GNU strip, ELF, NixOS or the paper’s attack.
#include <stdio.h>
static int double_value(int n) { return n * 2; }
int main(void) { printf("result=%d\n", double_value(21)); return 0; }The script compares the original and a copy from the same build, checks the known local symbol with nm, runs both files and compares size and bytes. This output is copied from the transcript:
== behavior ==
result=42
result=42
== local symbol ==
before: _double_value present
after: _double_value absent
== size in bytes ==
before: 33848
after: 33464
== byte comparison ==
differentHere the observed symbol change is expected, not malicious. Matching output covers only this path; a smaller file is not proof of integrity or safety. GNU strip normally modifies the named file and its options select different results, so retaining the input is useful. [3]
What the checks can and cannot show
Inventory each post-compile step, including stripping, binary transformation and signing. Record the tool, version, origin, arguments and input and output. Verify downloaded packages against signatures or digests obtained through a trusted channel, and protect the build environment. A version string alone is insufficient: different executables can carry the same label.
A reproducible build produces bit-identical specified artifacts from the same source, environment and instructions. [5] Comparing unsigned outputs from independent environments can reveal differences, but matching outputs do not rule out a compromised tool shared by both. Record environment and dependencies and investigate differences such as paths, timestamps or tool versions before treating ordinary build noise as an attack.
A signature can help verify the signer and whether an artifact changed after signing. If the pipeline produced bad content before signing, the signature alone does not prove source-to-binary correspondence. Provenance must likewise be checked against expected builder and inputs, and its generation must be trusted. [6] Comparing symbols, structure and behavior can reveal problems; it cannot enumerate every hidden behavior.
Recommendations by case
These are engineering recommendations, not protection effects measured in our sample. Combine them according to the threat model and cost.
| Case | Recommendation |
|---|---|
| Adding a binary transformer | Record origin, version, digest and arguments; verify updates and restrict build permissions. |
| Assessing a transformation | Retain input and output; compare symbols, structure and key behavior. |
| Seeking stronger provenance | Rebuild in independent environments and compare unsigned artifacts; audit shared dependencies. |
| Release and incident investigation | Retain build records, provenance and matching debug symbols; verify signatures. |
Independence needs a concrete definition. Two machines using the same base image and tool download are not fully independent. Identify the trusted reference, update process and person responsible for investigating discrepancies; that is more useful than merely ticking a dual-build box.
Check your own build
For a macOS build you are authorized to inspect, retain copies before and after the transformation and before signing. Replace the paths below with your files; do not run strip on the only copy of a release. Compare symbols and bytes, then run your project’s functional and regression tests.
nm -a path/to/before > before-symbols.txt
nm -a path/to/after > after-symbols.txt
diff -u before-symbols.txt after-symbols.txt
cmp -s path/to/before path/to/after && echo identical || echo different
shasum -a 256 path/to/before path/to/afterWrite expected changes into the build rules: which symbols must remain, which tests must pass and which artifact stage is compared. If a result differs, isolate the build, verify the tool’s origin, arguments and logs, then decide whether to rebuild. Retain debug symbols matched to the release for later crash diagnosis.
Your checklist
- Inventory post-build tools, their origins and arguments.
- Verify tool packages against trusted signatures or digests and protect the build environment.
- Retain pre- and post-transformation unsigned artifacts and compare structure and behavior.
- Rebuild independently and investigate differences and shared dependencies.
- Keep build records, provenance and matching debug symbols.
Primary sources
- arXiv: Trusting-Trust Attack against an Entire Linux Distribution through Binary Manipulation (2607.24888) · Source date 2026-07-27 · Checked 2026-10-12
- arXiv: paper v1 full text · Checked 2026-11-11
- GNU Binary Utilities: strip · Checked 2026-11-11
- Apple: Build settings reference · Checked 2026-11-11
- Reproducible Builds: Definitions · Checked 2026-11-11
- SLSA: Verifying artifacts · Checked 2026-11-11