Bootstrappable builds
Bootstrappable builds
Posted Jan 8, 2021 20:46 UTC (Fri) by josh (subscriber, #17465)In reply to: Bootstrappable builds by dvdeug
Parent article: Bootstrappable builds
As long as the GCC binary didn't have something added that subverts subsequent GCC binaries.
> If you start with two different compilers, you don't need to absolutely trust them; if they came from different sources and any attack they'd be using would be different, you can simply compare the final versions and if the binaries are the same, which starting compiler you used was truly irrelevant, and the "trusting trust" attack is moot.
Only if you start with two different independent compilers, though. The top-level comment of this thread just said "bootstrapped a modern GCC from non-GCC source", which doesn't say anything about diverse double-compilation (using two different non-GCC compilers to compile GCC).
> If you can get a hacked binary into the pathway, you can get hacked source code into the pathway.
Source is harder, though, for multiple reasons.
First, "trusting trust"-style attacks would be difficult to obfuscate; it's one thing to hide a security hole, and quite another to hide code that detects a code pattern from a compiler and modifies it such that it affects subsequently compiled code.
The source of GCC or Clang might be huge, but any *one* change is much smaller and more reviewable.
And finally, malicious source code is more difficult to deny intent about. With a malicious binary, you could try to claim some internal process was subverted, or blame a random employee, or contractor, or other similar diversions. With malicious source code, you'll have a harder time blaming anything other than malice.
