Commit af250e7
committed
fix(release): strip shipped binaries
Release binaries carried their full symbol table. Production compiles without
-g, but the linker keeps .symtab regardless, so every archive shipped ~536 KB of
internal function names that nothing needs: a bigger download and a free map of
the internals, by accident rather than by decision. Nothing symbolizes at
runtime -- mem_profile.c is not in the production build and never calls
backtrace_symbols -- so no diagnostics are lost.
It also had a concrete cost. Microsoft's ML scored the unstripped linux-amd64
binary Trojan:Script/Wacatac.B!ml (1 engine of 62) and blocked release run
30398064336 at the VirusTotal gate.
That verdict is a decision-boundary artifact, not a property of the code, and
the evidence is unambiguous:
* the dry-run build two days earlier (d587dea) is the same program 10 KB
larger and scans CLEAN -- a 0.003% delta flips the verdict
* the delta in that window is almost entirely DELETION of Windows-only files
that Linux never compiled
* the ui build of the same commit was never flagged
* two independently flagged builds drew different sub-variants (Wacatac.B and
Wacatac.C), which a real signature does not do
* v0.9.0, re-analysed against the same engine build, is still clean -- so this
is not model drift either
Stripping removes the symbol-name feature surface those models score. It cleared
BOTH flagged builds, and every other platform stays clean, so this fixes Linux
without trading the problem sideways. Verified before merge:
linux-amd64 (f440743) stripped 0 malicious / 62 engines
linux-amd64 (0802689) stripped 0 malicious / 62 engines
linux-arm64 stripped 0 malicious / 61 engines
linux-amd64-portable stripped 0 malicious / 62 engines
windows-amd64 stripped 0 malicious / 68 engines
darwin-arm64 stripped + re-signed 0 malicious / 60 engines
macOS needs care and gets it. The build workflow ad-hoc signs BEFORE this script
runs, so stripping invalidates that signature and the kernel then refuses to
exec the image; Mach-O is re-signed here. It also uses `strip -x` rather than
--strip-all, because a full strip can leave an image dyld will not load. The
packaged macOS binary verifies (`valid on disk`, `satisfies its Designated
Requirement`) and runs, and the full macOS smoke passes against a stripped,
re-signed binary.
Build fingerprints are derived from the file itself during execution, with
nothing embedded during compilation, so staged and target agree and activation
is unaffected.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>1 parent f440743 commit af250e7
1 file changed
Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
94 | 141 | | |
95 | 142 | | |
96 | 143 | | |
| |||
107 | 154 | | |
108 | 155 | | |
109 | 156 | | |
| 157 | + | |
110 | 158 | | |
111 | 159 | | |
112 | 160 | | |
| |||
119 | 167 | | |
120 | 168 | | |
121 | 169 | | |
| 170 | + | |
122 | 171 | | |
123 | 172 | | |
124 | 173 | | |
| |||
0 commit comments