News for hackers. Stuff that matters.
Re:Quality Software Costs Money – Heartbleed Was Free by Nursie on Saturday August 16, 2014 @10:14AM (#8186252)
We don't.

It's more than possible to write good software in C. It's more than possible to write bad software in any other language. Particularly where security is concerned C can give you control of operation timings and various other side-channels that others don't.

C has not caused a single buffer overrun. Lazy coders have.

Re:Quality Software Costs Money – Heartbleed Was Free by pmahoney on Saturday August 16, 2014 @10:39AM (#8186340)
> C has not caused a single buffer overrun. Lazy coders have.

That's like saying exposed high voltage lab equipment has not caused a single shock, careless lab techs bumping into it have.

When you design for safety, you assume mistakes will happen, and you design accordingly. Continuing with the voltage example, for a low voltage, one that will shock but not cause lingering pain, a simple barrier would suffice to prevent careless bumping into. For higher voltage, a box with a door connected to an interlock that cuts power when the door is open is better. To receive a shock, either the interlock would need to fail, or the operator would need to deliberately defeat it. In even higher voltage situations, where the shock could cause permanent damage or death, trusting that single interlock would be insufficient, and further protections would be needed.

In general, assume mistakes will happen, and design so that a serious failure requires multiple mistakes and/or multiple component failures. Never trust your life to a single component not failing.

Whether C "causes" buffer overruns is irrelevant semantics. Using plain C without strong static analysis is equivalent to working directly on exposed voltage. Perfectly fine when nothing bad will happen as a result of inevitable mistakes. Negligent when securing a bank.

Re:Quality Software Costs Money – Heartbleed Was Free by Nursie on Monday August 18, 2014 @09:17AM (#8192462)
>> When you design for safety, you assume mistakes will happen, and you design accordingly.

Yes, and if more people working in C did this then we'd be better off. As it is there are a lot of hacks and awful coders who shouldn't be let near a line of basic, let alone anything with security impact, but they still find their way into banking, payments and other financial, security critical code.

Call me naive, but I reckon these absolute muppets will find a way to f*ck up regardless of language technology. You can't force someone to write correct code who doesn't really understand WTF they're doing, and no framework or language is going to fix that.

Re:Quality Software Costs Money – Heartbleed Was Free by defen on Saturday August 16, 2014 @12:12PM (#8186610)
You've constructed your argument in such a way that is both inarguable, and non-actionable. Yes, it's true that with sufficient patience, attention to detail, time, and money, you can write sophisticated, secure software in C.

However, in the real world, it turns out that programmers are "lazy" (which is a pretty condescending way to describe it, btw). It's a fact that programmers using C have been responsible for millions, if not billions of dollars in economic losses due to simple buffer overflows, integer overflows, use after free, etc. So is the solution to come up with something better than C, or is it to just tell people to stop being lazy and hope they stop producing these bugs?

Re:Quality Software Costs Money – Heartbleed Was Free by Nursie on Monday August 18, 2014 @09:18AM (#8192466)
The solution would be to stop hiring incompetents who shouldn't be allowed near a line of BASIC let alone anything else, from being allowed anywhere near sensitive code, regardless of language.