*

Offline Lord Dave

  • *
  • Posts: 7672
  • Grumpy old man.
    • View Profile
HeartBleed - Why so long?
« on: April 10, 2014, 01:27:47 AM »
Why do you guys think it took the open source community so long to find this exploit?  And how did it even GET to the point of being an exploit?
If you are going to DebOOonK an expert then you have to at least provide a source with credentials of equal or greater relevance. Even then, it merely shows that some experts disagree with each other.

*

Offline Rushy

  • Planar Moderator
  • *****
  • Posts: 8580
    • View Profile
Re: HeartBleed - Why so long?
« Reply #1 on: April 10, 2014, 02:32:50 AM »
The NSA.

*

Offline xasop

  • Administrator
  • *****
  • Posts: 9777
  • Professional computer somebody
    • View Profile
Re: HeartBleed - Why so long?
« Reply #2 on: April 10, 2014, 12:33:23 PM »
You ask those questions as if this surprises you.
when you try to mock anyone while also running the flat earth society. Lol

*

Offline markjo

  • *
  • Posts: 7849
  • Zetetic Council runner-up
    • View Profile
Re: HeartBleed - Why so long?
« Reply #3 on: April 10, 2014, 04:16:38 PM »
Are you saying that it shouldn't be a surprise that a know bug this serious should take so long to fix?
Abandon hope all ye who press enter here.

Science is what happens when preconception meets verification.

Ignorance more frequently begets confidence than does knowledge. -- Charles Darwin

If you can't demonstrate it, then you shouldn't believe it.

*

Offline xasop

  • Administrator
  • *****
  • Posts: 9777
  • Professional computer somebody
    • View Profile
Re: HeartBleed - Why so long?
« Reply #4 on: April 10, 2014, 11:21:10 PM »
Are you saying that it shouldn't be a surprise that a know bug this serious should take so long to fix?

...
when you try to mock anyone while also running the flat earth society. Lol

*

Offline juner

  • Planar Moderator
  • *****
  • Posts: 10178
    • View Profile
Re: HeartBleed - Why so long?
« Reply #5 on: April 11, 2014, 03:31:13 PM »
This is why everyone should use Microsoft IIS for their web server needs.

*

Offline Lord Dave

  • *
  • Posts: 7672
  • Grumpy old man.
    • View Profile
Re: HeartBleed - Why so long?
« Reply #6 on: April 11, 2014, 08:05:37 PM »
As I understand it, the bug basically allowed the client to define the length of the heartbeat reply even though the data requested may be a different size.

That's kinda dumb.
If you are going to DebOOonK an expert then you have to at least provide a source with credentials of equal or greater relevance. Even then, it merely shows that some experts disagree with each other.

*

Offline Rushy

  • Planar Moderator
  • *****
  • Posts: 8580
    • View Profile
Re: HeartBleed - Why so long?
« Reply #7 on: April 12, 2014, 01:08:23 AM »
Heartbleed wouldn't have happened if everyone used Assembly like a real man.

*

Offline Lord Dave

  • *
  • Posts: 7672
  • Grumpy old man.
    • View Profile
Re: HeartBleed - Why so long?
« Reply #8 on: April 12, 2014, 01:59:50 AM »
Heartbleed wouldn't have happened if everyone used Assembly like a real man.
But are there any real men in programming? 
If you are going to DebOOonK an expert then you have to at least provide a source with credentials of equal or greater relevance. Even then, it merely shows that some experts disagree with each other.

*

Offline xasop

  • Administrator
  • *****
  • Posts: 9777
  • Professional computer somebody
    • View Profile
Re: HeartBleed - Why so long?
« Reply #9 on: April 12, 2014, 05:56:09 AM »
As I understand it, the bug basically allowed the client to define the length of the heartbeat reply even though the data requested may be a different size.

That's kinda dumb.

Correct, but bugs happen all the time. In all the many millions of lines of open-source code written each year, there are going to be many thousands of bugs, some of them severe. Some of those are going to appear in crypto software, and of those, one every few years is going to make it into a production release without being noticed because neither coders nor code reviewers are perfect.

People make mistakes. If you don't want to risk using buggy software, switch off your computer.
when you try to mock anyone while also running the flat earth society. Lol

