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

1

u/[deleted] Apr 09 '14

I'm honestly not sure how you can suggest that "C or C++ is not at fault here" with a straight face.

Note that I'm not saying that the OpenSSL team was following best practices, but we could point to any bug and simply say "well, the programmer shouldn't have done that!". Obviously that's trivially true, but it's not a terribly useful statement.

C absolutely was at fault here - any language which does not permit unsafe access to memory would have rendered this bug impossible. If this were one of a few C memory access bugs that had ever occurred throughout history, fine, the programmers are just idiots. But when it happens over and over and over again, at what point do we actually admit that it is almost impossible to write safe software using C?

Based on this and countless other bugs, even the best programmers obviously can't write safe non-trivial software in C. So why do we keep blaming the programmers?

-2

u/[deleted] Apr 09 '14

Another person who has not read the thing they are commenting on. And continue to blame it on C, despite standard tooling that prevents exactly what happened.

If you're not going to read, and you don't actually understand the problem, then don't comment.

4

u/[deleted] Apr 09 '14

I did read it. I fully understand that this problem would have been caught if they had used the standard malloc / free. Just as every other bug would have been caught or not happened in the first place if the programmers had done things the right way. Pointing out that the programmers made a mistake in conjunction with a bug is a tautology; of course the programmers did something wrong, otherwise there wouldn't have been a bug.

Buffer overflows, reading from uninitialized memory, and other such problems have been a constant and unavoidable plague on C software. C is simply not safe for human use.

3

u/[deleted] Apr 09 '14

I did read it. I fully understand that this problem would have been caught if they had used the standard malloc / free.

It would have been prevented on OpenBSD, because they value security a lot more than performance. No other widely used allocator implementation has these protections. It's possible to opt-in to them in jemalloc (zero and junk fill options), but it's marked as a debugging feature and is not used by the three biggest users (Facebook, Firefox + other Mozilla applications, FreeBSD libc).

1

u/[deleted] Apr 10 '14

Well, sure, but catching it anywhere would have exposed the problem and presumably resulted in a fix for all platforms.

1

u/[deleted] Apr 10 '14

I don't think it would have been caught this way without using a fuzzer, unless this was actually being exploited in the wild.

-1

u/[deleted] Apr 09 '14

Pointing out that the programmers made a mistake in conjunction with a bug is a tautology

I think it's a little bit more nuanced than that.

Buffer overflows, reading from uninitialized memory, and other such problems have been a constant and unavoidable plague on C software. C is simply not safe for human use.

It works pretty damn well, considering it runs the majority of software you use every. single. day.

3

u/[deleted] Apr 09 '14

It works pretty damn well, considering it runs the majority of software you use every. single. day.

I didn't say it didn't work. I said it's not safe. Those are very, very different things.

Things can work fine for typical day-to-day use while being full of security holes which only show up under deliberate attack. C is an incredibly unsafe programming language, and is responsible for the vast majority of security problems found in the wild. And yes, many of those security holes have occurred in software I use "every. single. day.".

-3

u/[deleted] Apr 09 '14

I said it's not safe. Those are very, very different things.

Um, to a degree. But not really.

and is responsible for the vast majority of security problems found in the wild.

Err, no? Not only does this go against common knowledge, you have no figures to back this up.

-2

u/newmewuser Apr 09 '14

So why do we keep blaming the programmers?

Looks like you always worked alone motherfucker.