News for hackers. Stuff that matters.
Re:CompCert: A formally verified optimizing C compiler by khaki54 on Monday March 02, 2015 @09:54AM (#9132057)
So is this protected from the "Ken Thompson Hack"? http://c2.com/cgi/wiki?TheKenThompsonHack

I guess it would have to be cross compiled for your system otherwise your existing compiler could corrupt it...

Re:CompCert: A formally verified optimizing C compiler by vilhelm_s on Monday March 02, 2015 @10:44AM (#9132320)
It's not self-hosted, so it is not yet at the point where the Thompson hack would apply.

That is, CompCert is a C compiler, but it's not written in C, it's written in Coq. So when you use it, you have to trust that the Coq implementation was written correctly, and that nobody has inserted any backdoors in Coq which insert backdoors in Compcert which insert backdoors in your program.

The next level would be to also have a verified Coq compiler, which would make the whole system that much more trustworthy. And at _that_ point you could worry about self-perpetuating backdoors in that compiler, and ways to mitigate them.

Re:CompCert: A formally verified optimizing C compiler by more_original on Monday March 02, 2015 @04:42PM (#9134526)
Oh, but they're already building a verified Coq compiler: http://www.cs.princeton.edu/~appel/certicoq/
Re:CompCert: A formally verified optimizing C compiler by jerf on Monday March 02, 2015 @10:42AM (#9132304)
Unless you implement the proved compiler from scratch yourself, no.

If you're not doing massive amounts of implementation yourself, you have not escaped from Ken Thompson's hack. All this does is rephrase how they promise to not hack you... it doesn't change the fact that what they say they do and what they actually do have nothing in particular connecting them.

I wouldn't worry about it until strong AI comes along though. Humans are barely capable of making compilers that work, let alone shipping compromised compilers. (I know Ken demonstrated his hack, but to make something that does that under controlled conditions is one thing, to make one that could be shipped and robustly implement the hack quite another.)

Re:CompCert: A formally verified optimizing C compiler by puetzk on Monday March 02, 2015 @10:37AM (#9132273)
As long as it's also capable of reproducible builds (and I would think the proofs would be very hard if the output is not even predictable!), you should be able to cross-build it from a certified platform, and bootstrap it from a trusted one (or more than one), and the bootstraps should converge to an identical binary, thus giving you both claims.