r/programming • • Apr 09 '14

Theo de Raadt: "OpenSSL has exploit mitigation countermeasures to make sure it's exploitable"

[deleted] — view deleted post

2.0k Upvotes

661 comments sorted by

View all comments

Show parent comment

4

u/[deleted] Apr 09 '14

He does, and is right that this is very much a flat memory model issue (of which C and C++ are by far the most important examples). I challenge you to reproduce any of these problems in Java, Smalltalk, Scheme, .NET (managed) or any functional language (Haskell, whatever you want).

Rust and ATS are memory safe without requiring a different memory model than C and C++. Their version of memory safety also includes preventing all data races. A garbage collector is not required for safety.

And sure, you get exploitable VM bugs in return, that's true. But those can at least be fixed by just updating the VM and not all programs written against it.

It's not possible to write a secure TLS implementation in these languages due to side channels.

-2

u/[deleted] Apr 09 '14

If I used unsafe code in Rust, can I still blame the language? If I made a conscious choice to use that unsafe code for performance reasons, and then got fucked for it, am I still allowed to blame the language?

Because that's exactly what is happening here.

It's not possible to write a secure TLS implementation in these languages due to side channels.

Here we go again, with your hypotheticals that have no basis in reality. I already gave you what you asked for yesterday and then you decided to nitpick my examples while not answering any of my concerns or questions

6

u/[deleted] Apr 09 '14

If I used unsafe code in Rust, can I still blame the language? If I made a conscious choice to use that unsafe code for performance reasons, and then got fucked for it, am I still allowed to blame the language?

C does not draw any bounds between safe and unsafe code, it's all unsafe. It's not capable of abstracting resource handling and buffer management to the point where it's not possible for the high-level code to get it wrong. It has no destructors, checked reference lifetimes, etc.

There is no way to opt-in to a safe subset of C, even expensive static analysers only catch a fraction of these bugs.

Here we go again, with your hypotheticals that have no basis in reality. I already gave you what you asked for yesterday and then you decided to nitpick my examples while not answering any of my concerns or questions

It's well known why writing most cryptographic algorithms in languages using a VM is infeasible without side channels... it's not a hypothetical.