Re:That Time Ken Thompson Wrote a Backdoor into the C Compiler
by fjfaase on Saturday October 25, 2025 @07:54AM
(#45703145)
One can find it out with a decompiler and a lots and lots of free time. Compilers are not trivial programs, especially the ones needed to compile operating systems, with the required optimizations, and there are many ways to obfuscate code.
A better approach is to start with a small executable, one that translate hexadecimal numbers to binary, and from that build all the tools to compile a simple C compiler (such as the Tiny C Compiler, which is not very tiny), to compile the optimizing C compiler that can compile operating systems. That is the approach followed by the live-bootstrap project.
Re:That Time Ken Thompson Wrote a Backdoor into the C Compiler
by colejohnson66 on Saturday October 25, 2025 @10:10AM
(#45704054)
That’s what Guix did. All the way back to a 357 byte assembly code blob that turns a hex file into a binary file, and can “compile” itself.
Re:That Time Ken Thompson Wrote a Backdoor into the C Compiler
by richardhenry on Saturday October 25, 2025 @10:49AM
(#45704328)
If the compromised compiler also compiles the decompiler…
I have never seen the actual examples before, but the way it's always been described to me I kind of expected more...
It was always described as completely undetectable... so my assumption was one could not find it even with a decompiler and a lot of free time...
I guess I expected for instance it to filter patterns of itself out of fread for instance, such that a system built with it literally could not detect its existence at all. I expected it to make the operating system at large lie to you.