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

2

u/partyboy690 Apr 09 '14

What surprises me by this bug is that a program like OpenSSL isn't that heavily unit tested, I mean the most basic unit test would catch this. It is a programming error and a classic C error too, I don't exactly know how OpenSSL works so forgive me if some of this comes as ignorant but surely this process would be working in its own virtual set of memory, if it did try and access cached memory outside of the virtual set the operating system would complain regardless if it used a bespoke memory allocation routine?

4

u/hastor Apr 10 '14

Exactly, and a unit test would have caught the goto fail from Apple.

The problem with these crypto libraries is that their implementations are made to be untestable. The Chrome guys said that exactly the same code path as the goto fail from Apple was not testable in Chrome either.

We need to "dumb down" our crypto until we can at least write unit tests. Complex algorithms or implementations without tests cannot be used.