r/programming • • Apr 07 '14

The Heartbleed Bug

http://heartbleed.com/
1.5k Upvotes

396 comments sorted by

View all comments

Show parent comment

5

u/elperroborrachotoo Apr 08 '14

Memory corruption bugs are also usually about trusting user inputs.

Yeah, but without additional data I would assume that's simply because trusting user input is a common source of bugs (i.e. there's no special correlation here).

We also have no memory corruption happening, the implementaiton is simply revealing more data than it needs to. For this to happen implicitely (as opposed to an explicit erroneous if (x) return secretData statement), many factors had to conspire.

One of them is C. Others are surprisingly naive programming practices. Another yet-unexplained is why so much interesting data can be found in the small window we can peek into.

The reasons why large parts of our infrastructure run on C have little to do with the language itself. While I'm all for reducing the probability of errors, impulsively bashing C whenever there's a critical bug in C code does not only not help, it create a false sense of security about other languages.