
the backdoor got caught because it kept getting bigger
October 1983. Ken Thompson walks up to collect the Turing Award, the closest thing computing has to a Nobel, and uses his acceptance speech to describe a crime. He and Dennis Ritchie are being honored for building Unix. Thompson wants to talk about how he could walk into any Unix machine in the world through a door nobody would ever find.
The recipe has three steps. First, teach the C compiler, the program that turns human-readable code into something a machine can run, to recognize when it is compiling the login program. When it sees login, it adds a second password that always works. The login source stays untouched. The backdoor lives only in the compiled binary.
Second, teach the compiler to recognize when it is compiling a compiler, and to insert both tricks into the new one. Now the trick reproduces. Every compiler built by this compiler carries it, and so does every compiler built by those.
Third, delete the trick from the compiler's source code. The binary still has it, and the binary builds the next binary. You can print out every line of the compiler and every line of login, read them with a magnifying glass, and find nothing. The published talk, Reflections on Trusting Trust, ends with the line everyone quotes: "You can't trust code that you did not totally create yourself."
For forty years that was where the story stopped, a thought experiment from a man with a good imagination. Then in 2023 Russ Cox, who ran the Go language at Google, emailed Thompson after watching him give a talk and asked whether the code had ever existed. Thompson wrote back that he still had it. He sent an archive called nih.a containing about 99 lines of C and a 20-line shell script. The file timestamps say June 1975. The magic password was "codenih", and it only opened accounts that already existed. Thompson told Cox the whole thing had been "very carefully controlled" and that he never used it on anyone.
He used it on one group, and that is the part worth telling. One copy got out. A group at Bell Labs called PWB, which ran the Programmer's Workbench, was talked into taking the compromised compiler, and the backdoor made it into their login program. John Mashey, who was on that team, later described how they figured it out. Nobody read the source and spotted the trap. The source was clean. What they noticed was that the compiler got bigger every time it compiled itself.
Thompson's code had a bug. Each time the compiler rebuilt itself, it added one extra null byte to the string holding the trick. Unix V6 rounded binaries to even sizes, so the compiler grew by two bytes every second generation. Nobody was looking for a backdoor. Somebody was looking at a file size and wondering why it would not hold still. PWB broke the chain and rebuilt a clean compiler, and the only working copy of the most famous backdoor in computing was dead by the end of the seventies.
That is the part of the story I keep coming back to. The perfect hack, the one that survives any audit of the source, was caught by a scale.
I have been suspicious of toolchains for a long time. In 2013 I was tweeting about NSA backdoors in NIST standards and asking how deep the rabbit hole went, and the honest answer is that it goes all the way down to whoever built the thing that built the thing you are reading. Thompson's point was about compilers, but the compiler is only the clearest example of a general rule. Anything that produces the next copy of itself can carry something the copy will never see.
Which brings me to parents.
You were compiled before you could read. The temper, the way your mother goes silent in the car, the particular arithmetic your father does before he decides whether something is worth getting upset about. None of it was written down. Nobody sat you on the couch and explained the method. It was built into the binary, by a binary that had it built in by an earlier one, and the source you can actually inspect, the stories your family tells about itself, is clean.
In a class on genetics in 2014 I wrote that I had always thought I took after my father, the shorter temper and the calculating, logical way of deciding things. I wrote it like a fact about eye color. It took another decade to notice that I had not been describing an inheritance so much as demonstrating one.
i inherit all the pain / then i repeat it like history
So you go to therapy and read your own source. You tell the story of your childhood and it checks out. The parents were fine, the house was fine, everyone did their best. The audit comes back clean, because the audit can only read what was written down, and the thing that matters was never written down. It was compiled in.
There is a trap on the other side too, which is auditing yourself so hard that the auditing becomes the inherited behavior. Thompson's compiler would have passed any amount of reading. Reading harder was never going to work.
Look at the weight instead. The thing that gets a little bigger every time it runs. The argument that lasts two minutes longer each year. The silence that used to end by dinner and now ends the next morning. You will not find the inheritance by reading yourself line by line. You find it the way PWB found it, by noticing that something that should stay the same size keeps growing, and asking what is in there.
Your source is clean. That is what worries me.
The painting: Pieter Bruegel the Elder, The Blind Leading the Blind (1568), Museo di Capodimonte, Naples. Public domain.
Sources