Slashdot Mirror


Heartbleed Coder: Bug In OpenSSL Was an Honest Mistake

nk497 (1345219) writes "The Heartbleed bug in OpenSSL wasn't placed there deliberately, according to the coder responsible for the mistake — despite suspicions from many that security services may have been behind it. OpenSSL logs show that German developer Robin Seggelmann introduced the bug into OpenSSL when working on the open-source project two and a half years ago, according to an Australian newspaper. The change was logged on New Year's Eve 2011. 'I was working on improving OpenSSL and submitted numerous bug fixes and added new features,' Seggelmann told the Sydney Morning Herald. 'In one of the new features, unfortunately, I missed validating a variable containing a length.' His work was reviewed, but the reviewer also missed the error, and it was included in the released version of OpenSSL."

447 comments

  1. It goes to show that... by marciot · · Score: 4, Insightful

    Coding and campaign do not mix.

    1. Re:It goes to show that... by ArsenneLupin · · Score: 0

      I think you mean champaign?

    2. Re:It goes to show that... by Anonymous Coward · · Score: 0

      Really, those are the worst Germans you can come up with?

    3. Re:It goes to show that... by Anonymous Coward · · Score: 0

      You need to initiate a campaign of learning how to spell champagne.

    4. Re:It goes to show that... by Anonymous Coward · · Score: 0

      What German could possibly do worse things than Poettering? The dude has committed crimes against humanity.

  2. Names! by Anonymous Coward · · Score: 0

    We know the coder, we don't know the reviewer.

    1. Re:Names! by bloodhawk · · Score: 4, Informative

      The reviewer was named too.Dr Stephen Henson

    2. Re:Names! by grub · · Score: 4, Informative

      PR: 2658

      Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de>
      Reviewed by: steve

      Support for TLS/DTLS heartbeats.

      Have a look for yourself. The reviewer "steve" is Stephen Henson.

      --
      Trolling is a art,
  3. Whatever you may think ... by Kittenman · · Score: 5, Interesting

    hats off to the developer who admits a mistake.

    I suspect s/he'll get pilloried in the press and may end up with some lawsuits (?) but I, for one, recognize a person big enough to take responsibility.

    --
    "The greatest lesson in life is to know that even fools are right sometimes" - Winston Churchill
    1. Re:Whatever you may think ... by Anonymous Coward · · Score: 2, Informative

      The RFC and the Git commit both have his name firmly attached to the "feature". He hasn't admitted anything that wasn't proven already.

    2. Re:Whatever you may think ... by Anonymous Coward · · Score: 0

      hats off to the developer who admits a mistake. .

      and what exactly was his other option? It was either a mistake or intentional, admitting it was a mistake is the least evil explanation he can get away with (I actually believe him but regardless there really was no other explanation that would cause him less pain).

    3. Re:Whatever you may think ... by Anonymous Coward · · Score: 5, Insightful

      may end up with some lawsuits (?)

      very difficult;

      a) the license clearly states the lack of warantee

      b) the source code is available so you could have audited if you want

      c) I for one will contribute considerably if that happens unless decent evidence is uncovered that he works for the NSA. I'm sure there are several others who will do the same.

    4. Re:Whatever you may think ... by Anonymous Coward · · Score: 4, Insightful

      Devil's advocate here: I have to thank the developer for even working on OpenSSL. I fear that the bad press and consequences coming down on these developers will scare more people off from core OSS projects and we will end up with more app developers on smartphones instead of infrastructure improvements.

      It would be nice if they had some sort of code review in place for this sort of stuff. However, this isn't a paid project, so the developers writing this are doing arguably the best they can.

    5. Re:Whatever you may think ... by ThatsMyNick · · Score: 1

      Well, he hasnt admitted to anything. He has two options 1) Admit it was malicious 2) Admit it was a mistake. It doesnt take a genius to figure out 2 is the best option.

    6. Re:Whatever you may think ... by glasshole · · Score: 0, Flamebait

      considerably

      A few $100 won't save anyone from the US justice machine. CHOO CHOO

    7. Re:Whatever you may think ... by im_thatoneguy · · Score: 5, Insightful

      Boy, if there's one thing that could ever kill Open Source it would be being held legally liable for a commit with a bug in it.

      Which is why all projects are released AS-IS without any liability.

    8. Re:Whatever you may think ... by grub · · Score: 5, Insightful


      Boy, if there's one thing that could ever kill Open Source it would be being held legally liable for a commit with a bug in it.

      It burns me that RSA is not held liable for their $10M NSA backdoor in Dual_EC_DRBG PRNG. Customers should be flocking in droves but RSA gives enough swag at conferences that the suits don't care.

      Your privacy sold off for $10M and some mouse pads.

      --
      Trolling is a art,
    9. Re:Whatever you may think ... by Anonymous Coward · · Score: 0

      hats off to the developer who admits a mistake.

      I suspect s/he'll get pilloried in the press and may end up with some lawsuits (?) but I, for one, recognize a person big enough to take responsibility.

      Too bad he wasn't working on the Obamacare website. Then he'd have nothing to worry about.

    10. Re:Whatever you may think ... by musmax · · Score: 5, Insightful

      No he has many more options than that. He did not need to respond at all, he does not need answer to anyone or is liable for anything, read the licence. If it was me and I was inclined to comment at all, I would just say: "Well shit, fuck me for trying. If you think you can do better - please do."

    11. Re:Whatever you may think ... by grub · · Score: 4, Informative


      RSA has denied having knowledge of the backdoor, says NSA tricked them, and has never denied the $10M payout. Some of Snowden's leaks mention it.
      Reuters has a summary

      proof-of-concept backdoor with a link to the github repo.

      None of that is a smoking gun, but there is enough smoke to tell me there is a fire.

      --
      Trolling is a art,
    12. Re:Whatever you may think ... by grub · · Score: 3, Interesting

      [sorry, link screwed up in my reply, should have checked more closely.]

      There is also a nice proof-of-concept backdoor with a link to the github repo.

      --
      Trolling is a art,
    13. Re:Whatever you may think ... by ThatsMyNick · · Score: 1

      Everyone already knew it is one of those two. Responding and choosing the easiest option doesnt take courage or make him any more liable. It would actually reduce liability. I agree he is not hiding, but he is being smart. A few words can save him a lot of trouble and lot of pestering by the media. If it was me (and I indeed made a mistake, or I had malicious intentions), I would have done the same. Not because I am courageous or anything, because that is the safest thing to do, right now.

    14. Re:Whatever you may think ... by GigaplexNZ · · Score: 4, Insightful

      Totally not the same thing. These companies have the option of not using OpenSSL. In your analogy, where's my option of not getting hit by you?

    15. Re:Whatever you may think ... by Krishnoid · · Score: 5, Funny

      hats off to the developer who admits a mistake.

      It's laudable but insufficient; to genuinely move towards making the aggrieved parties whole, I think it demands nothing short of a full refund.

    16. Re:Whatever you may think ... by hydrofix · · Score: 2

      may end up with some lawsuits (?)

      If you have ever wondered why all the popular open source licenses, like GPL, BSD and Apache, include the "warranty" and "limitation of liability" clauses, this is exactly why. The clauses usually state something like "this software is provided 'as is' and without any warranty. The user of the software assumes all risks that may arise. In no event shall the project or its contributors be liable for any damages."

    17. Re:Whatever you may think ... by gweihir · · Score: 2

      This is not the US. There will be no lawsuits. "No warranty" actually has meaning here.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    18. Re:Whatever you may think ... by Nidi62 · · Score: 0

      Totally not the same thing. These companies have the option of not using OpenSSL. In your analogy, where's my option of not getting hit by you?

      Well, you chose to be sitting on your couch when he drove into your living room, didn't you?

      --
      The only thing necessary for evil to triumph is for it to be pitted against a slightly greater evil
    19. Re:Whatever you may think ... by phantomfive · · Score: 1

      hats off to the developer who admits a mistake.

      Did he really have any other option here? Even if he did it on purpose, would he admit it?

      --
      "First they came for the slanderers and i said nothing."
    20. Re:Whatever you may think ... by Mitchell314 · · Score: 1

      Here you go: three internets.

      --
      I read TFA and all I got was this lousy cookie
    21. Re:Whatever you may think ... by Anonymous Coward · · Score: 1

      I'd like you to meet my friend, Mr. Straw Man.

    22. Re:Whatever you may think ... by symbolset · · Score: 4, Interesting

      As opposed to commercial software, which limits liability to the cost of the distribution media. That 3 centsmakes all the difference.

      --
      Help stamp out iliturcy.
    23. Re:Whatever you may think ... by GigaplexNZ · · Score: 5, Funny

      I didn't get to read his disclaimer prior to having my living room intruded by his vehicle so I was unable to make such an informed decision. He should have honked first.

    24. Re:Whatever you may think ... by blue+trane · · Score: 1

      No way, he should have pulled a Satoshi Nakamoto.

    25. Re:Whatever you may think ... by Anonymous Coward · · Score: 0

      Here, sir. I see you are in need of a pitchfork. Luckily, I have an extra.

    26. Re:Whatever you may think ... by Anonymous Coward · · Score: 0

      Someone posted a mathematical proof sometime last year.

    27. Re:Whatever you may think ... by DarwinSurvivor · · Score: 2

      Well, other than a frame job or stolen credentials.

    28. Re:Whatever you may think ... by cold+fjord · · Score: 2, Informative

      I'll go as far as it is reasonable to suspect there could be a fire. All of the background reading that I have done only shows that it may be possible that a backdoor exists, not that there actually is one. As for the RSA affair, it is entirely possible that they were simply trying to promote what was at the time a very hot and promising encryption technology.

      Of course keep in mind that it took people 20 years to figure out that NSA strengthened DES against cryptanalysis methods that were still secret when it changed the S-boxes before the DES standard was approved. NSA made DES stronger, not weaker.

      --
      much of left-wing thought is a kind of playing with fire by people who don't even know that fire is hot - George Orwell
    29. Re:Whatever you may think ... by grub · · Score: 5, Informative

      From the proof-of-concept page I mentioned above.

      Conclusion

      It is quite obvious in light of the recent revelations from Snowden that this weakness was introduced by purpose by the NSA. It is very elegant and leaks its complete internal state in only 32 bytes of output, which is very impressive knowing it takes 32 bytes of input as a seed.

      Here is the Github repo for the PoC code.

      This PRNG is not the NSA making a crypto system stronger ala DES, it's a backdoor.

      --
      Trolling is a art,
    30. Re:Whatever you may think ... by NiteMair · · Score: 1

      A more fitting analogy would be that you gave your car away for free and sent in the release of liability form so that if the person who ends up with your vehicle decides to use it for a hit-and-run without registering it in their name, at least there's a record showing that you have released liability to the DMV (aka, you sold the car, and you're no longer responsible for whatever happens with it)

    31. Re:Whatever you may think ... by Anonymous Coward · · Score: 0

      There's no strawman. Disclaiming warranty and/or liability is only as legally binding as a court of law decides not the person pushing the disclaimer.

    32. Re:Whatever you may think ... by Albanach · · Score: 3, Interesting

      Well pretty much anyone can start a lawsuit. But what damages are they suing for? Reimbursement of the purchase price?

      If you're using it, you're agreeing to the license:

        * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
        * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
        * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
        * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
        * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
        * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
        * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
        * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
        * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
        * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
        * OF THE POSSIBILITY OF SUCH DAMAGE.

      Now I am not a lawyer, and there are always folk looking for an opportunity to sue, but the license terms surely set them off on a bad start.

    33. Re:Whatever you may think ... by LordLimecat · · Score: 1

      Good luck with that lawsuit, what law was broken? There was no contract and no guarantee, implicit or explicit. OSS is generally "use at your own risk".

    34. Re:Whatever you may think ... by beltsbear · · Score: 1

      From the looks of his email address, he is not in the USA.

    35. Re:Whatever you may think ... by Kaenneth · · Score: 3, Funny

      I'm sure the next issue of Newsweek will have his confession.

    36. Re:Whatever you may think ... by donaldm · · Score: 1

      Good luck with that lawsuit, what law was broken? There was no contract and no guarantee, implicit or explicit. OSS is generally "use at your own risk".

      I think if you look at propriety software you will also find that it is "use at your own risk" and "best effort" although it may be obscured with more legalese wording. Making any programmer or software house libel for any mistakes unless they can be shown to be malicious would effectively stop software development in the county that IMHO stupidly allowed this to be part of that countries law.

      --
      There ain't no such thing as proprietary standards only proprietary formats. Standards are by definition open.
    37. Re:Whatever you may think ... by Anonymous Coward · · Score: 0

      The American way.

    38. Re:Whatever you may think ... by Anonymous Coward · · Score: 2, Informative

      A more fitting analogy is that you wrote an open source project, took the time to explain that the code is free and may not be perfect, and then someone ignored the warning that was available at the top of every source file, and ran into the current situation.

      It's not complicated enough to need analogies.

    39. Re:Whatever you may think ... by Jeremi · · Score: 1

      Did he really have any other option here? Even if he did it on purpose, would he admit it?

      Well, you have to admit that a response of "HAHAHA SUCKERS" would be a memorable one. I wonder if he considered doing that?

      --


      I don't care if it's 90,000 hectares. That lake was not my doing.
    40. Re:Whatever you may think ... by phantomfive · · Score: 1

      That would be memorable.

      --
      "First they came for the slanderers and i said nothing."
    41. Re:Whatever you may think ... by phantomfive · · Score: 1

      None of that is a smoking gun, but there is enough smoke to tell me there is a fire.

      Wow, now that is a mixed metaphor that is actually interesting

      --
      "First they came for the slanderers and i said nothing."
    42. Re:Whatever you may think ... by Anonymous Coward · · Score: 0

      Good luck with that lawsuit, what law was broken? There was no contract and no guarantee, implicit or explicit. OSS is generally "use at your own risk".

      Indeed. And this is also why many companies avoid it.

    43. Re:Whatever you may think ... by gbjbaanb · · Score: 1

      I think he should go further than that. Considering the damage caused, I say he should refund triple what he received, as a show of contrition and to serve as an example to other OSS developers.

    44. Re:Whatever you may think ... by bickerdyke · · Score: 1

      Don't even need a sign. You just need to show that I somehow agreed to your disclaimer.

      Reading others bumper stickers is not required, while reading the terms and conditions when you'Re taking some free software can be expected.

      --
      bickerdyke
    45. Re:Whatever you may think ... by mwvdlee · · Score: 1

      Yes you can and indeed the owner of the car would not be responsible.
      If anybody steals your car and hits somebody, you won't be liable.
      If you yourself are both owner and driver though...

      I think Skoda or Dacia or whatever car brand you drive is not liable for damage caused by the owners or drivers of their cars either.

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    46. Re:Whatever you may think ... by Big+Hairy+Ian · · Score: 1

      Agreed! Bearing in mind this was an open source and therefore a community project how come no one spotted this sooner? I mean shit its not like there aren't a thousand decent programmers who have downloaded the source!

      --

      Build a Man a Fire, and He'll Be Warm for a Day. Set a Man on Fire, and He'll Be Warm for the Rest of His Life.

    47. Re:Whatever you may think ... by Wootery · · Score: 1

      "Well shit, fuck me for trying. If you think you can do better - please do."

      I, for one, would welcome new safe-programming-language-using overlords.

      Apparently crypto in Ada need not be any slower than crypto in C. The programming language is just one piece of the puzzle of course (it wouldn't fix the lack of serious code scrutiny), but it would be a much more appropriate choice than C.

      (I don't mean to trivialise the OpenSSL project, but if a safer alternative did exist, I'd be all for it.)

      I'm surprised I haven't yet heard whether today's static-analysis/dynamic-analysis tools would have caught the Heartbleed bug.

    48. Re:Whatever you may think ... by gnupun · · Score: 1

      Which does not mean that a court of law will uphold it

      Well, writing bug-free software (as in 100% defect free) is insanely difficult and expensive. Is the consumer ready to pay 100x the original cost? Formally proving even small segments of code requires a long difficult proof and the proof itself may have bugs. Doing the same for large non-trivial programs exponentially so.

    49. Re:Whatever you may think ... by Monoman · · Score: 3, Interesting

      Occam's confession? Don't admit to being malicious if you can easily claim you made a mistake? :-)

      --
      Keep the Classic Slashdot.
    50. Re:Whatever you may think ... by TapeCutter · · Score: 3, Insightful

      Well, he hasnt admitted to anything.

      He has clearly stated it was his mistake. The third option you hint at is of course "Admit nothing", it's the preferred option for 10/10 corporations, governments, religions. This guy is an engineer, one who's moral compass points to option 2, he has stood up publically and owned his mistake so others can be aware of the problem and do something about (coincidently "what to do about HB" was the topic of discussion at work today).

      It doesnt take a genius to figure out 2 is the best option.

      Correct, doing the "right thing" doesn't require brains, it requires principles and the balls to live up to them.

      --
      And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.
    51. Re:Whatever you may think ... by bloodhawk · · Score: 1

      people and companies get sued all the time over things that they are supposedly protected from in the EULA/license. EULA's and licenses can't override laws and there are many laws around liability especially with negligence. Really it would come down to the court to decide if someone decided to sue over it and the outcome is far from guaranteed.

    52. Re:Whatever you may think ... by jellomizer · · Score: 1

      I hope he doesn't get too much more trouble. You should be really annoyed that they found the name of the guy who made the bug.

      If open source contributors get so much negitive press due to a bug, how do you think you will get other people to contribute to OSS projects?

      We all make bugs, this one got past layers of reviewers who should be as much in the blame too. But unlike companies who have insurance to cover these expensive legal attacks, the individual would just be crushed.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    53. Re:Whatever you may think ... by X0563511 · · Score: 4, Insightful

      ... likely because everyone thought someone else would have been looking at it.

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    54. Re:Whatever you may think ... by X0563511 · · Score: 2

      It's not the language that's at fault, it's the attitude that resulted in a gimpy "replacement" for malloc() being used for all platforms because some platforms had a slow malloc() once upon a time.

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    55. Re:Whatever you may think ... by xanclic · · Score: 1

      He didn't admit it voluntarily. He was basically forced to by several people clearly stating his name all over the internet, some implying it might be a backdoor. He basically didn't have a choice but to defend himself.

    56. Re:Whatever you may think ... by colfer · · Score: 1

      NSS? I'm no expert, but wonder why it's not used more. Force of habit? License differences? http://www.gossamer-threads.co...

    57. Re:Whatever you may think ... by colfer · · Score: 1

      Clearly $billion corporations like RedHat are going to spend more time auditing code commits, with or without lawsuits. Google found this bug and I wonder what kind of fork / NSS migration / whatever solution will emerge. NSS is from Mozilla, and Google revenue funds Mozilla.

      Maybe it will go as far as "OpenSSL considered harmful" and anything linked to it will be flagged. That would be too sensible.

    58. Re:Whatever you may think ... by AmiMoJo · · Score: 1

      Unless it's just a clever ploy to keep other engineers happy and less likely to accuse him of working for the NSA. Not saying there is any evidence, but you can't be too paranoid these days.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    59. Re:Whatever you may think ... by Anonymous Coward · · Score: 0

      You mean because this is essentially a public/private-key algorithm and NSA hasn't published the private key, it's not only possible but likely that they indeed don't have it?

    60. Re:Whatever you may think ... by nctritech · · Score: 1

      GnuTLS exists. NSS (and NSPR [Netscape Portable Runtime] which is a hard dependency) used to have to be extracted from Mozilla source code to compile too. It was really ridiculous when I compiled it for the first time. GnuTLS is (A) not OpenSSL and (B) doesn't require NSPR. There are also OpenSSL drop-in replacements that work well, such as CyaSSL.

    61. Re:Whatever you may think ... by Anonymous Coward · · Score: 0

      I do development of sorts (nothing so universally used). Every time I make a mistake I remind the client that if I were perfect they'd have to be paying me a lot more money. (I don't have to remind them very often)

    62. Re:Whatever you may think ... by jeremyp · · Score: 5, Insightful

      Two reasons:

      The idea that many eyes make all bugs shallow is a myth. Even most programmers don't bother auditing the open source code they download. I bet most of them don't really look beyond the API documentation.

      Also, OpenSSL is one of the worst code bases you'll ever set eyes on. It's poorly documented and so complex, it'll make your eyes bleed.

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    63. Re:Whatever you may think ... by cold+fjord · · Score: 1

      Actually no, it isn't a public/private key system. You can create the curve values without a secret key although it may also be possible to create a second set of values that aren't quite a key but a crib.

      --
      much of left-wing thought is a kind of playing with fire by people who don't even know that fire is hot - George Orwell
    64. Re:Whatever you may think ... by Anonymous Coward · · Score: 0

      That wouldn't stop the NSA from trying to recruit him. In fact, it might encourage them.

    65. Re:Whatever you may think ... by Anonymous Coward · · Score: 0

      I'm sure the next issue of Newsweek will have his confession.

      There are no more issues of Newsweek.

    66. Re:Whatever you may think ... by LordLimecat · · Score: 1

      Proprietary software at least you are paying for, which DOES provide some implicit guarantees. When you get FOSS, you have no ground to stand on because there was no implicit agreement, and you have the ability to do your own audit on the codebase.

    67. Re:Whatever you may think ... by Anonymous Coward · · Score: 0

      The same option as anyone else caught with their pants down: no comment. He didn't have to say anything at all, and instead he's publicly admitted that he made a mistake. Which makes him markedly better than most politicians.

    68. Re:Whatever you may think ... by cold+fjord · · Score: 1

      What he has shown is what was already known, that it is possible to generate a backdoor with the technology, not that an actual backdoor exists in the specification. It is like showing that anti-lock brakes can fail in a particular way, but not that the brakes of a particular model have that flaw. I understand the concern. I understand the suspicion. But the actual proof isn't there.

      Although this isn't a direct comparison, if you want to liken it to DES, people generated various alternates and random S-boxes for that to test too. They tended to not work as well as the S-boxes that NSA generated. Did that mean that the DES specification was bad? No.

      Did NSA Put a Secret Backdoor in New Encryption Standard?

      What Shumow and Ferguson showed is that these numbers have a relationship with a second, secret set of numbers that can act as a kind of skeleton key. If you know the secret numbers, you can predict the output of the random-number generator after collecting just 32 bytes of its output. To put that in real terms, you only need to monitor one TLS internet encryption connection in order to crack the security of that protocol. If you know the secret numbers, you can completely break any instantiation of Dual_EC_DRBG.

      The researchers don't know what the secret numbers are. But because of the way the algorithm works, the person who produced the constants might know; he had the mathematical opportunity to produce the constants and the secret numbers in tandem.

      Of course, we have no way of knowing whether the NSA knows the secret numbers that break Dual_EC-DRBG. We have no way of knowing whether an NSA employee working on his own came up with the constants -- and has the secret numbers. We don't know if someone from NIST, or someone in the ANSI working group, has them. Maybe nobody does.

      A backdoor is possible, but we have no way of knowing if one exists. You can generate the curve numbers without there being a backdoor, and that is simpler.

      --
      much of left-wing thought is a kind of playing with fire by people who don't even know that fire is hot - George Orwell
    69. Re:Whatever you may think ... by TheCarp · · Score: 1

      A more fitting analogy would be that you designed and built yourself a car, and posted the plans up online. Other people took your plans, built their own cars with it, and started selling them bundled with a bunch of accessories; while still others built their own to drive around.

      Now it turns out there is a major flaw in your design that makes it unsafe to drive. Clearly you are at fault for the design, but, are you at fault for all the places other people chose to use your design without reviewing it? You didn't sell it to them, you recieved no royalties, you didn't even get to review or approve what they used it for.

      Generally speaking, unless you have some relationship to the coder that would otherwise confer a liability (like you hired them to write that code, etc) I think its really the responsibility of the person building the service around it to make sure they are using good components.

      There is a world of difference between "Here is the product I make that works and can offer you" and "here are the plans for how I built mine, you can use them if you want"

      --
      "I opened my eyes, and everything went dark again"
    70. Re:Whatever you may think ... by Wootery · · Score: 1

      I thought it was an unchecked memcpy that was at fault, but you're not the only one I've seen mention memory-management weirdness. Would using ordinary malloc/free have prevented this?

    71. Re:Whatever you may think ... by Ihlosi · · Score: 1
      Every time I make a mistake I remind the client that if I were perfect they'd have to be paying me a lot more money.

      In fact, the amount of money is inversely proportional to the probability of bugs. A perfect developer costs an infinite amount of money.

    72. Re:Whatever you may think ... by SmilingBoy · · Score: 1

      Is the consumer ready to pay 100x the original cost?

      Absolutely in my case, at least when it comes to OpenSSL.

    73. Re:Whatever you may think ... by X0563511 · · Score: 1

      Yes, malloc() would have blown up on occurrence and the problem would have quickly been found and resolved. here's the skinny.

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    74. Re:Whatever you may think ... by Anonymous Coward · · Score: 0

      If somebody can prove malicious action he could be had under espionage laws in Germany. Except if it was espionage for The Imperium. That won't be prosecuted as all our legal and politico guys are sucking up to the empire.

    75. Re:Whatever you may think ... by zlives · · Score: 1

      yes that will stop US

    76. Re:Whatever you may think ... by idontgno · · Score: 1

      The WTF part of this (the kind that thedailywtf.com lives on) is that the RFC, which he co-authored, has this strong and specific warning:

      If the payload_length of a received HeartbeatMessage is too large, the received HeartbeatMessage MUST be discarded silently.

      He knew about the risk. He documented the risk. But come coding time, he forgot the risk.

      Ya gotta feel for that. How many times have I gotten up bleeding and dazed and said to myself "I knew that was a bad idea."

      --
      Welcome to the Panopticon. Used to be a prison, now it's your home.
    77. Re:Whatever you may think ... by ndogg · · Score: 1

      Sure, but I'm willing to bet there are some people that have paid for OpenSSL support, and I'm willing to bet they will get compensation for this.

      But still no lawsuit. Then again, this is what happens with proprietary software too.

      --
      // file: mice.h
      #include "frickin_lasers.h"
    78. Re:Whatever you may think ... by Anonymous Coward · · Score: 0

      They did. It just didn't work.

    79. Re:Whatever you may think ... by Monoman · · Score: 1

      Oops I meant Hanlon's.

      --
      Keep the Classic Slashdot.
    80. Re:Whatever you may think ... by WhiteDragon · · Score: 1

      It would be nice if they had some sort of code review in place for this sort of stuff. However, this isn't a paid project, so the developers writing this are doing arguably the best they can.

      The code was reviewed. The commit log shows that the reviewer was Stephen Henson (thanks to slashdot user grub for pointing this out.)

      --
      Did you mount a military-grade, variable-focus MASER on an unlicensed artificial intelligence?
  4. It's not just the implementation by Anonymous Coward · · Score: 5, Interesting

    The design of the feature looks like a backdoor too. A heartbeat function with a variable length payload, and there is a superfluous field for the payload length, and all running on top of TCP, which already has a keep-alive function? And then the feature contains a "rookie mistake", but still passes review. Yes, we totally believe you. It was a mistake.

    1. Re:It's not just the implementation by grub · · Score: 5, Informative


      and all running on top of TCP

      Not necessarily. OpenVPN is an SSL VPN which defaults to UDP/1194.

      --
      Trolling is a art,
    2. Re:It's not just the implementation by Anonymous Coward · · Score: 4, Insightful

      The feature was TLS/DTLS heartbeats, with the "D" in DTLS standing for datagram.

      HTTPS isn't the only thing using OpenSSL. As grub pointed out, OpenVPN uses it as well, and will use DTLS by default.

      The advantage of tunneling traffic in datagrams is that if you try to tunnel TCP traffic within TCP, performance suffers due to dueling TCP backoff.

    3. Re:It's not just the implementation by Anonymous Coward · · Score: 4, Insightful

      It's a possibility, but pretty paranoid reasoning.

      Assuming you have coded in your life (your language implies so), there were errors. I certainly made more than a few. Some the compilers caught, some the testing, some the users, some the accountants; some... probably nobody.

      Care to explain why any of yours were not intentional because it sure looks that way. Hindsight is cheap.

      My knee jerk was also that length would be superfluous - from zero context and understanding of the spec/RFC. But there could be a lot of reasons. If your job is to process a formally defined struct, you are not going to review the struct in an attempt to change the standard.

      Which brings us back to where we began. If this was a conspiracy, intentional coding would be required for exploit. Given that, I find it difficult to accept that an agency intentionally first complicated the spec by including a length field (which *could* be checked, in the name of security, for protocol robustness rather than local memory ops); then hen perverted a particular implementation in a manner that looks exceedingly garden variety. Easier to never have the length field in the first place.

    4. Re:It's not just the implementation by blueg3 · · Score: 4, Informative

      As others have indicated, the primary stated use of heartbeat is for DTLS, which is not over TCP.

      The payload length is not actually superfluous. The packet has an arbitrary amount of both payload and padding, of which only the payload is echoed to the sender. Roughly: { uint16 payload_len; char payload[]; char padding[]; } The intent of payload_len is to tell you which of the bytes following it are payload rather than padding. Of course, you need to check that it's less than the remaining data in the packet. (Per the spec, at least 16 less -- at least 16 bytes of random padding are required.)

    5. Re:It's not just the implementation by dvdkhlng · · Score: 2
      OpenVPN does its own transport protocol (on top of UDP or whatever was configured) to wrap the SSL control connection in. And for that reason OpenVPN implements its own heartbeat protocol. Let me repeat that: there is no use for TLS heartbeats with OpenVPN.

      Side-note: as OpenVPN does not use vanilla SSL sockets, simple-minded Heartbleed exploits that work against HTTPS etc. won't be usable against it, but it is possible to hand-craft a Heartbleed attack against OpenVPN servers (or clients) running with unpatched libopenssl (although AFAIK such an attack has not been seen in the wild yet).

    6. Re:It's not just the implementation by pjt33 · · Score: 4, Insightful

      If your job is to process a formally defined struct, you are not going to review the struct in an attempt to change the standard.

      The developer who wrote this code also wrote the spec, as part of his PhD research. To me the more worrying aspect of this whole affair is that OpenSSL accepted into the trunk an extension which at the time hadn't even reached "Proposed standard" status (and still doesn't seem to have progressed beyond it).

    7. Re:It's not just the implementation by Lisandro · · Score: 1

      It does, but it is more likely just sloppy programming / testing. Don't forget the custom malloc implementation (via freelists) OpenSSL uses which contributed to the issue and Theo de Raadt eloquently ranted about.

    8. Re:It's not just the implementation by CBravo · · Score: 1

      Some have overseen the fact that a heartbeat in one layer isn't always enough. The OS tcp/ip heartbeat might have different timeout than preferrable for TLS and you may not have the option to change the one from the OS for different reasons. The second issue is that you want to have the proper exception handling (to correct the issue you had with the bad connection). Just getting a new connection may not cut it.

      I had the issue recently when a redundant system had a failover due to maintenance. The firewall of the second system, which took control of the IP address, just ignored the packets (TCP session failover was of no use here) and the messaging system thought that the message was sent (tcp was not complaining for a while). I fixed this by letting the messaging system send an ACK after every message and activating the heartbeat of the messaging system. Any failover is now detected quickly and resolves in making a new connection (and when this happens while sending a message: retry). The original situation always wasted a dozen messages and then corrected by making a new connection.

      --
      nosig today
    9. Re:It's not just the implementation by lucag · · Score: 1

      Still, I see no reason why the payload must be arbitrary rather than some fixed strings.
      This looks like an hidden control channel bound to happen.

    10. Re:It's not just the implementation by Anonymous Coward · · Score: 1

      Just for a keep-alive feature...?

      It is to be noted that Seggelmann is the main author of the Heartbeat extension RFC.

      It's not just "a random missed checked anyone could have missed"... It is the main check to be done for the feature, which has an independent RFC. And having a separate user-specified length counter, for a user-specified string, should obviously ring a big fat alarm bell in every semi-competent programmer's mind... And we are talking about OpenSSL, a fundamental security-oriented package...

      I mean, everything is possible, and I certainly don't care about names myself, but odds are it is entirely willful... And we don't care about names (as often we probably never know for sure anyway, unless there is a serious confession or leak one day, and even then there could be doubts...), there is certainly no negative about considering it so. At this basic level, this is not paranoia... It's just basic coding method and review procedures... Again, we are talking about one of the most important and visible check of the feature, which is not a secondary optional obscure feature in a dense 300 page RFC, but an independent 8-page RFC... And its main author is the very author of the code...

    11. Re:It's not just the implementation by Anonymous Coward · · Score: 0

      If this was a conspiracy, intentional coding would be required for exploit. Given that, I find it difficult to accept that an agency intentionally first complicated the spec by including a length field (which *could* be checked, in the name of security, for protocol robustness rather than local memory ops); then hen perverted a particular implementation in a manner that looks exceedingly garden variety. Easier to never have the length field in the first place

      http://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=4817504
      "Submitted by: Robin Seggelmann "

      https://tools.ietf.org/html/rfc6520
      "R. Seggelmann" (main author)

      Easier if you're both the one making the spec, and the one implementing it... You're in a position of being trusted ("he is the RFC author, he knows what he's doing best, and it's a public spec recognized by the IETF, he's a big guy"). Plus obviously the more cruft, the easier to hide things...

    12. Re:It's not just the implementation by Anonymous Coward · · Score: 0

      It is pretty shocking when you can only agree with Theo without thinking he's completely over-the-top...

    13. Re:It's not just the implementation by locofungus · · Score: 1

      Presumably to limit the opportunity for known plaintext attacks.

      I don't know when this is used but I guess it's the only traffic on an otherwise quiescent connection.

      --
      God said, "div D = rho, div B = 0, curl E = -@B/@t, curl H = J + @D/@t," and there was light.
    14. Re:It's not just the implementation by blueg3 · · Score: 1

      For one, you need to be able to correlate your requests with the other party's responses in a way that is non-replayable (regardless of the encryption used).

      The payload is of variable length so that heartbeats can be used for path MTU discovery.

      Just because someone "sees no reason" for a design decision doesn't mean there is no reason.

      The heartbeat spec isn't necessarily a great design, but it's by no means the problem. If you can't implement what is essentially ping that passes two variable length data fields, what hope do you have of being able to implement anything useful?

    15. Re:It's not just the implementation by Anonymous Coward · · Score: 0

      (I'm the AC above)

      I hadn't realized that coder and RFC writer was the same person. It changes things, though I still find it easier to accept mistake over conspiracy.

      Agree with your general point on proposed/stable beta, but before making an example of this package, I would acknowledge that it's pretty much part for the course. I mean, what RFC is ever accepted before experimental implementations appear.

      Actually, that's a can of worms, probably not constructive. Better to consider the situation that, if the world wants high-quality coding and standards for a vital security package, it might be appropriate to pump more than $2000/year into it. ;) I probably paid half of that amount in ISP/mobile phone bills last year, and I'm probably not alone.

    16. Re:It's not just the implementation by Anonymous Coward · · Score: 0

      Surely something like this never happened. Plus, crypto AG an Boris Hagelin were honest people.

      Finally, unicorns power the electriciy net.

    17. Re:It's not just the implementation by oobayly · · Score: 1

      My guess is that if you're eavesdropping on the connection, knowing the fixed heartbeat string would provide a fairly decent crib* which could be used for executing a Known plaintext attack.

      * The RFC states that "The Heartbeat protocol is a new protocol running on top of the Record Layer", which to my limited knowledge means that is encrypted using a symmetric algorithm.

  5. He's sorry now ... by drnb · · Score: 0

    He's sorry now, wait until some lawyer shows up on his doorstep with a bill.

    1. Re:He's sorry now ... by viperidaenz · · Score: 2, Informative

      Lawyers love EULA's and licenses. The OpenSSL license disclaims all liability

      * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
        * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
        * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
        * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
        * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
        * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
        * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
        * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
        * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
        * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
        * OF THE POSSIBILITY OF SUCH DAMAGE.

      https://www.openssl.org/source...

      If you never agreed to that license, you're violating their copyright.

    2. Re:He's sorry now ... by Anonymous Coward · · Score: 0

      It doesn't work like that outside the US... Especially not in the EU.

    3. Re:He's sorry now ... by Anonymous Coward · · Score: 0

      It would be an interesting case. In most cases a EULA isn't worth the virtual paper it is written on when it states you aren't protected negligence, consumers have a lot of rights that cannot be signed away in a lot of states and countries regardless of what the license says.

    4. Re:He's sorry now ... by zekele2 · · Score: 1

      posting to undo moderating error, please ignore...

    5. Re:He's sorry now ... by GigaplexNZ · · Score: 1

      This is the second example I've seen in this thread where disclaiming negligence for vehicular accidents is compared to disclaiming negligence for software bugs on an unpaid open source project that companies aren't obligated to use.

      And even if these companies could legally sue (jurisdictions notwithstanding), what would the point be? This is an individual with limited funds - they'd bankrupt him but wouldn't get enough from him to cover their legal fees.

    6. Re:He's sorry now ... by elfprince13 · · Score: 1

      Sure, but what's the case law on the application of consumer-rights to free stuff?

    7. Re:He's sorry now ... by bloodhawk · · Score: 1

      while the comparison between cars and software is ridiculous. Many places do not permit a EULA or any other agreement to sign away a persons rights to protection from negligence regardless of what the product is, such clauses can be deemed invalid.

    8. Re:He's sorry now ... by JeffAtl · · Score: 1

      The point is that you disclaimers are not always legally binding. The vehicular examples are just examples that many people may find familiar. You're reading too much into them.

      Regardless, I agree that he is safe legally. It's not the disclaimer that protecting him though.

    9. Re:He's sorry now ... by GigaplexNZ · · Score: 1

      I'm sure there are many places that don't permit such a EULA, however are they the jurisdiction where he wrote and published the code? (honest question - I don't know) Jurisdiction matters for such things, which is how some open source projects get away with code that infringes patents in some regions but not others for example.

    10. Re:He's sorry now ... by drnb · · Score: 2

      Lawyers love EULA's and licenses. The OpenSSL license disclaims all liability

      * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE.

      https://www.openssl.org/source...

      If you never agreed to that license, you're violating their copyright.

      OK, switching from humor to serious. The above can be challenged in court. And being correct/innocent does not necessarily determine the outcome of a case. As a hostile lawyer once explained: the facts of the matter are irrelevant, my client can afford to go to court, you can not. See "pyrrhic victory".

    11. Re:He's sorry now ... by viperidaenz · · Score: 4, Interesting

      I found your post on slashdot and used it as legal advise.
      It turns out you were negligent in checking your facts so I'm suing you for damages.

    12. Re:He's sorry now ... by sexconker · · Score: 4, Insightful

      The above cannot be challenged in court. No court in the Universe holds jurisdiction over this. The contributor didn't sell you OpenSSL, he didn't force you to use it, it didn't tell you to use it, he didn't make any guarantees about its functionality, you have no contract, no warranty, no expectation for it to actually do anything, etc.
      You may as well sue someone after walking into their house uninvited, listening to them whistle while they're sitting on the toilet, and hearing a missed note.

    13. Re:He's sorry now ... by PhilHibbs · · Score: 1

      https://www.openssl.org/source...

      If you never agreed to that license, you're violating their copyright.

      You're only violating their copyright if you distribute it. If I legally acquire a copy of a piece of software, I can use it without agreeing to any other stipulations. Depending on jurisdiction, of course, different legal systems may rule in different ways on that point. And I'm not sure what the jurisdiction that this guy lives in has said about it.

      The GPL has a specific clause pointing this out, and it's there because the authors of the GPL believe that they have no authority to prevent you from using their software. I agree with them. It always amuses me when GPL'd software contains a clickthrough insisting that you press an "Agree" button, when the licence specifically says that no such agreement is necessary.

    14. Re:He's sorry now ... by kyrsjo · · Score: 1

      Has that happened in other cases, like when Microsoft had security holes?

    15. Re:He's sorry now ... by amn108 · · Score: 1

      Consumers are not the ones providing OpenSSL, the vendors downloading and installing it on their vending systems, are. And so, it is the vendors who in fact should be afraid of lawsuits, not Robin or anyone else contributing to OpenSSL. But in any case, anyone is free to sue anyone else, the assumption is that the judging party understands what the usage license for OpenSSL implied. Which they are expected to.

    16. Re:He's sorry now ... by TheRaven64 · · Score: 1

      It always amuses me when GPL'd software contains a clickthrough insisting that you press an "Agree" button, when the licence specifically says that no such agreement is necessary.

      In fact, by placing the requirement that someone agrees to the license before using a derived work of the GPL'd software, they are violating the GPL...

      --
      I am TheRaven on Soylent News
    17. Re:He's sorry now ... by Manfre · · Score: 1

      His code was reviewed. The established process was followed. The reviewer and possibly anyone else with access to the code could be viewed as negligent for not preventing this undesirable functionality.

    18. Re:He's sorry now ... by drnb · · Score: 1

      The above cannot be challenged in court. No court in the Universe holds jurisdiction over this. The contributor didn't sell you OpenSSL, he didn't force you to use it, it didn't tell you to use it, he didn't make any guarantees about its functionality, you have no contract, no warranty, no expectation for it to actually do anything, etc. You may as well sue someone after walking into their house uninvited, listening to them whistle while they're sitting on the toilet, and hearing a missed note.

      They law may not work as logically as you assume.

      In the U.S. a person can enter a homeowner's yard uninvited and without the homeowner's knowledge, slip and fall, injure themselves, and successfully sue the homeowner.

    19. Re:He's sorry now ... by Anonymous Coward · · Score: 0

      In fact, by placing the requirement that someone agrees to the license before using a derived work of the GPL'd software, they are violating the GPL...

      If they "place the requirement" that you must run the installer before you use the software, are they violating the GPL? No, because they're not attempting to impose a legal requirement, it's just how the software works, and if you want to modify it to avoid that step then you're perfectly welcome to. There's no reason why the "agree to the licence" step of the installer should be viewed differently than any other in that regard.

  6. Doesn't seem to be on purpose by anth · · Score: 1

    Even the NSA wouldn't cause a disaster of this magnitude just to spy on everyone.

    1. Re:Doesn't seem to be on purpose by Anonymous Coward · · Score: 0

      Even the NSA wouldn't cause a disaster of this magnitude just to spy on everyone.

      He's in Germany. That would be more Russian FSB territory (formerly KGB and Stasi territory).

    2. Re:Doesn't seem to be on purpose by Anonymous Coward · · Score: 0

      I want some of what you are smoking.

    3. Re:Doesn't seem to be on purpose by Anonymous Coward · · Score: 0

      For the record: Germany has plenty of both: ex-stasi and still-USA.
      Also still-USA are still-there, while stasi formally is over by twenty years or so.

    4. Re:Doesn't seem to be on purpose by HatofPig · · Score: 1

      The NSA couldn't know that some foreign powers wouldn't quickly discover the bug as well and start hacking major US corporations that were vulnerable. They wouldn't even have been able to detect it was happening unless they made some honeypot which, if discovered, would have implicated them further. The risk is way too great.

      --
      Silicon & Charybdis McLuhan Kildall Papert Kay
    5. Re:Doesn't seem to be on purpose by Anonymous Coward · · Score: 0

      The NSA doesn't care about foreign powers, they are not a threat to their funding. The NSA wants to make sure they can keep all those pesky American's under their thumb.

      In fact, from the Snowden leaks, we know the NSA has put back doors in all sorts of things that foreign powers could easily discover.

    6. Re:Doesn't seem to be on purpose by Anonymous Coward · · Score: 0

      Even the NSA wouldn't cause a disaster of this magnitude just to spy on everyone.

      Yes they would. They're one of the few organizations on the planet that has a significant archive of pre-exploit-going-wild traffic.

      Now we see one of the reasons why they archive such traffic: just in case a screwup like this comes to light (and/or because they were already aware of it and didn't tell anyone). In a pre-PFS era, an archive of every SSL session going back to (REDACTED) can be pretty useful, because someday, hopefully before the disk fills up, you or somebody else might discover a way to obtain or derive the keys that will decrypt large portions of those archived encrypted sessions.

      I don't know whether or not NSA was behind this. I do believe that if they knew about it, they acted against the interests of information assurance by not helping American companies affected by the vulnerability in addressing it.

      But then, for all I know, everybody who did IA at NSA has been fired, shot, disappeared, or otherwise compromised. Once upon a time, NSA helped Americans secure their communications, and could be somewhat trusted to do so. Even if they changed their policy 180 degrees, it will be at least 20 years before American corporations can trust them to do so again.

    7. Re:Doesn't seem to be on purpose by JeffAtl · · Score: 1

      Russia now has full access to any of those back doors.

    8. Re:Doesn't seem to be on purpose by JeffAtl · · Score: 1

      How did this get turned into a NSA thread?

    9. Re:Doesn't seem to be on purpose by cold+fjord · · Score: 1

      You left out the Russia's FSB, and the intelligence services of China, Iran, and many others.

      --
      much of left-wing thought is a kind of playing with fire by people who don't even know that fire is hot - George Orwell
    10. Re:Doesn't seem to be on purpose by cusco · · Score: 2

      They always did, the US and British intel agencies have always been double-agent ridden. I doubt that much of what Snowden revealed was a surprise to Moscow.

      --
      "Think about how stupid the average person is. Now, realise that half of them are dumber than that." - George Carlin
    11. Re:Doesn't seem to be on purpose by cold+fjord · · Score: 0

      Every story / thread is a potential NSA thread these days. It is the current fashion in the fever swamps. .

      --
      much of left-wing thought is a kind of playing with fire by people who don't even know that fire is hot - George Orwell
    12. Re:Doesn't seem to be on purpose by Anonymous Coward · · Score: 0

      Are we now pretending like the NSA doesn't have a history of subverting critical systems related to the flow of encrypted communications?

    13. Re:Doesn't seem to be on purpose by TheGratefulNet · · Score: 3, Insightful

      we do it just to bug YOU, cold fnord.

      we know it pisses you off to have your boys look bad.

      DEAL WITH IT. or just leave. either is fine with most of us.

      --

      --
      "It is now safe to switch off your computer."
    14. Re:Doesn't seem to be on purpose by cold+fjord · · Score: 0

      Ah! And here we have one of the bogmeisters of the fever swamp now!

      Don't be ridiculous, people post that nonsense out of hysteria or fringe thinking. It has nothing to do with me.

      As for leaving, I wouldn't hold my breath, Mr. Soylent TheGratefulNet

      Besides, if I left what would the fever swamp do for the two minute hate?

      --
      much of left-wing thought is a kind of playing with fire by people who don't even know that fire is hot - George Orwell
    15. Re:Doesn't seem to be on purpose by im_thatoneguy · · Score: 1

      When the Boston Bomber was identified Russia was kind enough to provide investigators with all of his text messages and phone calls.

      Of course they aren't surprised. They openly admitted that they were doing the same thing before Snowden was a household name. Every country is doing everything legally possible (and then some) to spy on anyone they can. That's not new. The only people surprised by Snowden's leaks were people who had a false sense of security.

    16. Re:Doesn't seem to be on purpose by Anonymous Coward · · Score: 0

      You can have me. I'm smoking hot.

    17. Re:Doesn't seem to be on purpose by causality · · Score: 1

      The only people surprised by Snowden's leaks were people who had a false sense of security.

      ... caused by a false belief in an inherent benevolence of government, compounded by this denial-apathy thing concerning the casual lies coming from every major institution and corporation on a regular basis.

      If you imagine for a moment that there were aliens observing the earth, you could not blame them for refusing to initiate first contact.

      --
      It is a miracle that curiosity survives formal education. - Einstein
    18. Re:Doesn't seem to be on purpose by TheRaven64 · · Score: 5, Interesting

      The date that it was added to the OpenSSL codebase is very close to the time when the leaked NSA documents claim that they had a 'major breakthrough' in decrypting SSL. I would imagine that they are not responsible for introducing it, but do have people doing very careful code review and fuzzing on all changes to common crypto libraries, so I wouldn't be surprised if they'd known about it (and been exploiting it) since it was originally released.

      --
      I am TheRaven on Soylent News
    19. Re:Doesn't seem to be on purpose by Anonymous Coward · · Score: 0

      Yeah some Germans in the 1930s or so had the same kind of hysterical thinking. The Reichstag fire was just a terrible accident, dont be silly, no politician would ever exploit a tragedy for power. Oh come on, yeah he says bad stuff about them but he isnt REALLY going to do anything bad to the jews, that's just paranoid hysteria!

      See the problem was Hitler had the power to do those things. Of course he used it. See the pattern?

    20. Re:Doesn't seem to be on purpose by Anonymous Coward · · Score: 0

      Germany is a prime target for the NSA.

    21. Re:Doesn't seem to be on purpose by Anonymous Coward · · Score: 0

      we do it just to bug YOU, cold fnord.

      we know it pisses you off to have your boys look bad.

      DEAL WITH IT. or just leave. either is fine with most of us.

      I agree with fjord. Slashdot is getting a bit loony recently with crazy conspiracy theories regularly getting modded +5 insightful. The amount of poster and moderator group think on slashdot surrounding some of these is just insane.

    22. Re:Doesn't seem to be on purpose by Grog6 · · Score: 1

      They cant afford to see your logic; These guys all want to be guards for the concentration camps, they're paid shills, mostly

      --
      Truth isn't Truth - Guliani
  7. Improving? by Anonymous Coward · · Score: 0

    If adding features ever improves software it is usually only for a tiny percentage of users. Mostly it just introduces vulnerabilities like this and soaks up cpu cycles and disk space. Of course we have to have progress or coders would get awfully bored doing nothing but fixing bugs and improving performance. Still it surprises me that security software can be modified so quickly and with only one review. If you want to add a feature to anything as critical as SSL, it should be reviewed and tested by numerous experienced coders over a period of many months.

    1. Re:Improving? by GigaplexNZ · · Score: 1

      Still it surprises me that security software can be modified so quickly and with only one review

      It's an open source project, who's going to stop them writing the code and making it available?

  8. ya ya.. by Anonymous Coward · · Score: 0

    I missed validating a variable containing a length

    right.

    1. Re:ya ya.. by ChunderDownunder · · Score: 1

      Unit tests?

      Advocates of TDD would stress a complex suite of tests that self-document assumptions and side-effects - especially prior to refactoring code to bug fix and add new features, as specified in the summary.

    2. Re:ya ya.. by x0ra · · Score: 1

      then you would trip on something you were not testing. There is a reason free software is pretty much free, it is imperfect. If you want perfect software, go in the aviation industry, where you might still end up with... http://www.cas.mcmaster.ca/~ba...

    3. Re:ya ya.. by gbjbaanb · · Score: 1

      but a unit test wouldn't show this up - nobody would write a test, testing that the function worked, and start looking at external impacts of that function.

      For this to be caught using testing, you'd need a fairly good coverage integration test. Unit tests are just too focussed on small things. They prove the unit works as expected, they never consider interaction with other parts of the overall system.

    4. Re:ya ya.. by kyrsjo · · Score: 1

      Most software is inperfect, also non-free - even what you mention, code in control systems for areospace.

      I don't think there is any precedent for claiming that non-free software is more secure than free software.

    5. Re:ya ya.. by x0ra · · Score: 1

      in short, all software is flawed one way or another.

  9. on purpose or not, couldn't happen if... by Anonymous Coward · · Score: 2, Interesting

    All I know is the organization I work for has prohibited use of C or C++ for mission critical software for years now. The languages we use would not ALLOW code to execute which tries to copy 64K from a 2 byte sized container.

    Part of software engineering is to use the right tool for the right job. When a buffer overrun can destroy the security of the entire internet, you damn well better not be using C as your tool. Or assembly language for that matter.

    Do that where I work, and you'd be fired.

    1. Re:on purpose or not, couldn't happen if... by Anonymous Coward · · Score: 0

      Out of curiosity, what language would you use?

    2. Re:on purpose or not, couldn't happen if... by Anonymous Coward · · Score: 0

      I totally agree. We should code whole operating systems in HTML so we know for sure this kind of issue never happens again! ...Or, we can see it for what it is, and use the tools available to us responsibly. It's not exactly very hard to prevent that issue in C/C++, and the guy taking responsibility for this bug went out of his way to avoid protections.

    3. Re:on purpose or not, couldn't happen if... by cold+fjord · · Score: 1

      I'm going to bet Java or Ada.

      --
      much of left-wing thought is a kind of playing with fire by people who don't even know that fire is hot - George Orwell
    4. Re:on purpose or not, couldn't happen if... by GigaplexNZ · · Score: 1

      All I know is the organization I work for has prohibited use of C or C++ for mission critical software for years now. The languages we use would not ALLOW code to execute which tries to copy 64K from a 2 byte sized container.

      C++ has bounds-checked containers.

    5. Re:on purpose or not, couldn't happen if... by gweihir · · Score: 2

      This is BS. You can screw up just as badly in any other language. It will just be less obvious. Of course, the combination of an incompetent code writer and an incompetent reviewer will quite often have spectacularly bad results.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    6. Re:on purpose or not, couldn't happen if... by rk · · Score: 1

      Really? What OS does all that mission critical software run on?

    7. Re:on purpose or not, couldn't happen if... by Anonymous Coward · · Score: 0

      And yet, this problem still happened.

    8. Re:on purpose or not, couldn't happen if... by DamnOregonian · · Score: 1

      Firefox

    9. Re:on purpose or not, couldn't happen if... by Ash-Fox · · Score: 1

      C++ has bounds-checked containers.

      And yet, this problem still happened.

      From Wikipedia:

      OpenSSL is an open-source implementation of the SSL and TLS protocols. The core library, written in the C programming language, implements the basic cryptographic functions and provides various utility functions. Wrappers allowing the use of the OpenSSL library in a variety of computer languages are available.

      I fail to see Anonymous' point.

      --
      Change is certain; progress is not obligatory.
    10. Re:on purpose or not, couldn't happen if... by JaredOfEuropa · · Score: 1

      Or the language or its standard libraries contain a vulnerability. That nice bounds checking container or gargabe collector? Maybe they're broken.

      --
      If construction was anything like programming, an incorrectly fitted lock would bring down the entire building...
    11. Re:on purpose or not, couldn't happen if... by gbjbaanb · · Score: 1

      why is C++ a problem then? I've not written malloc or new a C style array for years.

      I just hope your unnamed other language has no scope for other bugs... its Jva isn't it, lololololol.

    12. Re:on purpose or not, couldn't happen if... by TheMathemagician · · Score: 1

      You're being ridiculous here. The problem was not the language, it was the implementation. You can write crap code in any language.

    13. Re:on purpose or not, couldn't happen if... by Lennie · · Score: 1

      Euh, sure, maybe operating systems in HTML is a good idea. But the problem is, all the major browsers are written in C++.

      PS Mozilla is writing a new engine Servo in the new Rust programming language.

      --
      New things are always on the horizon
    14. Re:on purpose or not, couldn't happen if... by Anonymous Coward · · Score: 0

      I presume you write code in Java. Guess what, part of the problem is that they used a custom memory allocator. Guess what, if they had written a custom memory allocator in Java, they would have had _exactly_ the same exploit! In Java! And on top of all the JVM exploits of course, since the JVM code is probably 10x as much C/C++ code as the whole OpenSSL library.

    15. Re:on purpose or not, couldn't happen if... by gweihir · · Score: 1

      Indeed. And even worse: How do you explain a buffer-overflow or Heartbleed to a Java programmer? They do not even understand what you are talking about!

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    16. Re:on purpose or not, couldn't happen if... by Megol · · Score: 1

      You're being ridiculous here. The problem was not the language, it was the implementation. You can write crap code in any language.

      Yes but some kinds of common crap will be trapped in a secure language including use-after-free that is the problem here. And that would be detected even when using C if they just used proper static analysis software _or_ used standard error-promoting malloc implementations (that exists to find these kind of bugs).
      Now I know open source doesn't necessarily mean well maintained and reviewed software but the failure to find this bug is IMHO indicative of a systematic problem rather than the fault of a single/small group of developers. And this is security-critical software.

    17. Re:on purpose or not, couldn't happen if... by Anonymous Coward · · Score: 0

      Only if you've verified that source code for your libraries.

    18. Re:on purpose or not, couldn't happen if... by strikethree · · Score: 1

      All I know is the organization I work for has prohibited use of C or C++ for mission critical software for years now.

      Incompetent design and poor coding practices are what makes C or Assembly insecure. C++ is potentially a minefield though. Little boys should not be playing with power tools or nuclear weapons.

      --
      "Someone needs to talk to the tree of liberty about its ghoulish drinking problem." by ohnocitizen
  10. code review idea by onepoint · · Score: 1

    Well, maybe this is a blessing. While it's open source, maybe multiple eye's need to look at it for final validation.
    While never have worked with open source, I do work with data very often. I re-validate entries a lot and just scan data look for something odd. I am amazed at the amount of errors I find, so I report them and go from that point onwards.
    sometimes I work with teams of people and have a kind of race looking to find the most errors, then we go out and the winner only buys 1 round, and does not pay the bill for dinner.

    --
    if you see me, smile and say hello.
    1. Re:code review idea by VortexCortex · · Score: 5, Insightful

      Well, maybe this is a blessing. While it's open source, maybe multiple eye's need to look at it for final validation.

      No it's a curse. I have input fuzzing, unit tests, code coverage profiling and Valgrind memory tests. Such a bug wouldn't have slipped past me with both eyes shut -- no seriously! If I fuck up accidentally like this THE COMPUTER TELLS ME SO without ever having to do anything but make the mistake and type make test all. I test every line of code on every side of my #ifdef options, in all my projects. If you're implementing ENCRYPTION AND/OR SECURITY SOFTWARE then I expect such practices as the absolute minimum effort -- I mean, that's what I do, even when it's just me coding on dinky indie games as a hobby. I don't want to be known as the guy who's game was used to compromise users' credentials or data, that would be game over for me.

      These ass-hats have just shown the world that they can't be trusted to use the fucking tools we wrote that would have prevented this shit if they'd have just ran them. It's really not acceptable. It's hard to comprehend the degree of unacceptable this is. It reeks of intentional disaster masquerading as coy "accidental" screw up, "silly me, I just didn't do anything you're supposed to do when you're developing industry standard security software". No. Just, no. An ancient optimization that was made default even though it only mattered on SOME slower platforms? Yeah, OK, that's fucking dumb, I can buy it as an accident. However, NOT TESTING BOTH BRANCHES for that option? What the actual fuck? I could see someone missing an edge case in their unit test, but not even using input fuzzing at all? It's not hard, shit, I have a script that generates the basic unit fuzzing code from the function signatures in .H files, you know, so you don't miss a stub...

      "Never attribute to malice what can be adequately explained by stupidity." -- The level of stupidity required is unexplainable. How the fuck are they this inept and in charge of THIS project? THAT'S the real issue. This isn't even the fist time OpenSSL shit the bed so bad. In <- this linked example, it was Debian maintainers and not the OpenSSL maintainers fault (directly): Instead of adding an exception to the Valgrind ignore list (which you most frequently must have in any moderately sized project, esp one that handles its own memory management) they instead commented out the source of entropy, making all the SSL connections and keys generated by OpenSSL easily exploitable since it gutted the entropy of the random number generator (which is a known prime target for breakage that's very hard to get right even if you're not evil, so any change thereto needs to be extremely well vetted). Last time the OpenSSL maintainers brazenly commented they "would have fallen about laughing, and once we had got our breath back, told them what a terrible idea this was." -- Except that they silently stopped paying attention to to the public bug tracker / questions and quietly moved to another dev area, making it nearly impossible to contact them to ask them about anything (a big no-no in Open Source dev), but it gives you a better idea about the sort of maintainers these fuck-tards are.

      We don't know absolutely for sure, but we're pretty damn close to absolutely certain that OpenSSL and other security products (see: RSA's BSafe) are being targeted for anti-sec by damn near all the powers that be. So, now we find out OpenSSL has an obsolete optimization -- a custom memory pool (red flag goes up right away if you see memory reuse in a security product, that shit MUST be even more throughly checked than entropy-pools, since it can cause remote code execution, memory leaks, and internal state exposure... you don't say?). We find that optimization would have been caught by basic fuzz test with Valgrind, which apparently folks have been using previously according to the comments in the prior S

    2. Re:code review idea by reikae · · Score: 5, Interesting

      Serious question: Why don't you become the new maintainer yourself, if you honestly believe you can do a significantly better job at it than the current person(s)?

      I don't do it myself because I can not guarantee that I wouldn't make even worse mistakes. I'm glad there are people out there who are willing to do the job, and I'm in no position to bite their heads off when they mess it up. And you're probably glad that I'm not a maintainer of anything even remotely security-related :-)

    3. Re:code review idea by Anonymous Coward · · Score: 0

      Are you John McAfee? Or perhaps that HOSTs file guy? I seem to be coming across your long-winded and mildly incoherent rants on an increasingly regular basis :-p

    4. Re:code review idea by Electricity+Likes+Me · · Score: 2

      Bingo. There's a lot of people who are willing to declare the unpaid volunteers don't know what they're doing...but have absolutely no patience to try and contribute or agitate for change from within. Which really makes me wonder whether they'd have the wherewithall to run a new project, or you know, do anything at all.

      Code that gets written gets run.

    5. Re:code review idea by Goose+In+Orbit · · Score: 2

      Instead of adding an exception to the Valgrind ignore list (which you most frequently must have in any moderately sized project, esp one that handles its own memory management)

      If you need to add exceptions to get a tool to work... the tool is wrong for the job.

    6. Re:code review idea by Anonymous Coward · · Score: 0

      If I became a coder or maintainer for every piece of free software that has a bug or issue I would have to quite both my current jobs, and I still would not have enough time. It would be easier for me to just give up on free software and just rely on proprietary software. At least that way I can hold someone accountable.

    7. Re:code review idea by onepoint · · Score: 1

      OK, based on what you are writing, I guess you grok code checking and point of faulures. Great, now how the heck do you share your knowledge ...

      Disclosure: I'm a realtor whom loves to tinker with anything that has gears, and use to code real damn serious with the goal of low IO, low CPU and low Memory.

      So back too... how are you going to share your knowledge, I use a mindmapp to share my realtor advice with others, it always looks like a basic commands ( if, then, else, gosub ... LOL ). I happen to use mindmapps because I discovered that I'm a visual person in learning and effective planning.

      are you willing to share, for example some of the basic steps and just upload the it, or better, take someone else work and improve on it then publish it citing your source ( maybe we can get lucky and it would be a wiki....

      Look, I'm not good at what you do, but if you wanted real estate advice, I think I one of the best. Your talking like grok code, so share, share often, and if no one listens, fine. But what if they do??? then you've helped.

      --
      if you see me, smile and say hello.
    8. Re:code review idea by Anonymous Coward · · Score: 0

      I don't think this is a case of "I can do better than that". Rather, nobody could do much worse. OpenSSL is officially dead now. Because, as you know, YOU CAN'T FIX STUPID.
        su -c 'yum remove openssl'

    9. Re:code review idea by Phroggy · · Score: 1

      If you need to add exceptions to get a tool to work... the tool is wrong for the job.

      Well yeah - that's why you add exceptions: to indicate that this tool shouldn't be used for that job, because it's the wrong tool for the job.

      --
      $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
      $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
    10. Re:code review idea by Anonymous Coward · · Score: 0

      Tl;dr

      Your arrogance is amusing.

    11. Re:code review idea by OdinOdin_ · · Score: 1

      Would love to help maintain it, but committers are too busy.

      First they need to switch to git as the main tree (maybe they already did this since I last looked properly).
      Second they need to setup gerrit code review and allow anyone and everyone to submit patches and review patches.
      Third they need to setup some kind of unit testing and code coverage framework (I wrote a testing tool sslregress once to validate a change I made to fix a long standing API oversight, this tool 'sslregress' does provide a framework to be able to stress test network interaction between two SSL endpoints in ways you can not ordinarily test, it could easily be extended to send garbage data inside valid SSL/TLS records). But someone explain how this can actually make it into the code base ? Who do I need to f**k ?

      From my point of view the OpenSSL maintainers are in their ivory tower and that is the way they like it. Maybe it helps keep their revenue streams up ? Since those committers are also part of the official support teams.

    12. Re:code review idea by strikethree · · Score: 1

      Serious question: Why don't you become the new maintainer yourself, if you honestly believe you can do a significantly better job at it than the current person(s)?

      I am not who you replied to but I think I can give a reasonable answer to this question: If I were to take over every project that I had a strong opinion about and that I thought I could do better, I would not have enough time in my entire life to even touch all of them, much less actually work on them. In such a situation, I would limit myself to discussion to what could have been done differently.

      --
      "Someone needs to talk to the tree of liberty about its ghoulish drinking problem." by ohnocitizen
  11. for a library... by MarcoAtWork · · Score: 5, Insightful

    ... so much of the internet depends on for security just one reviewer for a commit seems way way way too little, honestly checking anything into openssl (or gnutls) should be at least a 4-step approval process (submitter -> mantainer for that area -> overall library mantainer -> security officer), for any code that includes buffers/malloc especially if related to user supplied data the final security review should be a panel.

    Everybody makes mistakes, everybody can have a 'brown paper bag' coding moment (especially around Christmas/New Year's like it happened in this case), 2 people having a 'brown paper bag' moment at the same time around the holidays is definitely not that unlikely, for something as important as a crypto library on which so many things depend a single reviewer is just not enough.

    I do feel for the original developer, and hope that he won't suffer more about this than he already is (any developer worth their salt feels quite bad about bugs they introduce, let alone if they lead to this many problems), we've all made coding mistakes, no matter how experienced we are, so the focus should not be on "who" but more on "what kind of process can we introduce so this does not happen again".

    Moving away from C in my opinion would just be a band-aid, other languages don't expose you to this particular bug, that's fine, however for security software choosing a vetting process for what goes in the codebase is a lot more important than choosing what language it's written in, not to mention that it's not that "hard" to write "secure C" especially if one leans on all the various available tools/libraries and writes proper unit tests, in this case for example had the malloc decision not been influenced by performance reasons (on unspecified platforms) this would not have been as big of a deal as it was.

    --
    -- the cake is a lie
    1. Re:for a library... by MightyMartian · · Score: 4, Insightful

      Moving away from C just means you now have to have faith in some bytecode virtual machine's memory and buffer management. Is it a more secure approach? Maybe, but if the root complaint is putting faith in complex software, coding in Java or some .NET language means trusting the people coding those engines are equally capable of screwing up. All these higher level virtual machines and interpreters are ultimately written in C.

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    2. Re:for a library... by Anonymous Coward · · Score: 0

      Visual inspection of anything, including code, is only ~85% effective. You need 6 passes to reach .9999 reliability.
      Robust test suites can help here, but I'd agree a couple more reviewers need to be engaged.

    3. Re:for a library... by Anonymous Coward · · Score: 0, Troll

      Welcome to the bullshit that is OSS.

      Just because everyone can look at the code, doesn't mean anyone IS looking at the code.

    4. Re:for a library... by GigaplexNZ · · Score: 2

      Moving away from C just means you now have to have faith in some bytecode virtual machine's memory and buffer management. Is it a more secure approach? Maybe, but if the root complaint is putting faith in complex software, coding in Java or some .NET language means trusting the people coding those engines are equally capable of screwing up. All these higher level virtual machines and interpreters are ultimately written in C.

      Or you could just use C++ complete with their bounds-checked containers.

    5. Re:for a library... by phantomfive · · Score: 1

      ... so much of the internet depends on for security just one reviewer for a commit seems way way way too little, honestly checking anything into openssl (or gnutls) should be at least a 4-step approval process (submitter -> mantainer for that area -> overall library mantainer -> security officer), for any code that includes buffers/malloc especially if related to user supplied data the final security review should be a panel.

      In my experience, adding extra reviewers who look at the code gives diminishing returns after the first review.

      To improve security, the first thing I would do is add an independent QA coder who would write tests for every single line of code. I don't think many people would want to volunteer their time being a QA coder, but that's what I think would be most effective.

      Moving away from C in my opinion would just be a band-aid, other languages don't expose you to this particular bug,

      The ironic thing is, in the last 5 years, I've seen more memory leaks go into production from Java code than from C code.

      --
      "First they came for the slanderers and i said nothing."
    6. Re:for a library... by phantomfive · · Score: 5, Insightful

      Just because everyone can look at the code, doesn't mean anyone IS looking at the code.

      Security is only one good reason to have the source code. Another very big convenience for programmers is the ability to figure out what went wrong when a library returns a bug.

      Furthermore, no one ever said open source was perfect, just that it was better than proprietary code. And that is probably true; the worst open source code I've seen is much better than the worst proprietary code I've seen.

      --
      "First they came for the slanderers and i said nothing."
    7. Re:for a library... by Anonymous Coward · · Score: 0

      Of course the virtual machine was probably coded in C or C++. lol...

    8. Re:for a library... by blueg3 · · Score: 1

      There are languages that are neither C nor run on a virtual machine.

    9. Re:for a library... by MightyMartian · · Score: 2

      And what languages are these languages themselves written in? At some point you're working with something written in C, C++ or assembler, and if those languages are dangerous to directly write apps in, then surely they must be equally dangerous to write the compilers and platforms on which your non-VM language runs.

      At some point it's turtles all the way down. By writing in some other language, you're putting your faith in the people writing the interpreters, VMs and/or compilers, and in many cases those developers are little different than the unfortunate fellow that introduced this particular vulnerability into OpenSSL.

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    10. Re:for a library... by viperidaenz · · Score: 2

      The ironic thing is, in the last 5 years, I've seen more memory leaks go into production from Java code than from C code.

      Memory leaks that waste memory aren't good.
      Memory leaks that expose memory contents are bad.

    11. Re:for a library... by Anonymous Coward · · Score: 0

      And we never have to scramble to update java now do we.

    12. Re:for a library... by Just+Some+Guy · · Score: 1

      ... so much of the internet depends on for security just one reviewer for a commit seems way way way too little, honestly checking anything into openssl (or gnutls) should be at least a 4-step approval process (submitter -> mantainer for that area -> overall library mantainer -> security officer), for any code that includes buffers/malloc especially if related to user supplied data the final security review should be a panel.

      Plus three extra steps: compiles without warnings, passes Valgrind, and makes it through an intensive test suite.

      --
      Dewey, what part of this looks like authorities should be involved?
    13. Re:for a library... by blueg3 · · Score: 2

      And what languages are these languages themselves written in?

      Languages aren't written in anything. (Though, the specification for a language could be written in English, for instance.) Compilers and interpreters are written in a language.

      and if those languages are dangerous to directly write apps in, then surely they must be equally dangerous to write the compilers and platforms on which your non-VM language runs.

      A program isn't run by a compiler, it's compiled by a compiler. There's a pretty significant difference.

      There's also a significant difference between writing an application in C and writing an application in a language that is compiled by a compiler written in C. For one, the compiler has a much smaller attack surface. There is a lot less code in the compiler than there is in the set of applications written in that language. For another, vulnerabilities aren't magically transitive like that. Imagine a language, M, that is just like C, but it is impossible to create a buffer overrun. The M compiler is written in C. It contains a buffer overrun bug. That doesn't magically make M source code compiled with this compiler also contain a buffer overrun. To say it another way: the features of the language the compiler is written in don't really matter for the security of a compiled application, it's the quality of the implementation of the compiler -- the compiler needs to produce a binary that actually has the properties of the language it's compiling for.

      At some point you're working with something written in C, C++ or assembler

      No, you're not. Traditionally, a compiler is written in the same language that it compiles: so a C++ compiler is written in C++ and a Forth compiler is written in Forth. (Realistically, most are now written in C as a component of GCC.)

    14. Re:for a library... by Anonymous Coward · · Score: 0

      Do those containers magically parse themselves from binary input?

      The bug here could have equally happened in any language, including Java, where reusing byte array buffers is quite common in performance critical code.

      With W^X memory, one of the last things you want is for a security critical applications to load and link a humungous library (like C++ STL) with mostly unused code. That's because with W^X you can't inject your own code, so you must rely on existing code segments--the more the better for the attacker.

      I'll take C over C++ any day of the week for security critical code. But C obviously isn't enough. You also need simple and small code, using simple and straight-forward data structures. OpenBSD, for example, uses the same RB-tree code all over their kernel, because they don't want a larger codebase which allows bugs to sneak in.

    15. Re:for a library... by istartedi · · Score: 1

      All these higher level virtual machines and interpreters are ultimately written in C

      And C runs on top of a processor. Intel FPU bug, anyone? IIRC, there were also some suspicions regarding hardware RNGs possibly being back-doored.

      There are no silver-bullets, and a corollary to that is that there isn't just one monster you have to kill.

      --
      For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
    16. Re:for a library... by Lupu · · Score: 1

      we've all made coding mistakes, no matter how experienced we are, so the focus should not be on "who" but more on "what kind of process can we introduce so this does not happen again".

      Very true. If you're not familiar with it, you might be interested in looking at "They Write The Right Stuff", an interesting piece about the reliability of software on the Space Shuttle, and the process they built to get there. "The group's most important creation is not the perfect software they write -- it's the process they invented that writes the perfect software."

    17. Re:for a library... by Anonymous Coward · · Score: 0

      With W^X memory, one of the last things you want is for a security critical applications to load and link a humungous library (like C++ STL) with mostly unused code.

      The STL is the Standard Template Library, i.e. it's based on templates. This means it's resolved / instantiated at compile time, not linked, and the final product includes only what you actually used from the STL, not the whole thing.

    18. Re:for a library... by Lennie · · Score: 2

      Great, the OpenSSL project needs more people working on it (even if only reviewers).

      You are volunteering I see ?

      --
      New things are always on the horizon
    19. Re:for a library... by Anonymous Coward · · Score: 0

      Except, as you can see from the threads others linked to, OpenSSL isn't and in fact _can't_ be tested against valgrind.
      Between that and the license, I can't understand why not everyone is running away from OpenSSL, screaming. I have no idea what the GnuTLS people do, but honestly it will be very hard to do worse.

    20. Re:for a library... by Anonymous Coward · · Score: 0

      Obviously, because C++ provides absolutely zero additional ammo for shooting yourself in the foot as opposed to 12 dozen times simpler and more straightforward language.

    21. Re:for a library... by Anonymous Coward · · Score: 0

      A fucking moron you are.

    22. Re:for a library... by Anonymous Coward · · Score: 0

      Ada! is one of the usual examples of a compiled, yet safe language.

    23. Re:for a library... by Anonymous Coward · · Score: 0

      I believe the term for the latter is not a "memory leak".

    24. Re:for a library... by Anonymous Coward · · Score: 0

      Unfortunately M is quite different from your description though. Here's rot13 written in it:

      s A="String" F i=1:1:$L(A) W $c($S($A($E(A,i))91:$A($E(A,i))-52#26+65,1:$A($E(A,i))-84#26+97))

    25. Re:for a library... by Anonymous Coward · · Score: 0

      The truth is that no amount of reviews can make OpenSSL secure. The only option is to nuke the entire code base and start over. It is an enormous crapball and using (properly structured, designed) C++ could indeed help to make it more secure.

      But yeah, you can make mistakes in well-designed, nice-looking, bounds-checked, ref-counting C++ code, too. But the code would be much more concise and defect probability should drop massively.

    26. Re:for a library... by MarcoAtWork · · Score: 1

      that is the typical OSS strawman, if you don't like it why don't you do it? if you are complaining, are you volunteering? if not you are not allowed.

      We are not talking here of a random OSS project, I have contributed to some of those over the years in my off hours when I feel like working into some other environment than what I do at work, we are talking about a library that most of the internet depends on for security: do you really think it should be volunteers that should be working on it? don't you think that Google, Amazon, ebay, paypal, and all the major world banks could take 0.0001% of their profits and put together a fund to hire competent people to do this full time? and not just security researchers, project managers, QA, technical writers, etc.

      OpenSSL/GnuTLS/... development is not something to be done in off hours, at off times in your company when you don't have other projects to do, it has to be done as your primary job description with no rush, no pressure, just making sure that things are done right and stay done right, with a proper process, proper QA and proper project management.

      I have many years of defensive C development under my belt, I especially love passwords and associated issues, I have worked with crypto software before, but it's not something that I would want to risk doing at night when I am tired after a day at my "real job" and my brain is not at 100% efficency, hence why "I am not volunteering I see".

      --
      -- the cake is a lie
    27. Re:for a library... by Anonymous Coward · · Score: 0

      If you stupid Americans and America-lovers would listen to people like Mr Wirth of ETH Zurich, we would not have this kind of problems.

      Pascal compilers are written in Pascal and have been since one guy wrote a Pascal compiler in assembly language. No need for that Bell Labs/USG abomination,

    28. Re:for a library... by Anonymous Coward · · Score: 0

      STL is a bad example of C++ software. Way too many knobs, dials and levers. Many parts not memory-safe against minor faults. E.g. the element access operator of class vector.

      BUT, you can easily roll your own memory-safe buffers, hash tables, smart pointers, string classes and so on. Simply don't use STL, there is much better stuff around.

      And yeah, diligent use of C++ does eliminate a large class of problems. Code can become easier to read and more nicely structured. But of course it is not a silver bullet. You still need great people for great code.

    29. Re:for a library... by Missing.Matter · · Score: 1

      Aside from blueg3's points, I'd also like to add that many compilers are actually written in the language that they're designed to compile. See bootstrapping. For instance, GHC, which compiles Haskell, is written in Haskell.

    30. Re:for a library... by Lennie · · Score: 1

      Of course these companies should do that. I wouldn't be surprised if many will do so.

      What I meant was, more people could be on the mailinglist and look at the code as it develops. You only have to look and say: this looks a bit off.

      I'm not saying you should be a formal reviewer that signs off on changes like the Linux kernel developers do.

      --
      New things are always on the horizon
  12. I don't believe him by Anonymous Coward · · Score: 0

    He and the reviewer that ok'd his code submission should be brought in for questioning.

    1. Re:I don't believe him by MildlyTangy · · Score: 1

      I don't believe him. He and the reviewer that ok'd his code submission should be brought in for questioning.

      You are totally correct. As it is "you" who does not beleive him, governments of the world should work together to bring this man and his reviewer in for questioning.

      This is now a matter of urgent and International importance.

      Hurry before its too late! AC has spoken!

    2. Re:I don't believe him by x0ra · · Score: 1

      Navy destroyers are on their way and all the navy seals are already in route. Drones keeps patrolling the perimeters. Just as a back up, President Obama is ready during the operation to launch nukes to counter the threat.

    3. Re:I don't believe him by neminem · · Score: 1

      And by questioning you mean bullets?

      (I totally don't condone killing this guy. I am, however, baffled as to why he would admit to being the one who committed this bug, as it wouldn't surprise me if *someone* from some large corporation decided to call up their secret hitman line and get even for the billions of dollars the guy lost them.)

  13. Bigger problem: stupid 'optimizations' by Bram+Stolk · · Score: 3, Interesting

    The bigger problem is coders that think they need to optimize for speed.
    Read the horror here: http://article.gmane.org/gmane...

    Ugh... premature optimization, the root of all evil. And now also the root of the biggest security hole ever.

    --
    Bram Stolk http://stolk.org/tlctc/
    1. Re:Bigger problem: stupid 'optimizations' by Anonymous Coward · · Score: 0

      Performance for OpenSSL is very important, so I'm not sure why you would be critical of the desire to optimize. And while premature optimization is certainly a bad idea, do you have any proof (or even evidence) that that is what happened here? It is entirely possible that they profiled and found that they could improve performance by writing their own allocator.

    2. Re:Bigger problem: stupid 'optimizations' by swinefc · · Score: 2

      While I agree with you about premature optimization, stop and think for a minute how many trillions of trillions this one bit of code has executed. If you do the math (left for the reader), then there is a real world cost to not optimizing this code. Electricity and time usage are affected.

    3. Re:Bigger problem: stupid 'optimizations' by GigaplexNZ · · Score: 1

      It was a feature addition, not a performance optimisation, that added this bug.

    4. Re:Bigger problem: stupid 'optimizations' by gweihir · · Score: 1

      Indeed. This was not just one screw-up, it is the end-result of quite a chain of them. You can optimize for speed, but it is an expert's game. Far to many coders believe they are experts when they do not even come close.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    5. Re:Bigger problem: stupid 'optimizations' by radarskiy · · Score: 1

      It's worse than that: OpenSSL depends on the fact that their custom free list will reallocate the memory just freed to get back the data. If you tied to use the supposedly slow malloc it would fail.

    6. Re:Bigger problem: stupid 'optimizations' by blueg3 · · Score: 3, Insightful

      ...then there is a real world cost to not optimizing this code.

      Turns out there's a real-world cost to optimizing it, too!

    7. Re:Bigger problem: stupid 'optimizations' by philip.paradis · · Score: 1

      The added feature implemented a performance optimization.

      --
      Write failed: Broken pipe
    8. Re:Bigger problem: stupid 'optimizations' by GigaplexNZ · · Score: 1

      I stand corrected, however this isn't a "premature optimisation".

    9. Re:Bigger problem: stupid 'optimizations' by philip.paradis · · Score: 1

      Agreed.

      --
      Write failed: Broken pipe
    10. Re:Bigger problem: stupid 'optimizations' by Andrewkov · · Score: 0

      Ugh... premature optimization, the root of all evil.

      That's what she said.

    11. Re:Bigger problem: stupid 'optimizations' by Bram+Stolk · · Score: 1

      OpenSSL has a functionality: to provide high security. If it fails to do that, it loses all reason to exist, regardless of how efficient the code is.
      Also: allocation does not tend to show up in profiling.
      Last, note that allocation was deemed slow on SOME PLATFORMS.
      Way to go: completely compromise the security on all platforms because you think that on some platforms allocation is slow.

      --
      Bram Stolk http://stolk.org/tlctc/
    12. Re:Bigger problem: stupid 'optimizations' by Bram+Stolk · · Score: 1

      I bet it is.
      Where are the numbers from the profile runs?
      Could have left it in the code comments, or somewhere on a mailing list.

      --
      Bram Stolk http://stolk.org/tlctc/
    13. Re:Bigger problem: stupid 'optimizations' by GigaplexNZ · · Score: 1

      If I put profile run numbers into comments for every optimisation I did, my code would be overrun with such comments.

  14. Why is he even excusing himself ? by musmax · · Score: 5, Insightful

    He has no reason to. He gave it a best effort shot given the resources. If you can do better, fucking do it.

    1. Re:Why is he even excusing himself ? by Anonymous Coward · · Score: 5, Insightful

      Thank you for a bit of sanity. What you wrote should be the summary text for every article on the subject: "He gave it a best effort shot given the resources. If you can do better, fucking do it."

      As an open-source dev myself, I often wonder why the fuck I do anything useful for others when they'll just turn on me the moment their toys don't work exactly as desired because -- gorsh -- I'm not perfect, though I work very hard to be.

    2. Re:Why is he even excusing himself ? by Anonymous Coward · · Score: 0

      +5 and then some.

    3. Re:Why is he even excusing himself ? by mark47 · · Score: 1

      +5 from me too

    4. Re:Why is he even excusing himself ? by VortexCortex · · Score: 4, Insightful

      As an open-source dev myself, I often wonder why the fuck I do anything useful for others when they'll just turn on me the moment their toys don't work exactly as desired because -- gorsh -- I'm not perfect, though I work very hard to be.

      Well, I'm a developer too. Mostly open source. Thing is, I don't bite off more than I can chew. This is a security product. They're not using basic code coverage tools on every line, or input fuzzing. They missed a unit test that should have been automatically generated. This is like offering a free oil change service boasting A+ Certified Mechanics, then forgetting to put oil in the damn car. Yeah, it was a free oil change, but come the fuck-on man. You really can't fuck up this bad unless you're stoned! I mean, if you change the oil, you check the oil level after you're done to ensure it hasn't been over-filled... You check all the code-paths, and fuzz test to make sure both sides of the #ifdef validate the same, or else why even keep that code? "I can accept the responsibility of maintaining and contributing to an industry standard security product" "YIKES I Didn't Fully Test my Contribution! Don't blame me! I never said I could accept the responsibility of contributing to or maintaining an industry standard security product!"

      It's cancerous shit like you that give open source a bad name. Own up, or Fuck off.

    5. Re:Why is he even excusing himself ? by Anonymous Coward · · Score: 0

      shortly after submitting this bug he started working for T-Systems, which have connections to the Bundesnachrichtendienst, the central german intelligence agency. Add to this that this bug is like a dream come true for intelligence agencies, plus easily deniable... well, let's just say the rumour it could be inentional had a reason.

    6. Re:Why is he even excusing himself ? by Solandri · · Score: 4, Interesting

      As an open-source dev myself, I often wonder why the fuck I do anything useful for others when they'll just turn on me the moment their toys don't work exactly as desired because -- gorsh -- I'm not perfect, though I work very hard to be.

      Welcome to Engineering. Scott Adams (of Dilbert fame) best summarized this disconnect between commendation and blame in the Engineers Explained chapter of his book:

      Engineers hate risk. They try to eliminate it whenever they can. This is understandable, given that when an engineer makes one little mistake, the media will treat it like it's a big deal or something.

      Examples of Bad Press for Engineers

      • Hindenberg.
      • Space Shuttle Challenger.
      • SPANet(tm)
      • Hubble space telescope.
      • Apollo 13.
      • Titanic.
      • Ford Pinto.
      • Corvair.

      The risk/reward calculation for engineers looks something like this:

      RISK: Public humiliation and the death of thousands of innocent people. REWARD: A certificate of appreciation in a handsome plastic frame.

    7. Re:Why is he even excusing himself ? by BlackPignouf · · Score: 1

      I totally agree with both of you.
      But the questions he answers isn't : "My toy isn't working as expected. Who wrote this shit?" but "This 'bug' very much looks like an intentional backdoor. Does git blame returns joe@nsa.gov?"

    8. Re:Why is he even excusing himself ? by Anonymous Coward · · Score: 0

      For me the question is not whether he gave it his best shot or not.

      For me the main question is why he was even handed a gun. If you have a library that is important for global security, why does anyone get to "add features" to the code and protocol?

      Once you have a working piece of security software, the only thing that should get added are bug fixes, reviews, and comments. With every new code part, the oversight/safety clock is reset to zero.

    9. Re:Why is he even excusing himself ? by Anonymous Coward · · Score: 0

      Yeah... I actually stopped contributing to a project because of ingrates. First I spent time on fixing generic bugs until I got accepted as a dev and assigned on a failed feature I knew I could help with; so spent time studying the code and tried to figure out what to do. What happened was that some douche who quite obviously didn't know shit got a Google Summer of Coding spot by campaigning in the mailing-list; the feature is still broken though he did apply/rewrite some patches I had submitted in the bug-tracker

    10. Re:Why is he even excusing himself ? by Anonymous Coward · · Score: 0

      This is a great advert for open-source.

      When stuff goes wrong, we're not liable and you're on your own. /sarcasm

    11. Re:Why is he even excusing himself ? by Anonymous Coward · · Score: 0

      There is a difference between a developer and an architecht.
      ALL new code should be assumed to be fatally flawed.
      The reason this made it through testing and review should be obvious.
      There was none.
      You guys suck. - badly.

  15. not a single mistake, symptom of bigger problem by iggymanz · · Score: 2, Interesting
    1. Re:not a single mistake, symptom of bigger problem by gweihir · · Score: 2

      Indeed. While both this person and the reviewer messed up badly and their competence is rightfully in question, they were also set-up by omission of basically everything you need to do to produce secure code in OpenSSL and by sabotage (likely due to terminal stupidity) of safeguards that _were_ available.

      To produce a catastrophe, several people have to screw up spectacularly. This is what happened here. Quite often, when you dig down, you find a combination of big egos and small skills.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  16. Sloppy code by billrp · · Score: 5, Informative

    I glanced at some of the OpenSSL C code, in particular the new code that introduced this bug. No comments, no asserts, no cross-checks, stupid variable names (like "payload" for the size of the payload, "pl" for a pointer to the payload data), no suggestions for how to test this new feature (such as what if the request has the payload size field that's not the same as the actual payload). In an unrelated function I saw an array declared on the stack, getting filled up, and then a pointer to this array getting assigned to a field of an argument to this function, and then a return...

    1. Re:Sloppy code by musmax · · Score: 2, Interesting

      I'm sure the project will appreciate your patches.

    2. Re:Sloppy code by Anonymous Coward · · Score: 0

      Blah, blah, blah...

      OpenSSL is free software. Do better or shut up and let those who can work in peace.

    3. Re:Sloppy code by GigaplexNZ · · Score: 1

      In an unrelated function I saw an array declared on the stack, getting filled up, and then a pointer to this array getting assigned to a field of an argument to this function, and then a return...

      Seriously? What function?

    4. Re:Sloppy code by Anonymous Coward · · Score: 0

      In an unrelated function I saw an array declared on the stack, getting filled up, and then a pointer to this array getting assigned to a field of an argument to this function, and then a return...

      Seriously? What function?

      void ssl_ruinTheInterwebs()

    5. Re:Sloppy code by Anonymous Coward · · Score: 0

      I wouldn't go near this pile of dogshit. Take your RFC's back out and add a few comments.
      Never trust a programmer under 40.
      LINUX is doomed, there are hundreds if not thousands of lines of garbage code waiting to fail.
      Many eyes my ass!
      My debian squeeze is fine. I don't update good code.

    6. Re:Sloppy code by m.alessandrini · · Score: 1
      I think this should make us reflect upon how the most critical aspects of our lives (technologically speaking) are depending on pieces of code far from perfect.

      Let me say that I love free-software and I develop free-software too, but this shows us that parts of it, even hyper-critical parts, are sometimes written by people doing it for "hobby" in their spare time, and lack proper review. And yet free-software is better than close software, especially security-related one.

      So what's the solution? Maybe creating groups of community software reviewers, or using double-factor authentication in everything, like key+password, etc...

    7. Re:Sloppy code by x0ra · · Score: 2

      Then rewrite OpenSSL. I'll be glad to use (for free) the Perfect Software you would have dedicated you life to write

    8. Re:Sloppy code by Anonymous Coward · · Score: 0

      About only nice thing in the code I saw was short functions:) But then again I cringe at stuff like *p++ so I guess I'm not a hardcore C-coder.

    9. Re:Sloppy code by Anonymous Coward · · Score: 2, Insightful

      That attitude is a not insignificant part of the problem, and the "interesting" mod is another part.

    10. Re:Sloppy code by Anonymous Coward · · Score: 0

      The situation would be like that if this was some relaxed experimental hobbyist software. However OpenSSL is installed to gobs of high-profile web servers and thus it must work properly and be fully open to any kind of criticism.

    11. Re:Sloppy code by jones_supa · · Score: 1

      And yet free-software is better than close software, especially security-related one.

      How can you say that after a serious vulnerability like this has been discovered? It certainly does not send the message that free software is better.

    12. Re:Sloppy code by PhilHibbs · · Score: 1

      If some software that is released has problems, people should point it out. If a development process is flawed, people should point it out. If you work in open source software, specifically in security software, you should be prepared for people to criticize both your code and your development and testing safeguards. Maybe billrp could do better. Maybe (unlikely) I could do better. Maybe a hundred people on Slashdot could do better. But do we really want a hundred different open source SSL implementations all written by unknown people? That would not help the situation at all. Maybe all we need is one competing implementation by a different team with different methods, and maybe enough people saying "OpenSSL is not up to the job" might just inspire someone to build that team.

      Free and open criticism is vital in security software. Nobody should ever be told to shut up about this kind of thing.

    13. Re:Sloppy code by m.alessandrini · · Score: 1

      Well, it's better because at least you CAN notice bugs. How many security bugs have occurred in proprietary software (Apple, Microsoft) and stayed there without being fixed for months or years? And how many are there that you cannot know? Windows (to mention one) has security patches almost every week.

    14. Re:Sloppy code by itsdapead · · Score: 3, Interesting

      I glanced at some of the OpenSSL C code, in particular the new code that introduced this bug.

      I don't disagree about the 'coding style' issue, but that kinda misses the point. The points are:

      Theres a memcpy() - where is the bounds checking? Hello? Its not 1976. We all know memcpy is dangerous. Where there's a memcpy there should be a bounds check... even in a fart app. If the project has secure in the title there should be paranoid anal-retentive checking of both the source and destination buffers.

      The code uses data that has come from teh interwebs, - again, where's the obsessive-compulsive validity checking on everything that comes in?

      However, that's still not the point. Programmers make mistakes - and this bug was at least a bit more subtle than the usual one where the bad hat sends an over-length string.

      The problem is with the oft-made claim that Open Source security software is extra-safe because the code is public has been seen by many eyeballs. That claim is dead. Possibly crypto experts have been all over the actual encryption/decryption algorithms in OpenSSL like flies on shit - however, clearly none of them looked at the boring heartbeat stuff. That shouldn't be the death of open source, though - Windows is proprietary and look at the sheer terror caused by the prospect of running Windows XP for one day after the security patches stop...

      --
      In a survey of 100 programmers, 111111 thought that duck-typing was a good idea.
    15. Re:Sloppy code by jones_supa · · Score: 1

      This OpenSSL bug went unnoticed for years.

    16. Re:Sloppy code by Anonymous Coward · · Score: 0

      This attitude is an enormous problem with the Free Software movement.

      Any project which abdicates all accountability toward the users is a project that deserves no users, especially for security software. If FOSS is inherently like that, as your comment suggests, then you do a disservice to yourself whenever you use any FOSS software. Unless you wrote it yourself.

      Abdicating legal accountability -- okay; nobody can afford to risk getting sued for a hundred million dollars for trying to help. But just saying "fuck, you do better"? That's the mark of a true amateur.

      Fortunately I don't think your attitude is universal. But it is corrosive and you do great harm to the entire movement.

      Also not quite sure why you assume he hasn't done better. If anybody is going to comment on this sort of thing with an analysis of OpenSSL source code, it's somebody who has written similar code.

    17. Re:Sloppy code by billrp · · Score: 1

      Here's where I see a pointer to an array on the stack getting passed around: In the openssl-1.0.1f release, in ssl/d1_pkt.c in the function dtls1_dispatch_alert(), at line 1731 "buf" is declared as a local array of chars. At line 1758 a call is made to do_dtls1_write() where the third argument is the address of this array is passed. In that function you'll see this pointer being assigned to a field to a heap alloc'd variable. But maybe this is dead code so it's never reached, but there are no comments.

    18. Re:Sloppy code by m.alessandrini · · Score: 1

      Ah and then there are the *deliberate* security holes in proprietary stacks.

    19. Re:Sloppy code by jones_supa · · Score: 1

      That's one that I agree with, the risk of a backdoors and other malicious features is higher with closed software.

    20. Re:Sloppy code by Anonymous Coward · · Score: 0

      The privacy of us all on the Internet relies on OpenSSL. It simply must work properly.

    21. Re:Sloppy code by Phroggy · · Score: 1

      Feel free to start such a team, and get that competing implementation going.

      --
      $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
      $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
    22. Re:Sloppy code by Anonymous Coward · · Score: 0

      In my experience, projects reject patches, with great hostility. It's also my experience that most maintainers don't want to be bothered. My experiences may be atypical, but do form my opinion of open-source projects.

    23. Re:Sloppy code by x0ra · · Score: 2

      my question remains, when do you deliver your perfect OpenSSL implementation ?

    24. Re:Sloppy code by GigaplexNZ · · Score: 1

      You're not kidding. There's also an awful lot of code passing pointers to functions, where those functions dereference the pointers without checking if they're not null.

  17. lesson by Swampash · · Score: 1

    Never stay up rushing commits on New Year's Eve.

    1. Re:lesson by dohzer · · Score: 1

      Is it just me or do all the most exciting commits happen at NYE parties?

  18. Credentials by Anonymous Coward · · Score: 0

    I had to post anonymously because I was not sure my credentials are safe on this site

  19. Linux and Security by Anonymous Coward · · Score: 0

    As Linux grows, so will the bugs, exploits, and vulnerabilities.

    Don't know much about what and how but many major corporations are struggling to figure out what the risks are and how to remediate.

    It is going to be a busy month and a log of developers coders and qa people will be very busy...

  20. Sue FSF, relicense all GNU software ... by drnb · · Score: 1

    And even if these companies could legally sue (jurisdictions notwithstanding), what would the point be?

    Take ownership and control of the project.

    Hmmm ... Find a way to sue the FSF, get ownership/control, relicense all GNU software.

    1. Re:Sue FSF, relicense all GNU software ... by Anonymous Coward · · Score: 0

      You'll find that the FSF has entered into a lot of contracts with code contributors regarding what they can license said code under.

      There is not much to be gained by taking them over.

      Some time ago, two shetland ponies were fed in our yard, and the larger one chased the other one away from the hay pile. So my SO put up another pile in safe distance. The larger pony then pissed on his pile and moved on to the other one.

      You'll find that the assets of the FSF are not really of the kind that a corporate investor would enjoy swallowing.

    2. Re:Sue FSF, relicense all GNU software ... by TheRaven64 · · Score: 1

      The FSF requires copyright assignment for all of their projects, so they do have some quite valuable assets. They provide the original author with a license to sublicense their contributed code under whatever license they choose, but they are the only ones that can relicense the whole. For example, if someone else managed to gain control of the GNU assets then they could legally relicense GCC under an MIT license, allowing its code to be used anywhere.

      --
      I am TheRaven on Soylent News
  21. Honestly by Anonymous Coward · · Score: 0

    Seggelderp is a much better name than Heartbleed.

  22. Alex Jone's Razor by Anonymous Coward · · Score: 0

    If there is more than one explanation always choose the one that involves a conspiracy.

  23. Beta Sucks by Anonymous Coward · · Score: 0

    "As an open-source dev myself, I often wonder why the fuck I do anything useful for others when they'll just turn on me the moment their toys don't work exactly as desired because -- gorsh -- I'm not perfect, though I work very hard to be."

    The cost of this bug will probably run into billions of dollars, not to mention an increasing distrust of anything supposedly 'secure' on the Internet. That's hardly 'not working exactly as desired'.

    Anyone writing security software should know to never, ever, ever trust any user-supplied input. We have to deal with a lot of user-provided messaging, and that's pretty much rule #1; the only crashes in our software over the last couple of years were due to third-party libraries which don't sanitize and validate user-provided messages before processing them. Dumb fscks.

    1. Re:Beta Sucks by Anonymous Coward · · Score: 0

      The cost of this bug will probably run into billions of dollars

      This isn't closed source software we're talking about. If you are in a situation where a bug like this can cost you millions of dollars
      then you should probably hire a code reviewer or two yourself to double check commits. Don't blame the guy working for free
      and don't assume the code is bugfree. Proprietary software you have to take at face value but open source you can check it
      sufficiently for your needs. I honestly don't know why any multimillion dollar company doesn't demand complete open source for this
      reason alone.

    2. Re:Beta Sucks by Lodlaiden · · Score: 0

      It's open source. If you feel it was an important library, contribute.
      You didn't. You know why? Because you can't code. So STFU.

      I'm actually glad this happened. People need to realize that [quality] software development is a skill that should be paid for. Too often entire business sites/models are founded on using the free hard work of other people. I rely on some open source stuff, but it's not mission critical stuff. We use software that came with a license, that has an 800 number on the other end if something bad happens.

      --
      Suborbital [spaceflight] is the special olympics of spaceflight. - Rei
    3. Re:Beta Sucks by Anonymous Coward · · Score: 0

      I disagree with your conclusion: "All because one bozo didn't check user data before using it."

      This problem is not because of one person. Every business that relies on software systems is fundamentally responsible for those systems. If you run a business and you think it's someone else's fault when things go wrong on your systems, your business isn't going to last.

      A lot of the comments on this thread make it seem like the posters are experts on SSL and TLS. Well, where was everyone when it mattered?

    4. Re:Beta Sucks by Lodlaiden · · Score: 1

      There are a lot of AC here, with a lot of talents from coding to network guru to string theorist to quality lawyer. I didn't realize you were one of the coding rockstar variety.

      --
      Suborbital [spaceflight] is the special olympics of spaceflight. - Rei
  24. The real failure is in the process by rrr00bb5454 · · Score: 4, Insightful

    C is a perfect language for back-dooring code. Without good tools - even for the sake of code reviewers that are trying to defend the code base against good malicious programmers - we won't be able to keep up. Most C code is going to be full of accidental back doors, and possibly a few intentional ones. Something has to be done about machine assisted proof of memory safety, and about ensuring that parse code either follows a spec or stops parsing the input. High level languages with memory safe semantics are essentially constructive proof of memory safety at the cost of performance. You can also go the route of fixing the defaults of what is going to be allowed in important C files, and force programmers to #pragma their way out of violating the constraints so that potential bugs are easy to spot. Or better yet, stop using read() in the raw to ingest input; and force the code to parse input with a well defined grammar (and fail to compile otherwise). You don't necessarily need an abstract garbage collected language that prevents you from cutting yourself. What you really need is by any means necessary to limit security critical code to constructs that the compiler can prove the consistency of. Code review should essentially amount to the reviewer making a list of proof demands, with the review process failing until there are machine checkable proofs of these facts. Every exception to these rules (Supress warnings, or accepting a hand proof, or proof by authority) need to be documented at the line where they happen. That way, when the next back door is discovered, we can easily search for the place that introduced it. This is not theoretical at all. I worked with a guy who was publicly accused of back dooring a Unix. No amount of code review will clear anyone of suspicion; because we use the crappiest tools for proving correctness of even small things.

    1. Re:The real failure is in the process by phantomfive · · Score: 2

      As opposed to a language with polymorphism, where it's impossible at compile time to know which function will actually get called at runtime? Maybe every secure situation should require C.

      --
      "First they came for the slanderers and i said nothing."
    2. Re:The real failure is in the process by x0ra · · Score: 1

      There is a reason for a yearly "International Obfuscated C Code Contest" ;-)

    3. Re:The real failure is in the process by Megol · · Score: 1

      As opposed to a language with polymorphism, where it's impossible at compile time to know which function will actually get called at runtime? Maybe every secure situation should require C.

      First there are several types of polymorphism, most of which can be checked statically given a good programming language. The rest can be avoided.

      Except for familiarity and legacy codebases there isn't really a good reason to use C.

    4. Re:The real failure is in the process by phantomfive · · Score: 1

      Except for familiarity and legacy codebases there isn't really a good reason to use C.

      Just like there's no good reason to use the other types of polymorphism, eh? You sound like a real open-minded spark, there.

      --
      "First they came for the slanderers and i said nothing."
    5. Re:The real failure is in the process by Anonymous Coward · · Score: 0

      You're aware C has function pointers?

      It's actually HARDER for the compiler to reason about C, because it has a much weaker typing system than C++ (or any other modern staticly typed language). Types are the main way the compiler reasons about your code. Having a rich type system allows you to do things like make sure measurement units aren't confused, make sure enums aren't mixed in unintended ways, reduce the chance of memory misuse (an allocation for ints can't be used for strings without a cast, whereas in C malloc always requires a cast), reduce the chance of calling a function incorrectly (arrays decay to pointers in C, which loses all the info; in C++ function calls a vector remains a vector and a vector of vectors remains a vector of vectors, etc), and so on.

  25. How did it make it into distros? by MouseTheLuckyDog · · Score: 1

    Was this an old feature, or a relatively now one.
    If so how did it make it into distros without being extremely vetted. Given that openSSL is one of the core parts of security?

  26. Add that to your CV by Anonymous Coward · · Score: 0

    Poor bastard. Being responsible for one of the worst security breaches ever does not help the CV...

    1. Re:Add that to your CV by x0ra · · Score: 1

      I would be glad about it. At least, he is doing something, not idling on /. pointing fingers.

  27. Beta Sucks by Anonymous Coward · · Score: 0

    This isn't one site we're talking about, or even a thousand sites, losing millions of dollars each. This is millions of sites losing hundreds to thousands of dollars as they have to upgrade their servers, potentially shut them down until they're upgraded, replace SSL keys, and make users replace passwords.

    All because one bozo didn't check user data before using it.

  28. Not malicious but not honest? by Anonymous Coward · · Score: 5, Insightful

    Hmm, considering that the real bug is OpenSSL's malloc, where it was reusing 'freed' memory I think that's the bug that is critical. The developer who put in the TLS support itself may have been under the assumption that since OpenSSL didn't die/crash once implemented that everything was honky-dory, and the reviewer likewise.

    1. Re:Not malicious but not honest? by 0xdeaddead · · Score: 5, Insightful

      this x10000... as always everyone is looking at the wrong thing. and this goes for every project that tries to micromanage the heap.

    2. Re:Not malicious but not honest? by Lisandro · · Score: 4, Insightful

      Ditto. Writing a custom malloc is insane for a sensitive security library like this... specially when it is done so carelessly.

      The fact that OpenSSL won't even work using regular malloc() suggests that there're more issues waiting to pop up here.

    3. Re:Not malicious but not honest? by Eunuchswear · · Score: 5, Informative

      considering that the real bug is OpenSSL's malloc, where it was reusing 'freed' memory I think that's the bug that is critical.

      Well. no.

      The bad bit of code is, per http://www.tedunangst.com/flak/post/heartbleed-vs-mallocconf:

      struct {
              unsigned short len;
              char payload[];
      } *packet;

      packet = malloc(amt);
      read(s, packet, amt);
      buffer = malloc(packet->len);
      memcpy(buffer, packet->payload, packet->len);
      write(s, buffer, packet->len);

      The bad bit is that "amt" is not checked against "packet->len", so the copy into "buffer" reads off the end of the allocated data structure "packet". The data read may be freed memory, or it may be allocated memory.

      The only way malloc could completely protect against the bug would be by putting an unmapped guard page after every malloced block - making every malloced block at least one page long and slowing malloc down by the time needed for all those munmaps. (Probably making malloc slow enough to incite OpenSSL devs to implement their own malloc layer...)

      I think the real bug is in the RFC.

      Look at the fix:

      /* Read type and payload length first */
      if (1 + 2 + 16 > s->s3->rrec.length)
              return 0; /* silently discard */
      hbtype = *p++;
      n2s(p, payload);
      if (1 + 2 + payload + 16 > s->s3->rrec.length)
              return 0; /* silently discard per RFC 6520 sec. 4 */
      pl = p;

      Why does the heartbeat request even contain the length of the heartbeat block? We know the length of the SSL record!

      (Not even bothering with the whole problem that the heartbeat thing is ridiculous - there are already ways of keeping connections alive at the TCP level - why does every layer of the protocol need it's own keepalive).

      --
      Watch this Heartland Institute video
    4. Re:Not malicious but not honest? by Eunuchswear · · Score: 5, Interesting

      I know this is redundant but this is funny:

      Seggelmann told the Sydney Morning Herald. 'In one of the new features, unfortunately, I missed validating a variable containing a length.'

      https://tools.ietf.org/html/rfc6520

      Internet Engineering Task Force (IETF)
      Request for Comments: 6520
      Category: Standards Track
      ISSN: 2070-1721

      R. Seggelmann, M. Tuexen: Muenster Univ. of Appl. Sciences
      M. Williams: GWhiz Arts & Sciences
      February 2012

      Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS) Heartbeat Extension ...

      If the payload_length of a received HeartbeatMessage is too large, the received HeartbeatMessage MUST be discarded silently.

      Can't even implement an RFC he wrote himself. Nice one.

      --
      Watch this Heartland Institute video
    5. Re:Not malicious but not honest? by TheRaven64 · · Score: 4, Insightful

      The point is not that a general malloc() would catch it, but that there are security-focussed malloc() implementations that will. Even valgrind will - it knows that malloc() has special properties and so will object if you derive a valid pointer to the wrong allocation by running off the end of another one. You don't need to use the security-focussed malloc() in deployment (unless you're really paranoid), you just need to support testing with it. Running this code with a malloc() that did aggressive bounds checking would have caught it immediately. That's something a continuous integration system and a test suite ought to have caught.

      --
      I am TheRaven on Soylent News
    6. Re:Not malicious but not honest? by Zidel · · Score: 3, Interesting

      Why does the heartbeat request even contain the length of the heartbeat block? We know the length of the SSL record!

      The record has two variable length fields, so you need a length field for either the payload or the padding. In this case the payload has the length field and the padding length is implicit.

    7. Re:Not malicious but not honest? by Anonymous Coward · · Score: 0

      > Why does the heartbeat request even contain the length of the heartbeat block?

      Because it's TLS. If it doesn't contain loads of security vulnerabilities and other issues right in the spec it wouldn't be TLS. Even if in this case the spec at least got the behaviour right, nobody thought so far as asking why they have a length field that allows the issue in the first place.

    8. Re:Not malicious but not honest? by Anonymous Coward · · Score: 0

      > The only way malloc could completely protect against the bug would be by putting an unmapped guard page after every malloced block

      Putting it around the secret keys would have been absolutely enough to avoid some of the very worst issues.

    9. Re:Not malicious but not honest? by Alomex · · Score: 1

      No decent programming language would read into a buffer without itself testing for a valid length. Such a test has negligible cost compared to actually reading the array, so there is no reason not to make it.

      We could fix it and stop this billion dollar bugs or we can carry on "with tradition" and refuse to fix that basic mistake from the C designers.

    10. Re:Not malicious but not honest? by kyrsjo · · Score: 1

      Would it really be caugth *immediately* under testing? All non-corrupted & non-malicious packages have the correct length set, and thus would not trigger the bug.

    11. Re:Not malicious but not honest? by amn108 · · Score: 4, Insightful

      If they had resorted to their area of expertise and simply used the malloc provided with the system, like all the regular chaps would do, even in their situation, the code would crash upon running (freed memory access) and the bug would surface already at New Years Eve 2012-2013 when Seggelmann was hopefully test-running it. So, even though indeed the code you quoted is the "bad bit", the real and broader issue probably is the teams questionable approach to development in general, in particular their false belief that someone writing a security library should consider themselves experts in rewriting heap management. Which ultimately cost them and their users. Sloppy sloppy.

      This kind of practice of overestimating ones area of expertise - should be frowned upon everytime, for a good reason. We (developers) need to put it in our heads - not all algorithms are equal, and even though you and me may be prime experts at say, writing a perfectly safe implementation of SSL/TLS, we probably should steer clear of the stuff others know much more about, like heap, strings and what not. Time and again, someone comes along with the "brilliant" idea of "optimizing" the system heap allocator through caching memory blocks. True genius. No offense Robin, but WHY?! Yes, maybe the system malloc is slower than you'd like - still it is NOT YOUR PROBLEM. Division of responsibility, man. Let Glibc folks optimize malloc, or submit a patch THEY can review, if you have wonderful malloc improvement ideas.

    12. Re:Not malicious but not honest? by multi+io · · Score: 1

      Why does the heartbeat request even contain the length of the heartbeat block?

      The real question is, why even have the whole heartbeat TLS RFC in the first place, when the underlying TCP layer already checks for timeouts all by itself (you can run TLS over UDP, but hardly anybody does, and then you'd specify the heartbeat stuff only for that use case).

    13. Re:Not malicious but not honest? by Anonymous Coward · · Score: 0

      Only if someone thought to add a use case for this particular malformed incoming message. Everything is easy in hindsight but it's hard to foresee every possible message that might be sent.

    14. Re:Not malicious but not honest? by nctritech · · Score: 5, Insightful

      Programmers make these kinds of mistakes all the time. It's not uncommon. The problem is that a mistake in a text editor "undo" function is nowhere near as big of a security issue as such a mistake in a network-connected cryptography library.

      Look at the recent Apple security hole: all they did was leave in a redundant "goto" statement that unfortunately had the effect of negating the purpose of the previous check and opening a hole. It could have been as simple as not deleting the line due to a distraction somewhere else in the code, and it likely passed all the unit tests (can't easily write a test for all of these types of mistakes.)

      Programmers are human. They'll make a ton of mistakes. I can't say I blame him for making one; anyone who has written enough C code is used to making plenty of mistakes before something usable comes out the other end.

    15. Re:Not malicious but not honest? by squiggleslash · · Score: 5, Informative

      FWIW, that's a misreading of Theo (and other's) comments.

      The failure to use the system malloc() was not the underlying issue. In most operating systems, the Heartbleed bug would have been implemented even if OpenSSL used the system malloc().

      The issue was more that the system malloc() in OpenBSD (and some other operating systems) has been hardened so that, when passed various flags, it'll either zero out the block first before returning it (like calloc()) or in OpenBSD's case it'll actually mark the pages using the MMU in such a way that if the block is read before written to it'll cause the application reading the block to crash.

      As a result, IF OpenSSL had used the system malloc() then two things would have happened. First, the bug would have slightly more likely been discovered (if exploited, and if someone was religiously watching what was happening to the Apache child processes on their OpenBSD server.)

      Second, regardless of whether the bug would have been discovered, OpenBSD servers wouldn't have been compromised.

      That's it.

      The bug itself had to do with allowing a mismatch between the amount of data sent and the amount retransmitted in what's essentially an echo command that TLS implements. A hardened malloc() would make it impossible to exploit that, but OpenSSL would still have a bug even with one, just one that couldn't (probably, maybe, perhaps) be used to get confidential data.

      --
      You are not alone. This is not normal. None of this is normal.
    16. Re:Not malicious but not honest? by 140Mandak262Jamuna · · Score: 1

      Why does the heartbeat request even contain the length of the heartbeat block? We know the length of the SSL record!

      It is a good programming practice not to hard wire such "known" values even if they are constant, in the current builds. In future it might change. Some times it makes sense to make it something like a #define macro. But to maintain backward compatibility, and code reuse etc, we tend to write the low level functions with arguments and make sure callers use the the correct pre defined constants based on current and past implementations to maintain backward compatibility.

      --
      sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
    17. Re:Not malicious but not honest? by Eunuchswear · · Score: 3, Insightful

      If they had resorted to their area of expertise and simply used the malloc provided with the system, like all the regular chaps would do, even in their situation, the code would crash upon running (freed memory access) and the bug would surface already at New Years Eve 2012-2013 when Seggelmann was hopefully test-running it.

      Only if Seggelman thought to test it with a malformed packet.

      If the code was run with a malloc that splattered unmapped pages around like OpenBSD malloc apparently does then it would crash when it was exploited, and people would be complaining "OpenBSD breaks OpenSSL, fix your shit Theo" and the problem would have been found earlier.

      --
      Watch this Heartland Institute video
    18. Re:Not malicious but not honest? by TheRaven64 · · Score: 2

      I'm not sure what testing OpenSSL does, but most protocol tests include a fuzzing component, and if the fuzzer didn't generate heartbeat packets with an invalid length then it's not doing a good job. This sort of code is routinely run by people outside the OpenSSL team to look for vulnerabilities, so I'd hope that they'd do it themselves. Generally, any field that contains a length is used in guided fuzzing, because it's easy to get wrong.

      --
      I am TheRaven on Soylent News
    19. Re:Not malicious but not honest? by Anonymous Coward · · Score: 0

      But the heartbeat was too short.

    20. Re:Not malicious but not honest? by TheCarp · · Score: 1

      > The fact that OpenSSL won't even work using regular malloc() suggests that there're more issues
      > waiting to pop up here.

      Has it been tried? I saw the claim that they didn't make a compile time option to switch and so they have not had any way to test with the system malloc() in a long time, but I didn't see any claims that someone actually swapped it out for malloc() and it didn't work.

      --
      "I opened my eyes, and everything went dark again"
    21. Re:Not malicious but not honest? by Phroggy · · Score: 1

      Exactly this. I feel its worth pointing out that the code was reviewed, and the reviewer missed the bug too.

      --
      $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
      $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
    22. Re:Not malicious but not honest? by Benanov · · Score: 1

      Yeah, Ted Unangst (OpenBSD) looked into it.

      http://www.tedunangst.com/flak...

      Basically: someone took advantage of the OpenSSL Malloc allowing use-after-free. What is this, SimCity for Windows?

    23. Re:Not malicious but not honest? by nctritech · · Score: 5, Insightful

      In retrospect these bugs look so simple and stupid to casual observers, but programmers know that simplistic hindsight shoulda-woulda-coulda analysis such as "oh, it only needed a simple bounds check!" and "you should have removed that goto line while you were working on that code!" only shows a gross lack of understanding of what real-world programming is like. It's easy to forget a simple bounds check; hell, it's a miracle a programmer gets anything done at all with all of the variables and structs and malloc() calls and pointers that have to be memorized. I recently wrote the code for adding undo support for BusyBox vi, and I can tell you firsthand that what seems like a simple thing (store changes, undo them) is a complicated and frustrating process once you start in on it. Even after I made simple undo actions work, the challenges compounded when I added the "intermediate queuing" enhancement to lower the otherwise insane malloc() overhead and improve the overall behavior of my "simplest thing that could possibly work" code.

      The process of dissolving a big problem into low-level steps as is required by C programming is mentally brutal. You can't just go "I want to save the text that was deleted and restore it when they hit the undo key." You have to translate that into variables, pointers, structs, mallocs, and glue logic. You have to take into account every corner case; how do you undo multiple lines of pasted text instead of single characters? How do you store undo information a paste-over operation, where you must keep a record of what was deleted but also record that it overwrites a (possibly different length) chunk of the text buffer? How do you store the undo data for find-and-replace operations? Now that you've managed to figure out ways to store all these different types of text editing operations for undoing, how do you actually undo each one? Where does all this stuff need to hook into the existing program, and how will you hook it in without breaking existing functionality?

      It's so easy to forget trivially simple things when you're trying to flow your mind through that complex glue logic that makes the magic happen, especially when you make a change, it appears to work, and you have no way to test for the bug you created by accidental error or omission.

    24. Re:Not malicious but not honest? by Anonymous Coward · · Score: 0

      Writing a custom malloc is not insane for this, indeed it's absolutely necessary. This library needs to perform, and memory pooling, which is why you would do such a thing, is a critical way to do that.

      The fact that it won't work using regular malloc does not suggest a problem. It most likely points again to memory pooling, which is a well known best practice to get performance.

    25. Re:Not malicious but not honest? by Anonymous Coward · · Score: 0

      reusing freed memory is called memory pooling and is a well known best practice for getting performance in a performance critical application. It is not a bug.

    26. Re:Not malicious but not honest? by Bacon+Bits · · Score: 2, Interesting

      Programmers are human. They'll make a ton of mistakes.

      Doctors are human. We hold them accountable for their mistakes. Engineers are human. We hold them accountable for their mistakes. Indeed, we hold just about everybody accountable for their on-the-job mistakes and the consequences of their mistakes result in everything from terminations to criminal proceedings.

      So, when should programmers be held accountable for their mistakes, and how should be respond as a society?

      --
      The road to tyranny has always been paved with claims of necessity.
    27. Re:Not malicious but not honest? by nctritech · · Score: 5, Insightful

      Using your analogy, free software like OpenSSL would be under the "good samaritan" laws. If someone attempts to sew you up in the field to stop bleeding but the stitches fail and you bleed out and die anyway, that person wouldn't be held responsible for killing you since they were attempting to help you as best as they could and you'd have died otherwise. If you don't use a SSL stack, you have no encryption. OpenSSL programmers are good samaritans, but OpenSSL is not offered with any guarantee that it will be useful, you don't have to use it (there are many cipher suites), and since it's open, the user can audit it for themselves. One could argue, "why didn't the millions of users of the code audit the code before using it? When do we hold our hosting providers and banks responsible?"

      A doctor performing surgery or an engineer designing a manufacturing machine (both at significant expense to the customer) are quite different from using something you got completely for free with full design schematics an upfront "there is no guarantee that this will work but we hope you find it useful" warning and that free thing leaking its contents for some reason.

    28. Re:Not malicious but not honest? by Anonymous Coward · · Score: 0

      Then provide a "platform" library that defers the free to the next call to malloc and see if it works.

    29. Re:Not malicious but not honest? by ColdSam · · Score: 1

      That's a terrible analogy. Just being unpaid wouldn't qualify you for good samaritan status. A fair analogy would be either:

      1) The doctor is offering free non-emergency surgery (e.g.ACL repair)

      or

      2) A programmer rushes to fix the Heartbleed bug, but doesn't get it quite right so it is still flawed.

    30. Re:Not malicious but not honest? by nctritech · · Score: 3, Insightful

      OpenSSL is offered with no warranty, is completely free of charge, and numerous alternatives (free and proprietary) exist. The programmers are not responsible for what other people ultimately do with the source code they offer. There is no way to hold the OpenSSL programmers responsible for this. The person deploying the actual library into production use would be the one that is ultimately responsible.

    31. Re:Not malicious but not honest? by ColdSam · · Score: 1

      Let's assume that's all true. What does that have to do with your "good samaritan" example? A doctor can't just offer free surgery with no "warranty" and be completely absolved of responsibility for any mistakes.

    32. Re:Not malicious but not honest? by arse+maker · · Score: 1

      Programming is just breaking down a real world task into smaller and smaller parts until you can write code to achieve it.
      So all bugs seem trival in reflection because code is simple (single threaded anyhow :p).

      To be fair though, this was part of the rfc, and is the sort of thing you write unit tests to catch. These sort of well defined algorithims are extremely unit testable. This is the way you test functionality and stop regression bugs.

      Sure you could still miss it, its just most of our bugs don't cause such a huge pain in the ass for the internet.

    33. Re:Not malicious but not honest? by Anonymous Coward · · Score: 0

      in other countries u sign a a document saying u accept anything can happen in surgery etc etc

      manufacturing etc issue is normally with an organisation not an incompetent individual - who often gets off free.

    34. Re:Not malicious but not honest? by arse+maker · · Score: 1

      Its a fair point I guess. But there is no self regulation in the software industry. There is no standard qualifications.
      The internet isn't regulated. There is no malpractice laws for code. These companies used this software as-is without warranty.

      You could create laws to make people liable for the free code the provide. But they don't exist now. Im not sure how you could make it work.

      We live in a new time now where the technology we use is so homogeneous, interconnected and fast that mistakes can cripple a large percent of the people on earth in a very short period of time. Even an incompetent doctor can only kill one patient at a time.

      At some point laws will regulate things as important as ssl, but for now its still the wild west.

    35. Re:Not malicious but not honest? by Anonymous Coward · · Score: 0

      "Management" is the accountable party in all of these professions, in terms of going with assuming respect for reality.

      How much one wishes to have peer-review and other validating processes are ultimately entirely under the control of management, and the appropriate amount of these, unfortunately, is generally mandated at "as cheap as possible."

      I fear you vastly overestimate the amount of actual control of the risk factors the average professional actually has. The answer isn't to make coders "more responsible," its to make management more responsible for the outcomes of the work of -all- of the categories of work you have mentioned. The risk factors are determined by the work/project context. The context is determined by the organization's management. There are few people who, individually, will do less then the best they are capable of to avoid fucking up what is in the scope of their control. That, often, isn't enough. The ultimate reason it isn't enough is... management, and dollars.

    36. Re:Not malicious but not honest? by nctritech · · Score: 1

      You're asking me to defend an analogy that is intentionally based on the flawed premises in its parent post; I don't see how that would be helpful.

    37. Re:Not malicious but not honest? by nctritech · · Score: 1

      If SSL was tightly regulated, free SSL stacks wouldn't be provided anymore; also, government control over the encryption available to the public is always a bad thing.

    38. Re:Not malicious but not honest? by idontgno · · Score: 1

      The bug itself had to do with allowing a mismatch between the amount of data sent and the amount retransmitted in what's essentially an echo command that TLS implements. A hardened malloc() would make it impossible to exploit that, but OpenSSL would still have a bug even with one, just one that couldn't (probably, maybe, perhaps) be used to get confidential data.

      Right. Instead of a remotely-exploitable information leak, it's most probably reduced to (at worst) a low-grade denial-of-service attack caused by crashing HTTPS server processes no faster than they can respawn.

      By that critereon alone, I do surely wish OpenSSL had just stuck to the dog-standard malloc() rather than cowboying up their own.

      --
      Welcome to the Panopticon. Used to be a prison, now it's your home.
    39. Re:Not malicious but not honest? by MartinG · · Score: 2

      Programmers are human. They'll make a ton of mistakes

      Humans make certain classes of mistake. Things like array bounds checking are really easy to miss.

      If only machines were good at this stuff. How come we don't have any languages that do this for us yet?

      --
      -- MartinG To mail me: echo kewyjlcxyzvjfxbqwh | tr bcefhjklqvwxyz .@adgimnoprstu
    40. Re:Not malicious but not honest? by MartinG · · Score: 2

      (I hope the sarcasm in my comment was obvious.)

      --
      -- MartinG To mail me: echo kewyjlcxyzvjfxbqwh | tr bcefhjklqvwxyz .@adgimnoprstu
    41. Re:Not malicious but not honest? by Dogers · · Score: 1

      If the RFC says the request should be dropped if the length doesn't match, surely that would be a specifically required test case?

      --
      I am a viral sig. Please copy me and help me spread. Thank you.
    42. Re:Not malicious but not honest? by ColdSam · · Score: 1

      You could make people liable for their free code just as we do for doctors. You would make it illegal for non certified people to offer code (free or otherwise) and you would sue them for their mistakes.

      That is not to say that we should do that, but it's not crazy. We've made the choice that we don't want random people offering medical care, even if it often is better off than the care some people are getting today (in rural areas underrepresented by doctors and hospitals, e.g.).

      I think your definition of doctor is narrower than your definition of programmer. Some doctors can cause great harm to a very large number of people, perhaps by giving bad advice (vaccines cause autism!), faking or doing a poor ass job in a study, creating poor hospital procedures (save time by not washing hands!), ....

      I'm not sure laws need to govern SSL, except perhaps for government use. Or perhaps only in the form of consumer protection, holding companies who are vulnerable liable, which will then make them more careful about where they get their software from.

    43. Re:Not malicious but not honest? by ColdSam · · Score: 1

      I'm not asking you to defend it, just saying that your criticism of it (or call it an observation, if you will) is unfounded. The "good samaritan" exclusion is irrelevant to the conversation, in fact the whole tangent about open software being "free" says nothing about whether software should be regulated like medical care.

    44. Re:Not malicious but not honest? by rdnetto · · Score: 1

      If they were using a custom malloc, then they should have been memset (or similar) to zero the blocks when debugging. That way, use-after-frees still manifest as crashes when testing (it could be disabled in release builds to improve performance).
      I'm in no way an experienced C programmer, but if I were reimplementing something as core as malloc/free I would include a ton of sanity checks and safeguards to make sure that, at least on debug builds, this sort of bug was obvious.

      --
      Most human behaviour can be explained in terms of identity.
    45. Re:Not malicious but not honest? by spazdor · · Score: 1

      Medicine is a special case of a profession which is subject to additional consumer protections above and beyond the regular market ones, for reasons relating to safety.

      you can, however, sell 'medicine' to the public with no guarantee of its *efficacy* for a particular purpose, merely that it be safe. That's homeopathy.

      --
      DRM: Terminator crops for your mind!
    46. Re:Not malicious but not honest? by Eunuchswear · · Score: 1

      Good point.

      But he wrote an RFC that said you MUST test the length, then wrote code that didn't test the length, then you expect him to provide a test case for that?

      --
      Watch this Heartland Institute video
    47. Re:Not malicious but not honest? by ColdSam · · Score: 1

      Medicine is a special case of a profession which is subject to additional consumer protections above and beyond the regular market ones, for reasons relating to safety.

      It's treated as a special case, but it shouldn't be. Money == Life, so in that regard this bug has caused more deaths than all but a very small percentage of doctors.

      you can, however, sell 'medicine' to the public with no guarantee of its *efficacy* for a particular purpose, merely that it be safe. That's homeopathy.

      And that should be covered under laws governing fraud.

    48. Re:Not malicious but not honest? by ndogg · · Score: 1

      To a certain extent, you're right, but open source lives and breaths on its reputation, and I'm fairly certain that the coders behind OpenSSL are employed somewhere in their capacity to actually write code. I'm not certain that they're necessarily employed to write OpenSSL code, but it wouldn't surprise me. On top of that, many employers of open source developers often offer paid support for what their employees are coding up.

      And so to the extent of their reputation, and any paid support provided, they will be held to account.

      --
      // file: mice.h
      #include "frickin_lasers.h"
    49. Re:Not malicious but not honest? by Anonymous Coward · · Score: 0

      Programmers make these kinds of mistakes all the time. It's not uncommon. The problem is that a mistake in a text editor "undo" function is nowhere near as big of a security issue as such a mistake in a network-connected cryptography library.

      Look at the recent Apple security hole: all they did was leave in a redundant "goto" statement that unfortunately had the effect of negating the purpose of the previous check and opening a hole. It could have been as simple as not deleting the line due to a distraction somewhere else in the code, and it likely passed all the unit tests (can't easily write a test for all of these types of mistakes.)

      Programmers are human. They'll make a ton of mistakes. I can't say I blame him for making one; anyone who has written enough C code is used to making plenty of mistakes before something usable comes out the other end.

      I made these mistakes all the time, then I decided to quit trying to be a programmer. I assumed you guys had a standard you held yourselves to.

    50. Re:Not malicious but not honest? by Anonymous Coward · · Score: 0

      currently no one in government is being held accountable for all sorts of screw ups, destroying people's lives and even deaths.

    51. Re:Not malicious but not honest? by Anonymous Coward · · Score: 0

      Why would it be fraud to not guarantee something? Refraining from making guarantees is the kind of thing I would do to avoid fraud suits.

    52. Re:Not malicious but not honest? by Dogers · · Score: 1

      I know what you're saying, but to me if you're coding to a specification (even if he wrote it himself!) which says "if X then Y", surely you should create a test to ensure it meets the spec..?

      Or okay, he didn't create the test, but perhaps someone else should have before integrating the patch. But yeah, hindsight, 20/20, etc :)

      --
      I am a viral sig. Please copy me and help me spread. Thank you.
    53. Re:Not malicious but not honest? by OdinOdin_ · · Score: 1

      Huh no.... the developer who put in the TLS Heartbeat support tested it by sending valid and well formed data.

      To expose this bug you have to send a validly authenticated SSL3 record, but intentionally modify a length attributes that is inside it and designed to convey the length of the heartbeat payload data. This length might overrun the available length of data left inside the SSL3 record. The failure was not performing this bounds checking, is the heartbeat payload length longer than the remainder of the available data left inside the SSL3 record. I presume a TLS heartbeat is not allowed to cross SSL3 records and the limit of an SSL3 record is 64Kb as mandated by the TLS protocol.

      So no OpenSSL doesn't crash because when tested against itself the data was always well formed and valid.

    54. Re:Not malicious but not honest? by OdinOdin_ · · Score: 1

      It might contain a length due to cipher block padding ? Is the SSL/TLS record length guaranteed to have 1 byte granularity for all supported block cipher modes and methods?

      It might contain the length to allow the protocol to be extended at a later date, by putting additional data after the heartbeat echo payload. Because version 1 of the feature included the length, the data that may exist afterwards can be specified in version 2 of the feature but version 1 systems can still interact as-if it was version 1.

      My question is... why is the correct action to silently discard the record ? Surely a malformed heartbeat record should result in a TLS protocol error response, with no further inbound or outbound data process (except to flush the error advise record to the other end) and a closed connection ?

    55. Re:Not malicious but not honest? by squiggleslash · · Score: 1

      Right. Instead of a remotely-exploitable information leak, it's most probably reduced to (at worst) a low-grade denial-of-service attack caused by crashing HTTPS server processes no faster than they can respawn.

      ...but only on operating systems/platforms with a hardened malloc() that has been configured to use the hardening.

      --
      You are not alone. This is not normal. None of this is normal.
    56. Re:Not malicious but not honest? by devman · · Score: 1

      This all depends on how much society wants to pay for software, and whether or not you think a programmers guild is a good thing advancement of the profession (ala AMA or Bar association) as that would soon follow. Also not all mistakes are created equal, mistakes result in everything from "Oops!" to criminal proceedings, I believe is what you meant to say. Unless you were trying to imply that all mistakes result in a minimum of someone losing their job.

  29. why do we need application layer MTU? by Anonymous Coward · · Score: 0

    That was the purpose of the feature he put in that had the bug. He wrote the RFC, too. For fuck's sake, why do we need to compute maximum transfer unit from the goldang application layer? Isn't that what the transport layer is for?

  30. It was reviewed by others for sure... by thrill12 · · Score: 1

    ...thing is, they were by law forbidden to disclose anything to the general public :)

    --
    Slashdot: stuff for news, nerds that matter, matter for news, stuff that nerd
  31. Open Source = many eyes? by Anonymous Coward · · Score: 0

    Isn't the mantra that open source is wonderful because there's so many people looking at the code there can never be a problem?

    1. Re:Open Source = many eyes? by Anonymous Coward · · Score: 0

      And in this case, in addition to all the public eyes, there was even a dedicated review person.

    2. Re:Open Source = many eyes? by Kythe · · Score: 1

      I think you're misstating the mantra, but anyway... Incompetence isn't limited to proprietary software. Does that make you happy?

      --

      Kythe
  32. The question remains why this extension? by Casandro · · Score: 1

    I mean keep alive is already done by TCP, a keep alive doesn't need data. Why did this even get into the standard?

    It seems like the only purpose for this code was for Robin S. to erect a monument for himself. Again why did this get into the standard?

    1. Re:The question remains why this extension? by Urkki · · Score: 2

      UDP does not have keep alive. TCP over TCP is an inherently broken combo so a VPN would prefer UDP. In crypto, it's necessary to hide nature of packets to make traffic analysis harder, which is probably why there is all that length stuff (did not check RFC, if it explains reasons).

    2. Re:The question remains why this extension? by Casandro · · Score: 1

      But wouldn't it make a lot more sense to do this on the application side? There you can easily just add "noise" in any way you want.

    3. Re:The question remains why this extension? by Imagix · · Score: 2

      Not really. That means every application that wants to talk securely would have to add the noise, vs the library that they use adds the noise behind the scenes and the multitude of applications can concern themselves with what they need to do. And if the noise generation needed to be changed for some reason, then you only have to update the library and not the multitudes of applications (some of which may never be updated....).

    4. Re:The question remains why this extension? by Casandro · · Score: 1

      Actually scratch that, the protocol feature is not suitable for adding noise since it's like a ping. You send some data and it comes back verbatim... that's trivial to filter out as an attacker.

      In his paper he admits that no data is necessary.

    5. Re:The question remains why this extension? by Anonymous Coward · · Score: 0

      It is for the UDP variant, DTLS.

  33. Go open sores! by Anonymous Coward · · Score: 0

    Many eyes my ass. Just admit that software is gonna have bugs and get off your presumed high horse. Reminds me of the incident years ago about a repository being compromised for quite some time and the claims made that it was fine because they claimed they checked against other sources.

  34. Re:Well, his software career's ruined by donaldm · · Score: 1

    Now he'll be relegated to solely open-source work - the lowest of the low.

    The Troll is strong with this one :)

    --
    There ain't no such thing as proprietary standards only proprietary formats. Standards are by definition open.
  35. chilling effect by Anonymous Coward · · Score: 0

    Does anyone else here worry that the press's identifying the programmer will discourage people from contributing to open-source projects? Programmers in corporations are often anonymous, which helps in this kind of situation.

  36. Re:Well, his software career's ruined by Urkki · · Score: 1

    It was probably modded down, because it is as clear a troll as they come. That last paragraph is a dead giveaway.

  37. the press said it's been known since 2012 by Anonymous Coward · · Score: 0

    the press said it's been known since 2012, who knew it, or is the press just bs?

  38. Re:Open source failed by Lodlaiden · · Score: 1

    This reinforces a comment I made elsewhere. If you have enterprise class needs, buy enterprise class software.

    --
    Suborbital [spaceflight] is the special olympics of spaceflight. - Rei
  39. Beta Sucks by Anonymous Coward · · Score: 0

    Uh, yes, if you'd actually bothered to read my comments, you'd see that I do code, and I code safety-related systems that run 24/7/365, which can't fail just because someone sends bad data.

    I've also written open source cryptography code in the distance past, and it sure as heck didn't have bugs like this one.

    But, hey, just because you're a bad coder, don't take it out on the rest of us.

  40. Re:Open source failed by istartedi · · Score: 2

    You're likely to get modded Troll; but this really does remind me a bit of Ford vs. Toyota. For years Ford was fixed in peoples minds as the exploding Pinto company, and Toyota was high quality. Now Toyota isn't what it used to be, and Ford is better... but neither is perfect.

    If nothing else this is a good argument against monoculture. We have different systems with different bugs, so it's not a total loss. If the market shares were evenly distributed among 10 different vendors, the black-hat task would be even harder, their impact of success that much less.

    --
    For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
  41. All the non-coders STFU by Lodlaiden · · Score: 1

    This wasn't a facebook app to make him an extra buck.

    He was working on New Years Eve on a C based project that is one of the backbone projects for the entire open source stack.
    That is one hard core programming geek. This guy is an employer's dream.

    --
    Suborbital [spaceflight] is the special olympics of spaceflight. - Rei
    1. Re:All the non-coders STFU by wonkey_monkey · · Score: 1

      He was working on New Years Eve

      Friends don't let friends commit drunk.

      --
      systemd is Roko's Basilisk.
    2. Re:All the non-coders STFU by TheMathemagician · · Score: 1

      Well apart from the quality of his work ... how can he even bear to look at all those hard-coded 'magic numbers' permeating the code, never mind the memory allocation issue.

    3. Re:All the non-coders STFU by jones_supa · · Score: 1

      There's many sides to how you can interpret that. :) Maybe he should have had a relaxing New Year's Eve, keeping a break from coding and enjoying some sparkling wine and potato chips. After a few days when returning to work he would have been more refreshed and not make sloppy mistakes.

  42. Whew by Anonymous Coward · · Score: 0

    As long as he's saying that, his family is safe from the CIA.

  43. Unit Tests are Not Optional Anymore by CodeBuster · · Score: 2

    No production code without unit tests. Every possible type or class of input must be tested. All assumptions must be tested. All outputs must be verified for each possible combination of inputs. All failure modes must be exercised. No excuses, just do it.

    1. Re:Unit Tests are Not Optional Anymore by Psychotria · · Score: 2

      No production code without unit tests. Every possible type or class of input must be tested. All assumptions must be tested. All outputs must be verified for each possible combination of inputs. All failure modes must be exercised. No excuses, just do it.

      Nope. It's a waste of time. Much of the time the people writing the unit tests are the same people writing the code, so their assumptions are also in the unit tests.

    2. Re:Unit Tests are Not Optional Anymore by itsdapead · · Score: 1

      No production code without unit tests. Every possible type or class of input must be tested. All assumptions must be tested. All outputs must be verified for each possible combination of inputs. All failure modes must be exercised. No excuses, just do it.

      Unit testing would only have caught this if someone had thought to test for an invalid payload length in the incoming request. Maybe OpenSSL would be a good candidate for full-blown formal methods that could mathematically prove that it matched the specification - however, then its important to remember that the proof only says that the code matched the specification not that the specification matched the real world, so all it really does is shift the complexity and scope for errors to the specification.

      Thing is, for networking, those tests need to be right there in the code. Any data coming in off the web needs to be treated like a TSA officer treats a hippie in a 'Legalise Dope' T-shirt. Simple code review shows that OpenSSL wasn't doing that.

      --
      In a survey of 100 programmers, 111111 thought that duck-typing was a good idea.
    3. Re:Unit Tests are Not Optional Anymore by Anonymous Coward · · Score: 0

      Every possible type or class of input must be tested.

      How do you know each type?

      What if your bug occurs if one parameter is 37? How do you know in advance that this is a different type to be tested?

    4. Re:Unit Tests are Not Optional Anymore by CodeBuster · · Score: 1

      Unit testing would only have caught this if someone had thought to test for an invalid payload length in the incoming request.

      Sounds like a good test to me. The length of the payload was an input in this case and it should have been asserted against the true length of the buffer in a test.

      Thing is, for networking, those tests need to be right there in the code. Any data coming in off the web needs to be treated like a TSA officer treats a hippie in a 'Legalise Dope' T-shirt.

      That is yet another reason why we separate concerns in our code, so that we can plug in mocks and stubs as needed to simulate inputs into or outputs from a module of code. This enables unit testing, but it also leads to better organized and more clearly written code that accurately and concisely expresses the intent of the module. The existence of unit tests is a necessary, although not a sufficient, condition for good code.

      Simple code review shows that OpenSSL wasn't doing that.

      In hindsight yes but this code was reviewed (supposedly) and this was missed. Code review alone is not enough, you must prove it with tests.

    5. Re:Unit Tests are Not Optional Anymore by CodeBuster · · Score: 1

      How do you know each type?

      You refuse to accept types that you cannot identify at runtime or you use a type safe language. Accepting void pointers or the like is just asking for trouble.

      What if your bug occurs if one parameter is 37? How do you know in advance that this is a different type to be tested?

      Then you test for that. You wrote the code for a specific reason and purpose, right? Well, then you ought to be able to prove that with tests. Knowing what tests you need and how to write them is itself a skill and a worthwhile one at that.

    6. Re:Unit Tests are Not Optional Anymore by CodeBuster · · Score: 1

      Nope. It's a waste of time.

      Compared to what? Updating the firmware on millions of production routers and servers because a critical flaw made it into production? Paying out claims against the company that resulted from security breaches associated with the bug? Going back, after the code has already been designed, written and deployed to fix a bug that would have been tens of thousands of times cheaper to fix had it been caught instead by unit tests well before release? Testing has a cost, yes, but gambling that your code will get by without it can wind up costing you more than you'd ever imagined was possible. How would you feel about driving a car with software written according to that philosophy or banking software that get's it mostly right but every once in a while zeros out your balance for some strange reasons?

  44. Re:Well, his software career's ruined by x0ra · · Score: 1

    These kind of mistake are done everyday by pretty much every programmer. Nobody test 100% of the assertions made in their code, or are aware of ALL the subtle way bugs can happen.

  45. Re:Open source failed by reikae · · Score: 1

    Exactly. See this site for more information on enterprise-level quality :-)

  46. Re:Open source failed by mcfedr · · Score: 1

    Great, buy some closed source software, and you will have no idea when such a bug is found, at least here once it was found, everybody knew, and a fix was made available quickly, no attempt to cover it up or pass it off as nothing important

  47. This has damaged my faith in Open Source by TheMathemagician · · Score: 1

    Most of the Open Source code I've seen has been high quality and I assumed such a high-profile project as OpenSSL would be the same. Having dug out the code myself when this blew up I was shocked at how ropey it is. Magic numbers everywhere, memory handled in a cavalier way, no clear structure. Now I feel bad defending Open Source against FUD shills because I know they can whip out this example.

  48. Welcome to Technology. Shit happens. by PainBreak · · Score: 1

    Nobody cares, and if they do, they don't understand.

  49. given enough eyeballs, all code is shallow by weberjn · · Score: 1

    There are more bad guys looking for security flaws than good guys doing code review. So, either code review must be done by computers (I don't know how) or the system must make less errors possible. Will we have to write all system software in Java or Ada?

  50. Not true at all by aaaaaaargh! · · Score: 1

    You're right that skills are very important, of course, but the language matters a lot. OpenSSL would have far less bugs if it had been written in Ada with critical sections in Spark and some formal validation, for example.

    There is no perfect programming language for all purposes and languages are more or less suited for different purposes. Beware the language aficionado who has an excuse for every deficiency of his favorite language ...

    1. Re:Not true at all by gweihir · · Score: 5, Insightful

      OpenSSL would be meaningless and not in use if it had been written in ADA. Also, ADA is not at all the "magic bullet" some people make it out to be. In fact, it suffers from unreadable code even more than clean C code. Also remember that this is a library. Unless ADA allows creating libraries with "C" bindings in ADA, it is not even usable for the task. And if you invest the same time on the C side, you get a similar level of quality. Hell, this bug would have been found with some halfway competent fuzzing or completely avoided with mandatory time-of-use checking of all bounds. Which secure coding guidelines can make mandatory, unless you explicitly explain in each instance where you omit it why this is ok.

      Sure, languages play an important role, but it always falls back to Assembler-level (or C if you want to be somewhat portable) and there competent people can do all things that imperative languages can do. The problem with most languages is that they restrict too much what you can do and/or foster bloat and/or have intransparent behavior.

      I have done Eiffel, Sather, Python, Lua, Pascal, Modula, Haskell, Gofer, Prolog, Lisp, C++, several assembler variants, Basic, Java, JavaScript, Pizza, and some more things. I am back to doing all "library" level things in C and the glue in Python or Lua (or C where that is not an option). Basically all OO languages suck badly, except Eiffel, which unfortunately it too exotic to be useful. Functional languages are nice and compact for some things, but suffer from interfacing problems. (Will have a look at Erlang though, that may be better.) Logical languages have some value in some specific situations, but do not even approach "general purpose". C++ and Java are bloated, intransparent, non-orthogonal atrocities made by people that do not understand OO. These languages typically make things worse unless you have really experienced and capable people. The typical mediocre-to-bad coders just throw the features of these languages around indiscriminately, resulting in an awful mess. IDEs make that worse as suddenly it becomes easy to write more code and distribute it into even more files.

      Yes, you need discipline, experience and insight to do things well in C. The current OpenSSL disaster shows all three are missing in the OpenSSL team. Yes, many C programmers suffer from a terminal desire to place efficiency above everything else. But that problem is with the programmer, not the language. And you get just the same stupid mistakes in other languages and they add their own problems.

      That is not to say C is a good language. It is (besides assembler) just the only language where code quality rests completely with the coder and that does not stand in the way of the coder. It is the only "native" language if you do not want to do assembler and that gives it a special place and all that cannot work competently with it a clear limitation. At the same time, all approaches to force people to write "good code" by language features and restrictions that force them to do so have failed. There is even bloated, unreadable, unreliable code in Python or Eiffel, and you have to really work at that in these languages.

      After being in this for 30 years and having seen and reviewed countless pieces of code by others, I am convinced that language selection is mostly irrelevant. The only thing language can give you is problems in the form of restrictions. If the coder is not top-notch, the code will suck and be insecure, slow, unreliable and unmaintainable, regardless of the language used. If the coder is top-notch, the code will be secure, fast, reliable and easy to maintain, mostly regardless of language used (within the restrictions the language comes with). However a top-notch coder will know or be able to figure out fast what a specific language can do and what its restrictions are and know early whether it is suitable for a specific project or not.

      Of course, that said, you are right that people that want to do everything in one specific language (often Java these da

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    2. Re:Not true at all by Anonymous Coward · · Score: 0

      A nice apology of the C abomination, General Clapper. I hear you folks really like the Cyber war space created by "competent developers writing in C".

    3. Re:Not true at all by aaaaaaargh! · · Score: 1

      I do somewhat disagree with the "insightful" moderation of your post, but also don't care, because I'm not coming to /. very often. Anyway, I feel the need to make a few corrections, since most of what you write about Ada is misleading:

      1. It's written "Ada" not "ADA" (The language is named after the first name of Ada Lovelace)

      2. Nobody has ever claimed that Ada is a "magic bullet", especially not people who program in Ada. ;-) Ada has its quirks and many annoying features and if you head to comp.lang.ada and ask the (few) people there whether you should use it for project X, they will give you some fairly honest and reasonable assessment - I've seen the answer "not really" come up whenever that makes sense. (Ada seems to be overkill for traditional end-user GUI applications, for example

      3. There is no reason to believe that programming a library in Ada would make it obsolete, as long as a proper interface to C is provided - which is very easy. I readily admit that there are problems with the licensing of the GNAT runtime system, though, as it is GPL or MGPL only.

      4. Ada source code is always more readable than C source code, provided that you know both languages equally well, of course.

      5. Ada can, of course, create libraries with parameter passing conventions compatible with C and callable from C. (To get all benefits of Ada you need a small runtime system, though.)

      6. Programming in Ada does not take more time than programming in C. (Actual measurements have indicated the opposite, but let's not get into such details which are always contestable. Let's just say that both Ada and C are both at the slow side of the range.)

      7. Ada and Spark were merely meant as examples, but ones I know well enough to be sure about the example.

      8. I'm not claiming that C cannot be used safely, but only after an extensive and expensive validation phase (using automatized tools and code review), and for that reason alone it should never be the #1 choice for safety and security critical applications.

      I agree with you that many people who talk about a "safe" language have "managed" languages with automated garbage collection in mind, but that many of these languages are not safe at all, nor is dynamic memory allocation a desirable feature in that context. But 30 years experience or not, your claim that security does not hinge on the choice of language is just not true. The language and its implementation (+compiler test suites and validation) are an important part of the overall security and safety. So are management, validation and testing tools, the skills of the programmers, etc., of course.

    4. Re:Not true at all by gweihir · · Score: 1

      Your point 4 is really complete bullshit and you either have no clue what you are talking about or are lying directly. In any case you are full of shit. Simple proof: Just obfuscate the Ada code and not the C code. And you want to include a _runtime_ environment with a library? Do you even know what a library is and what a catastrophe that would be? Apparently not. The rest of your "insights" is of equally low quality.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    5. Re:Not true at all by Anonymous Coward · · Score: 0

      If the coder is top-notch, the code will be secure, fast, reliable and easy to maintain (...)

      Pick two. Or give me 10+ years to develop a typesetting system.

    6. Re:Not true at all by gweihir · · Score: 1

      No. The missing one is that a top-notch coder will not be cheap.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    7. Re:Not true at all by Anonymous Coward · · Score: 0

      I couldn't agree more. I too coded in lots of languages and paradigms, but abandoned straight 'IT' 20 years ago when C became prevalent.
      My hang-ups about C were: a) it's only meant for writing compilers (Pop-quiz, what did the 'B' in BCPL originally stand for?), b) it's mind-numbingly, fingers-on-chalkboard, ugly - especially when written K&R style.

      Now I'm an old retired fart and tinkering with computers for fun, I'm happy to use C (on micro-controllers and slower ARM processors). Being retired, I don't have to put up with anyone else's shitty code and can re-format stuff to look a bit more Pascal-ish without bruising anyone's feelings.

      Where CPU is no object, I prefer to use Python, or Prolog, or Lua, or whatever fits the purpose.

      In an ideal world, Zorland C would never have been written and we'd all be programming in (Borland) Turbo Pascal variants. And I'd be pouring hot grits down Natalie Portman's pants.

  51. No 'Consideration' by Martin+S. · · Score: 1

    There is no Consideration to the Programmer, so there is no contract and no liability.

    http://en.wikipedia.org/wiki/C...

  52. Disagree: Knapp daneben ist auch voll vorbei by Let's+All+Be+Chinese · · Score: 1

    If he's honest, he'd say exactly that. If he's dishonest, he'd either waffle or again say exactly that. If he's planting for some secret service he'd also say exactly that. Only one of the cases I'd take my hat off for. Worse, this guy made his academic career out of "security" protocols but gets blind-sided by a "honest mistake", and only one casual reviewer didn't spot it either. That really isn't good enough, neither for him nor for the openssl project, or any widely-used security-heavy piece of software.

    Perhaps more importantly, it shows the dangers of poor protocol design. I'm not too versed in the intricacies of this one, but I can't help but wonder why it needed two length fields, and why you even have one if you're not going to check them.

    The trick is to only look at the input once it's assumption-free, ie all necessary assumptions are known and have been checked to hold. That way you don't have to juggle one (or two, or N) length fields and hope you have the right one.

    I think our dear honestly mistaken holder of a PhD in computer security has a bit more soul searching to do. As does the openssl team.

    No, I'm not advocating more layers upon layers of software, I'm advocating better design in protocol and software*, better code review and code acceptance practices, and understanding things like line coding before tinkering with any protocol, much less a security-sensitive one. Like, oh, openssl.

    * There's also Theo's (of TheoBSD fame) observation that openssl bypasses security measures available in certain malloc/free implementations by dint of defaulting on all platforms to their own allocator without such features because on some (other) platforms malloc is "slow". Worse, turning that "feature" off breaks openssl because the team hasn't tested without it. Looks like there's room for improvement with the unit testing practices too.

    1. Re:Disagree: Knapp daneben ist auch voll vorbei by Anonymous Coward · · Score: 0

      > that openssl bypasses security measures available in certain malloc/free implementations

      You forgot the most ironic thing: _exectly_ these malloc/free security measures would have made this bug a non-issue besides making it possible to crash the process with an invalid read.
      Honestly I am seriously shocked that OpenSSL will place secret keys right next to data it will send out to non-trusted clients, _that_ IMHO is far, far more damning to the project as a whole than a single bug, because it means the project as a whole has an attitude that is completely at odds with the role they have.

  53. I would mod this up. by Grog6 · · Score: 1

    If these NSA types actually meant that oath they swore, they'd kill all the other assholes around them violating the law, before the killed themselves.

    The fact no one has yet is a clear indicator of how they view the Constitution.

    --
    Truth isn't Truth - Guliani
  54. Re:Well, his software career's ruined by kyrsjo · · Score: 1

    Exactly - software is complex and sometimes shit happens. An employer who knows anything about code knows that - and he (+ the reviewer) probably won't make the same mistake again.

    In this case, the code is open, so pretty much everyone understands exactly what happens, exactly how bad it is, and how to fix it. If the code wasn't open, the bug could just as well be there, except that it would be less understood, maybe never found (except by exploits), and patched more slowly (or never, or tuesday next month, or when you pay to upgrade to the newest version of the program which includes the buggy library).

  55. The change was logged on New Year's Eve 2011 by EmagGeek · · Score: 1

    Don't drink and code!

    1. Re:The change was logged on New Year's Eve 2011 by x0ra · · Score: 1

      Alcohol might actually be helpful to code productivity.

  56. "slow" malloc()s by Anonymous Coward · · Score: 0

    The only way malloc could completely protect against the bug would be by putting an unmapped guard page after every malloced block - making every malloced block at least one page long and slowing malloc down by the time needed for all those munmaps. (Probably making malloc slow enough to incite OpenSSL devs to implement their own malloc layer...)

    And if someone is willing to make that decision, then the OpenSSL developers should not override it.

    Most malloc()s that have these protections have them as an option which can be toggled (the BSDs certainly do). So this policy should not be overruled, espcially if it can reduce security. It should be left to the sysadmins who run the OS and set the malloc() options, and the trade offs they want.

  57. Where C++ applications interface with C libraries by tepples · · Score: 1

    C++ has bounds-checked containers.

    This is relevant only to the extent that C++ programmers use bounds-checked containers. A lot of C++ programmers have to use bounds-unchecked containers in order to interface with C libraries that use bounds-unchecked containers, and exploits might take advantage of inadvertent undefined behaviors in this interface code.

  58. TDD blah blah blah by Anonymous Coward · · Score: 0

    Except the biggest advocates of TDD seem to be dictating from the ivory tower rather than writing the tests themselves.

    And when they do get stuck writing test code code; their tests are sloppy, poorly maintained, and not up to the standards they expect from everybody else.

  59. Re:Well, his software career's ruined by jones_supa · · Score: 2

    In this case, the code is open, so pretty much everyone understands exactly what happens, exactly how bad it is, and how to fix it.

    Ahem, sir. Open source can be useful, but it is not a magic bullet like that. Even I can read and understand the C code in OpenSSL, but to see the bigger picture and to understand how this particular software actually works and is arranged is completely different story. I bet that in case of OpenSSL, only under 100 people in the world can "understand exactly what happens, exactly how bad it is, and how to fix it".

  60. Re:Open source failed by jones_supa · · Score: 1

    The heartbleed vulnerability existed for years in OpenSSL codebase too. We have no idea if someone exploited before it was finally fixed.

    The point being that we are starting to see that there are no guarantees that serious bugs will be caught quickly in open source software any better than in closed source software.

    Remember also that while the public domain does not see the source for closed software, the company is able to pay for professional code audits which ensures that the code actually gets the eyeballs to go through it very carefully and thoroughly.

  61. Re:Open source failed by mcfedr · · Score: 1

    in the same way any company using open source can pay for a professional code audit

  62. Re:Well, his software career's ruined by kyrsjo · · Score: 1

    For this particular bug, seeing the actual code at least helped me to understand what was going on - and undoubtedly helped many who wrote explanations for it. I don't really need to understand the core crypto-algorithms in OpenSSL's core to understand what happened in this case.

  63. Re:Open source failed by jones_supa · · Score: 1

    Of course, and I hope they do.

  64. No Need for VMs by Anonymous Coward · · Score: 0

    See this invention of mine:

    http://sourceforge.net/p/sappeurcompiler/code-0/HEAD/tree/trunk/

    http://sourceforge.net/p/sappeurcompiler/code-0/HEAD/tree/trunk/doc/manual.pdf?format=raw

    Also, no need for GC and the resulting ugly memory consumption and runtime effects. No need for sluggish VM startup.

    C is indeed a dangerous anti-pattern of engineering. Nobody can do it right - see the HPUX Ping of Death or StuxNet. All based on C artifacts.

    If I had sufficient tine at hand, I would implemt TLS in Sappeur, but alas, I have other responsibilites at this time.

    Frank Gerlach
    Gäufelden
    Germany

  65. Memory Safety a fixed problem by Anonymous Coward · · Score: 0

    Low-level memory safety can be easily achieved using a Pascal-style (on a conceptual, not syntactical level) language with a nice type system.

    See my language Sappeur for an example: http://sourceforge.net/p/sappeurcompiler/code-0/HEAD/tree/trunk/doc/manual.pdf?format=raw

    But that is just a necessary, not a sufficient condition of security. To be 100% secure, you need complete mathematical proof. The L4 OS people of Uni Dresden make this claim for 20k of kernel code.

    Short of complete proofs, it would definitely help to retire C or at least to use it only in exceptional cases. The mafia of C developers will agitate against this, as they always did. Realistically, there is nobody who will be 100% of time be capable of avoiding memory errors. So, C is indeed a dangerous language if written by Homo Sapines. If generated by a kind of compiler, this could be different.

  66. There's only one thing to say to this coder ... by Qbertino · · Score: 2

    Robin Seggelmann, thank you and the entire OpenSSL Team for your contributions to free open source software. Glad we could find a serious security flaw, that you're helping to find out how it happend and that the OpenSSL crew is so fast in coming up with a fix.
    With just about any other development paradigm and folks like MS we'd've waited for weeks for that to happen.

    Carry on with the good work, you guys rock!

    --
    We suffer more in our imagination than in reality. - Seneca
  67. This may be a dumb question, but... by GPS+Pilot · · Score: 1

    The fix has the sum 1 + 2 + 16 hardcoded into it. Twice. Why not speed things up by replacing that with a hardcoded 19? (If the sum has significance to a human reading the code, that could be explained in a comment.)

    --
    That that is is that that that that is not is not.
    1. Re:This may be a dumb question, but... by idontgno · · Score: 1

      Many compilers precalculate arithmetic expressions consisting of constants, replacing them at compile-time with the result value constant.

      I believe the different constants can be deduced from Section 4 of the original RFC proposing the TLS hearbeat message:

      4. Heartbeat Request and Response Messages

      The Heartbeat protocol messages consist of their type and an
      arbitrary payload and padding.

      struct {
      HeartbeatMessageType type;
      uint16 payload_length;
      opaque payload[HeartbeatMessage.payload_length];
      opaque padding[padding_length];
      } HeartbeatMessage;

      The total length of a HeartbeatMessage MUST NOT exceed 2^14 or
      max_fragment_length when negotiated as defined in [RFC6066].

      type: The message type, either heartbeat_request or
      heartbeat_response.

      payload_length: The length of the payload.

      payload: The payload consists of arbitrary content.

      padding: The padding is random content that MUST be ignored by the
      receiver. The length of a HeartbeatMessage is TLSPlaintext.length
      for TLS and DTLSPlaintext.length for DTLS. Furthermore, the
      length of the type field is 1 byte, and the length of the
      payload_length is 2. Therefore, the padding_length is
      TLSPlaintext.length - payload_length - 3 for TLS and
      DTLSPlaintext.length - payload_length - 3 for DTLS. The
      padding_length MUST be at least 16.

      HeartbeatMessageType is a single-byte enumeration (documented in Section 3) and the payload_length is a uint16 (two bytes)... and the packet always requires 16 bytes of padding, so that's the 1, the 2, and the 16.

      --
      Welcome to the Panopticon. Used to be a prison, now it's your home.
  68. One of these days... by GPS+Pilot · · Score: 1

    Programmers make these kinds of mistakes all the time.

    Do you think that one of these days, a mistake like this will have catastrophic consequences?

    If yes, should I lay in a supply of freeze-dried food and shotgun shells?

    --
    That that is is that that that that is not is not.
    1. Re:One of these days... by nctritech · · Score: 1
  69. Re:Open source failed by HeckRuler · · Score: 1

    We have no idea if someone exploited before it was finally fixed.

    hmmmm. So this sort of phenomena only cropped up in the 80's right?
    That's ~30 years ago. Shouldn't we start getting a bunch of retired end-stagers willing to divulge who was doing what with the zero-days in their pocket?

    Death beds are a great place to learn the truth about what happened 30-40 years ago. For some matters, it's the only place you'll learn the truth. The field of computer security is reaching the end-life of their first generation. Where are the memoirs?

  70. overlooked by Anonymous Coward · · Score: 0

    If intelligence agencies where aware of this bug and choose not to report it they, and any politician who knew, should be prosecuted. Because if they knew they consciously exposed their citizens data, financial and personal information to foreign intelligence outfits.

    I'm sure there's some contractor somewhere who uses OpenSSL when communicating or protecting government data so that would be prosecution for treason.

  71. Bloomberg reports NSA using this by Animats · · Score: 1

    Bloomberg reports NSA has been using this exploit for two years. This looks a lot less like an accident now.

  72. I missed validating a variable containing a length by rhyous · · Score: 1

    Being a developer myself, I believe him completely.

    "I missed validating a variable containing a length"

    Developers half the time and floundering in the dark, only understanding one small portion of someone else's code. Years were spent developing the whole, and we usually need one change in one piece. When making changes we simple hope the code compiles. Unit Tests help a ton. It increases our understanding and it assures us that we didn't break anything else.

    If the change is made and the code compiles and unit tests passed, why would anyone be worried?

    This shows that we need more tools that scan code. Can we write a new rule in source code scanners that can detect such a vulnerability and make sure it never happens again?

  73. gurrgel by Anonymous Coward · · Score: 0

    The part that is better is mostly that open source is ... reviewable.

    "And that is probably true; the worst open source code I've seen is much better than the worst proprietary code I've seen."

    Not a good point since most proprietary code is not supposed to be "seen" by most.

    1. Re:gurrgel by Anonymous Coward · · Score: 0

      "And that is probably true; the worst open source code I've seen is much better than the worst proprietary code I've seen."

      Not a good point since most proprietary code is not supposed to be "seen" by most.

      And that excuses the bugs that arise from the bad code... how exactly?

  74. goodwins law... by Anonymous Coward · · Score: 0

    And finally Goodwins' law kicks in. If nothing else works - try and associate opponent with Hitler and/or nazism.

    And also "the winners write history", for second...

  75. paiddudes by Anonymous Coward · · Score: 0

    Wow there sure is lots of paid shills in here, aren't there...?

  76. Re:Whatever you may think i don't make mistakes by Anonymous Coward · · Score: 0

    Mostly because i am not arrogant enough to believe i am up to the task.
    99% of programmers think they are good at what they do.
    It's only when the system allows it, that space shuttles start falling from the sky.
    "Good enough" wasn't even a question that was asked here.
    The problem with most open source is that *I* might be the next guy to fix your code.
    Release early and often is as brain dead as it gets.

  77. Re:Where C++ applications interface with C librari by GigaplexNZ · · Score: 1

    If they're required to interface with existing C libraries, they're going to run into similar unsafe API wrapping regardless of their chosen language. C++ may interface with C libraries more frequently than others, but that doesn't make the "safer" languages immune.

  78. Or... use better tools by DrYak · · Score: 1

    The process of dissolving a big problem into low-level steps as is required by C programming is mentally brutal. You can't just go "I want to save the text that was deleted and restore it when they hit the undo key." You have to translate that into variables, pointers, structs, mallocs, and glue logic.

    Or you could use some tools which abstract away this problems.
    - you could use a high level language where some of this porblems don't exist (e.g.: no pointers, and automatic garbage collection).
    - or you could stay within the C/C++ world and write wrappers that take care to check everything (for example, almost any moderne tool-kit [Qt, Boost, or even default C++'s std++] will define type that are bound checked automatically [QByteArray or std::string] and smart pointers.
    - some of these could even by implemented in plain C.
    (But full implementation might require some Macro-ugliness. GTK+-level of ugliness)

    Done correctly, such tool can automate the taking care of corner cases that can break the system.

    But instead some programmer still decide to use as a simpler syntax for assembler and do everything bare-metal.

    In case of OpenSSL, I'm a bit surprised. It has so many helper functions, but nobody has bothered yet to implement buffers with buffer-size checking safetey.

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
  79. Where are the other apologies? by cwsumner · · Score: 1

    ... His work was reviewed, but the reviewer also missed the error, and it was included in the released version of OpenSSL."

    So where is the apology from the Reviewer? They are just as at-fault as the programmer !
    Not to mention the people in the user companies that checked it...