SecSIGSecurity Special Interest Group of US MensaCuriosity. Perspective. Security.

Research Library · Idea

Trusting trust

Trusting trust names the attack Ken Thompson described in his Turing Award lecture, "Reflections on Trusting Trust", printed in Communications of the ACM in August 1984 1. Thompson showed a C compiler modified to miscompile the UNIX login command so that it accepted a known password, and a second modification that made the compiler re-insert both changes whenever it compiled its own source. Once the bugged binary is installed, the changes can be removed from the source and survive anyway, leaving the login command bugged "with no trace in source anywhere" 1.

His moral was that no amount of source-level verification or scrutiny protects against untrusted code, and that the same attack could be placed in an assembler, a loader or hardware microcode 1. Thompson credited the idea to an Air Force critique of Multics; Paul Karger and Roger Schell's 2002 retrospective identifies that as their 1974 Multics security evaluation 2.

The best-known answer is David Wheeler's diverse double-compiling, set out in his 2009 dissertation: recompile the compiler's source with an independent trusted compiler and compare the result bit for bit with the compiler under test, which shows correspondence with its source if certain assumptions hold 34. Reproducible builds, which let independent parties recreate identical artifacts from the same inputs, address a related but narrower problem. Trusting trust is now a standard reference point in discussions of build provenance and software supply chain attacks.

Source · Reflections on Trusting Trust (opens in a new tab) · Communications of the ACM

References

  1. Reflections on Trusting Trust (opens in a new tab) · Communications of the ACM 27(8), course copy at Carnegie Mellon University · August 1, 1984 ↩ ↩ ↩
  2. Thirty Years Later: Lessons from the Multics Security Evaluation (opens in a new tab) · Annual Computer Security Applications Conference · December 1, 2002 ↩
  3. Fully Countering Trusting Trust through Diverse Double-Compiling (opens in a new tab) · arXiv (David A. Wheeler, PhD dissertation, George Mason University) · April 30, 2010 ↩
  4. Countering Trusting Trust through Diverse Double-Compiling (opens in a new tab) · David A. Wheeler ↩

Research articles

See what connects to it on the map of ideas →

See also