*

Offline Lord Dave

  • *
  • Posts: 7672
  • Grumpy old man.
    • View Profile
Re: HeartBleed - Why so long?
« Reply #10 on: April 12, 2014, 11:25:30 AM »
As I understand it, the bug basically allowed the client to define the length of the heartbeat reply even though the data requested may be a different size.

That's kinda dumb.

Correct, but bugs happen all the time. In all the many millions of lines of open-source code written each year, there are going to be many thousands of bugs, some of them severe. Some of those are going to appear in crypto software, and of those, one every few years is going to make it into a production release without being noticed because neither coders nor code reviewers are perfect.

People make mistakes. If you don't want to risk using buggy software, switch off your computer.
But I thought the whole point of open source was so that anyone can see the code and find bugs.  I can understand it making it into production but it seems odd that not only was it obvious to me that this is a problem (clients dictating memory return?) But that it took 2 years of the open source community having full access to the source code before it was found.  I could understand 6 months but 2 years is a long time to not read and audit one of the most important pieces of software on the net.
If you are going to DebOOonK an expert then you have to at least provide a source with credentials of equal or greater relevance. Even then, it merely shows that some experts disagree with each other.

*

Offline xasop

  • Administrator
  • *****
  • Posts: 9777
  • Professional computer somebody
    • View Profile
Re: HeartBleed - Why so long?
« Reply #11 on: April 12, 2014, 12:13:18 PM »
But I thought the whole point of open source was so that anyone can see the code and find bugs.

That is one of its advantages. If OpenSSL were proprietary, this bug would probably still exist.

I can understand it making it into production but it seems odd that not only was it obvious to me that this is a problem (clients dictating memory return?)

It's obvious to anyone after someone has found the problem. Can you say with absolute certainty that it would have been obvious to you reading the code with no knowledge of the bug?

But that it took 2 years of the open source community having full access to the source code before it was found.  I could understand 6 months but 2 years is a long time to not read and audit one of the most important pieces of software on the net.

Why does that surprise you?
when you try to mock anyone while also running the flat earth society. Lol

*

Offline Rushy

  • Planar Moderator
  • *****
  • Posts: 8580
    • View Profile
Re: HeartBleed - Why so long?
« Reply #12 on: April 12, 2014, 03:33:49 PM »
Believe it or not "open source" is not a catch-all security property. No one is sitting around all day looking at millions of lines of code in open source projects and trying to find bugs, if they are, they have a lot of time on their hands or they're getting paid to do it.

*

Offline Lord Dave

  • *
  • Posts: 7672
  • Grumpy old man.
    • View Profile
Re: HeartBleed - Why so long?
« Reply #13 on: April 12, 2014, 03:56:09 PM »
I can understand it making it into production but it seems odd that not only was it obvious to me that this is a problem (clients dictating memory return?)

It's obvious to anyone after someone has found the problem. Can you say with absolute certainty that it would have been obvious to you reading the code with no knowledge of the bug?
I can honestly say this: if the code or coder tells me that the client determines the length of the heartbeat separately from the heartbeat signal, I'd say its a problem.  I pretty much say that for anything really.  If the server isn't calculating length from the data given then you're just asking for problems.
Put it this way: if you had a subroutine that accepted an array of unknown length as input, would you have that subroutine also accept the length of the array as a separate variable or would you have the subroutine calculate that yourself?

Quote
But that it took 2 years of the open source community having full access to the source code before it was found.  I could understand 6 months but 2 years is a long time to not read and audit one of the most important pieces of software on the net.

Why does that surprise you?
1. Reading this code is a great way to learn about encrypted connections so I'd see it being read by a lot of students.
2. As something that is vastly important to a lot of very large companies, I can see the code being poured over by people looking for exploits: both for good and not so good reasons.
If you are going to DebOOonK an expert then you have to at least provide a source with credentials of equal or greater relevance. Even then, it merely shows that some experts disagree with each other.

*

Offline xasop

  • Administrator
  • *****
  • Posts: 9777
  • Professional computer somebody
    • View Profile
Re: HeartBleed - Why so long?
« Reply #14 on: April 12, 2014, 04:29:53 PM »
I can honestly say this: if the code or coder tells me that the client determines the length of the heartbeat separately from the heartbeat signal, I'd say its a problem.  I pretty much say that for anything really.

