News for hackers. Stuff that matters.
Re:Moving the Linux Kernel to Modern C by nl on Thursday February 24, 2022 @04:20PM (#30460452)
Ken Thompson's "cc hack" - Presented in the journal, Communication of the ACM, Vol. 27, No. 8, August 1984, in a paper entitled "Reflections on Trusting Trust", Ken Thompson, co-author of UNIX, recounted a story of how he created a version of the C compiler that, when presented with the source code for the "login" program, would automatically compile in a backdoor to allow him entry to the system.

https://www.win.tue.nl/~aeb/linux/hh/thompson/trust.html

The paper's a pretty entertaining read:

> First we compile the modified source with the normal C compiler to produce a bugged binary. We install this binary as the official C. We can now remove the bugs from the source of the compiler and the new binary will reinsert the bugs whenever it is compiled. Of course, the login command will remain bugged with no trace in source anywhere.

There are no comments on this comment yet.