News for hackers. Stuff that matters.
Re:Quality Software Costs Money – Heartbleed Was Free by rando289 on Friday August 15, 2014 @03:44PM (#8183782)
C security software is being massively funded and is very successfully the basis for trillions of business, eg. the linux & windows & mac kernel. But, according to #1 voted random psuedonymous internet commenter, this is obviously a terrible idea.
Re:Quality Software Costs Money – Heartbleed Was Free by xenadu02 on Friday August 15, 2014 @11:05PM (#8185273)
All of which have had massive security flaws, including hundreds or even thousands of zero-day remote exploits. And that's just counting the C memory corruption bugs, not actual algorithmic bugs.

If C requires me to only code in certain styles and only use certain tools to only get some increase in safety... Why not just use a language that builds safety in from the beginning?

That said, we're just going to continue soldiering on because of horrible programmer attitudes like yours. Everyone wants to believe that they are a unique little snowflake who wouldn't make those kinds of mistakes (oh wait, Coverty couldn't catch Heartbleed, oops) and choose the comfortable fiction of a Just World where people get what they deserve. After all, if people just drove better we wouldn't have so many accidents, so why bother with air bags and seat belts? Better hope everyone else drives better too or you'll be changing all your passwords and keys with the rest of us schlubs no matter how fancy your valgrind test suite is.

Re:Quality Software Costs Money – Heartbleed Was Free by PhantomGremlin on Saturday August 16, 2014 @02:25AM (#8185531)
> oh wait, Coverty couldn't catch Heartbleed, oops

Not fair. Iirc the reason Coverity couldn't catch Heartbleed was because the OpenSSL people insisted on rolling their own inferior memory allocation. It would have worked if they just used the system malloc(). Coverity only works for normal programmers, it can't fully mitigate the ingenuity of complete fools.

Of course, my recollection could be wrong. In which case "someone is wrong on the Internet" will apply and someone will quickly set the record straight.

Re:Quality Software Costs Money – Heartbleed Was Free by jeffdavis on Saturday August 16, 2014 @03:01AM (#8185589)
"If C requires me to only code in certain styles and only use certain tools to only get some increase in safety... Why not just use a language that builds safety in from the beginning?"

What language actually meets the need? GC'd languages haven't proven themselves useful for things like OSs, databases, or libraries that are deployed extremely widely in many environments.

So what safe, non-GC language are you advocating?

Re:Quality Software Costs Money – Heartbleed Was Free by coldtea on Saturday August 16, 2014 @10:31AM (#8186310)
There are several available (and some in the making).

That they aren't more established for this kind of work is both a historical accident (bad moves with regards to licencing, etc) and a result of the cavalier, worse-is-better solutions the industry takes to everything, even when it's counter-productive (e.g with regards to security) that didn't let them catch on.

For some known ones, used at one point or another for those purposes, Ada, Pascal, Oberon, Modula, etc.

New contenders still in development include stuff like Rust, as a GC-optional newer contender. One wonders why it took until 2010+ to see another attempt at these kind of languages, as if we didn't have any issues with C/C++.

Re:Quality Software Costs Money – Heartbleed Was Free by zurn on Saturday August 16, 2014 @09:54AM (#8186198)
This is irrelevant (and false).

GC is orthogonal to memory safety.

(And all of those things have been successfully been done in GC'd languages.)

Re:Quality Software Costs Money – Heartbleed Was Free by jeffdavis on Saturday August 16, 2014 @01:11PM (#8186792)
Not sure what I said was false?

I agree that GC and memory safety are orthogonal -- see rust. But there aren't a lot of options if you want safe and non-GC, which was my point.

And GC is just not an option sometimes. GC has been around forever but it just hasn't proven itself in a lot of domains. I don't think it's for lack of trying, I think it's because sometimes you want to manage the memory.

Re:Quality Software Costs Money – Heartbleed Was Free by Curmudgel on Saturday August 16, 2014 @04:23PM (#8187438)
> GC'd languages haven't proven themselves useful for things like OSs,

What about Lisp Machines?

Re:Quality Software Costs Money – Heartbleed Was Free by lispm on Sunday August 17, 2014 @02:46AM (#8188806)
Lisp Machines provide ways to 'manually' manage memory for things like network stacks.

If a Lisp Machine is doing a global full GC (which it wants to avoid as much as possible), then it does not react in any useful way to inputs, the network, ...

Re:Quality Software Costs Money – Heartbleed Was Free by bashinator on Friday August 15, 2014 @04:40PM (#8184060)
It can be both successful and a terrible idea. Another example would be the single-user automobile becoming the dominant form of transit in the US.
Re:Quality Software Costs Money – Heartbleed Was Free by rando289 on Friday August 15, 2014 @04:49PM (#8184112)
It can be whatever you want to call it. Terrible in comparison to a fantasy land of candy and rainbows. OP is saying "as a community we should say no to funding C security software". It's about as insightful as saying anyone who uses a car is dumb.
Re:Quality Software Costs Money – Heartbleed Was Free by bashinator on Friday August 15, 2014 @08:02PM (#8184948)
Wow, that wasn't what I was saying at all. Read my post again - using (mostly) single-occupancy internal-combustion automobiles as the primary form of transit for the world's population is a terrible idea. When the car was first invented, I don't think anyone was thinking about 40,000 road deaths a year and CO2 pollution causing global climage change. When UNIX and linux kernels were written in C, nobody was thinking about string formatting or memory allocation exploits being used to steal millions of credit card numbers. That doesn't mean that drivers are dumb, or kernel developers. It does mean that we're living with the terrible consequences of various first-to-market success stories.
Re:Quality Software Costs Money – Heartbleed Was Free by prodigal_erik on Friday August 15, 2014 @05:08PM (#8184235)
I'm not saying writing secure software in C is inherently impossible, but I'm not aware of it having ever been accomplished, and by now yet another attempt shows such poor judgment that funding ought not be provided. Certainly Linux has had remote root exploits, and so many local exploits that its multi-user model is no longer taken very seriously, and the other kernels have fared no better.
Re:Quality Software Costs Money – Heartbleed Was Free by bstx on Friday August 15, 2014 @09:26PM (#8185090)
> I'm not saying writing secure software in C is inherently impossible, but I'm not aware of it having ever been accomplished

https://sel4.systems

Possibly one of the most trustworthy pieces of software there is.

Re:Quality Software Costs Money – Heartbleed Was Free by Intermernet on Saturday August 16, 2014 @06:01AM (#8185813)
The sneaky thing they did is write seL4 in Literate Haskell, and then translate it to C. That involves some serious understanding of both languages!

http://ssrg.nicta.com.au/projects/seL4/tech.pml

Re:Quality Software Costs Money – Heartbleed Was Free by prodigal_erik on Saturday August 16, 2014 @12:39AM (#8185427)
Man, I'd forgotten about that project. I wonder how much of the code could have been written differently and how much was effectively dictated by the theorem prover. Those are probably the very first people in the industry who deserve to be called engineers.
Re:Quality Software Costs Money – Heartbleed Was Free by Dewie on Saturday August 16, 2014 @06:04AM (#8185818)
So what did they do? Write the code in C and then proved it with Isabelle/HOL? Extracted C code from Isabelle/HOL?
Re:Quality Software Costs Money – Heartbleed Was Free by beagle3 on Saturday August 16, 2014 @05:27AM (#8185774)
d.j.b software (qmail, nacl, dnscurve, others). It is rare, but it has been done.
Re:Quality Software Costs Money – Heartbleed Was Free by _delirium on Saturday August 16, 2014 @01:24PM (#8186825)
Even djb software has your usual C-type security issues, though in less frequency than normal. qmail had an integer overflow that was theoretically exploitable, but couldn't be practically exploited in a normal configuration (djb admitted that was "pure luck"). And djbdns had an integer overflow that was exploitable (though in fairly unusual circumstances): http://article.gmane.org/gmane.network.djbdns/13864
Re:Quality Software Costs Money – Heartbleed Was Free by borplk on Saturday August 16, 2014 @12:57PM (#8186761)
Oh the irony. Those that you mention are also safe until proven otherwise.

I remember before Heartbleed was discovered everyone was raving about how secure OpenSSL is because it has been around for so long yadda yadda ... Heartbleed was discovered and everyone's suddenly acting "haha I knew it all along .. it was shit".

Re:Quality Software Costs Money – Heartbleed Was Free by beagle3 on Saturday August 16, 2014 @04:57PM (#8187552)
Everything is safe only until proven otherwise. Java will save you from (say) buffer overflows, but not SQL injections or permission errors (the most probable successful attack against Apache servers had always been writable executable directories, even though it is written in C and had its share of buffer overflows)

And if your circle thought OpenSSL was tight, you are hanging in the wrong circles for security. Heart less was exceptionally bad, but OpenSSL for a long time had a couple of security fixes a month on Ubuntu and Debian - that's enough to tell you that you need to follow advisories closely and not trust blindly. And yes, I have been saying that for at least 5 years, before heartbleed was introduced.

Re:Quality Software Costs Money – Heartbleed Was Free by Sanddancer on Friday August 15, 2014 @07:12PM (#8184804)
Conversely, the well-audited OpenBSD kernel has had next to none of these problems precisely because they pay attention to correctness, even with the "fatigued and rusty scrap iron" that is the C language.
Re:Quality Software Costs Money – Heartbleed Was Free by PhantomGremlin on Saturday August 16, 2014 @02:31AM (#8185542)
I'm sure that OpenBSD is much more secure in general than Linux. I love it and use it as my own firewall.

But even OpenBSD has had its share of local root exploits. They've even had 2 remote root exploits, and so few only because most services are disabled by default.

Re:Quality Software Costs Money – Heartbleed Was Free by Sanddancer on Saturday August 16, 2014 @03:17AM (#8185612)
True. However, they also as a group have done some pretty significant research into problems declared solved in order to make systems more secure. For example, the change a few years back to make malloc based on mmap instead of more traditional heap pools, so that if there is an overflow, the program's much more likely to segfault than to go gleefully trampling over data, etc.

Additionally, it's worth keeping in mind that the reason for the OpenBSD team forking OpenSSL wasn't Heartbleed, but rather the OpenSSL team's rather terribly coded malloc replacement that did things in there. All of the security research and practices the OpenBSD team typically insists upon couldn't do anything because OpenSSL insisted on running in its own leaky memory box.

Re:Quality Software Costs Money – Heartbleed Was Free by rando289 on Friday August 15, 2014 @05:41PM (#8184384)
> I'm not saying writing secure software in C is inherently impossible, but I'm not aware of it having ever been accomplished

Kinda proves my point.