That isn't an answer to my question.

If the server isn't calculating length from the data given then you're just asking for problems.

You mean like how every binary-safe protocol ever works, including IP itself?

Put it this way: if you had a subroutine that accepted an array of unknown length as input, would you have that subroutine also accept the length of the array as a separate variable or would you have the subroutine calculate that yourself?

It depends on the nature of the contents of the array. If it's binary data and not a null-terminated string, you have to pass the length as a separate variable when you're working with C because there is no way to "calculate" the length of a piece of memory. All you get is a pointer; you need a size as well to know where to read up to.

You could use strlen() if you're passing a string and not binary data, but that's inefficient, particularly for large strings.

1. Reading this code is a great way to learn about encrypted connections so I'd see it being read by a lot of students.
2. As something that is vastly important to a lot of very large companies, I can see the code being poured over by people looking for exploits: both for good and not so good reasons.

That's probably true on both counts, which is why it's generally the subtler bugs that go unnoticed. In this case, all the existing code was doing the right thing; the bug was that there was missing code needed to do all the right things. It's a lot harder to read code and know what is missing than to see mistakes in what's already there.

Put another way, reading the buggy subroutines in isolation isn't sufficient to understand the problem. You need to understand where the function's inputs are coming from and what the server state is at the time it's executed before you realise that it's not doing all the validation it should be. Not just anyone skim-reading the code would pick up on it, especially if they're not specifically looking for bugs.
when you try to mock anyone while also running the flat earth society. Lol

Re: HeartBleed - Why so long?
« Reply #15 on: April 13, 2014, 03:32:38 AM »
I have visited from prestigious research institutions of the highest caliber, to which only our administrator holds with confidence.

*

Offline xasop

  • Administrator
  • *****
  • Posts: 9777
  • Professional computer somebody
    • View Profile
Re: HeartBleed - Why so long?
« Reply #16 on: April 13, 2014, 04:12:07 AM »
This is on point: http://www.vox.com/2014/4/12/5601828/we-massively-underinvest-in-internet-security

That article is pretty spot on, on all counts. The only thing I'd point out (in response to paragraph 3) is that it's not just the American economy that's at stake; this is an international problem.
when you try to mock anyone while also running the flat earth society. Lol

*

Offline Fortuna

  • *
  • Posts: 2979
    • View Profile
Re: HeartBleed - Why so long?
« Reply #17 on: May 12, 2014, 07:30:39 PM »
Heartbleed wouldn't have happened if everyone used Assembly like a real man.
But are there any real men in programming?

Fortran

*

Offline markjo

  • *
  • Posts: 7849
  • Zetetic Council runner-up
    • View Profile
Re: HeartBleed - Why so long?
« Reply #18 on: May 12, 2014, 08:21:15 PM »
Heartbleed wouldn't have happened if everyone used Assembly like a real man.
But are there any real men in programming?

Fortran
I remember learning Fortran in college.  Fun times.  We had to learn how to write a sort routine and the teacher showed us the bubble sort.  Me, being the smart ass that I am, decided to change a few lines and turn it into an exchange sort, which works a whole lot quicker.  It pissed off the teacher because he actually had to read my code to make sure that it worked right on the final exam.
Abandon hope all ye who press enter here.

Science is what happens when preconception meets verification.

Ignorance more frequently begets confidence than does knowledge. -- Charles Darwin

If you can't demonstrate it, then you shouldn't believe it.

*

Offline Particle Person

  • Planar Moderator
  • *****
  • Posts: 2987
  • born 2 b b&
    • View Profile
Re: HeartBleed - Why so long?
« Reply #19 on: May 12, 2014, 10:02:31 PM »
Heartbleed wouldn't have happened if everyone used Assembly like a real man.
But are there any real men in programming?

Fortran
I remember learning Fortran in college.  Fun times.  We had to learn how to write a sort routine and the teacher showed us the bubble sort.  Me, being the smart ass that I am, decided to change a few lines and turn it into an exchange sort, which works a whole lot quicker.  It pissed off the teacher because he actually had to read my code to make sure that it worked right on the final exam.

tl;dr
Your mom is when your mom and you arent your mom.