Slashdot Mirror


Debian Bug Leaves Private SSL/SSH Keys Guessable

SecurityBob writes "Debian package maintainers tend to very often modify the source code of the package they are maintaining so that it better fits into the distribution itself. However, most of the time, their changes are not sent back to upstream for validation, which might cause some tension between upstream developers and Debian packagers. Today, a critical security advisory has been released: a Debian packager modified the source code of OpenSSL back in 2006 so as to remove the seeding of OpenSSL random number generator, which in turns makes cryptographic key material generated on a Debian system guessable. The solution? Upgrade OpenSSL and re-generate all your SSH and SSL keys. This problem not only affects Debian, but also all its derivatives, such as Ubuntu." Reader RichiH also points to Debian's announcement and Ubuntu's announcement.

670 comments

  1. i wondered what was going on by oni · · Score: 0, Offtopic

    I remember installing openSSL on debian long ago and being prompted to type some random text or to move the mouse while the key was generated. More recently, when I installed debian or ubuntu, it just magically generated a key. I guess that was the part that was removed.

    1. Re:i wondered what was going on by Anonymous Coward · · Score: 3, Informative

      This has nothing to do with the vulnerability being discussed here.

    2. Re:i wondered what was going on by Anonymous Coward · · Score: 0, Funny

      This has nothing to do with the vulnerability being discussed here. In other words:

      NUH-UH!!
    3. Re:i wondered what was going on by sumdumass · · Score: 5, Informative

      No, the random text your put in can be random or not. What they were talking about is a number generator that was used or applied to an algorithm that decided the prime of your key in so that the same algorithm wouldn't be used on two machines on the first then second keys. Without the random number generator, you could theoretically guess the algorithm used to generate the key based of the actions of another install and then decipher the key to gain access to whatever it was protecting.

      To simplify and generalize it, if every machine uses X+1*256 to get a 256 bit key equal to 768, then you could reverse that and know X would =2 (3*256=768) and fake the credentials. The random number generator should change that to X+R*256 which make reversing the key harder because you can only solve to X+R=3 now. In practice, it will be a really larger number and a lot different process though. I can't say that I fully understand it but that simplification should show the difference well enough to give an Idea of where the problem is.

    4. Re:i wondered what was going on by oni · · Score: 1

      No, the random text your put in can be random or not.

      Yes, I'm aware of that. I didn't make myself clear. The prompt that used to appear as part of the config process for the openssl package asked you to press a bunch of random keys in order to help seed the random number generator. The prompt was very similar to whats described on this page:

      https://search.thawte.com/support/ssl-digital-certificates/index?page=content&id=SO2632

      which says:
      Generating 1024 bits of randomness:

      Generating 1024 random bits based on measuring the time interval between your keystrokes. Please enter random text on your keyboard.

    5. Re:i wondered what was going on by sumdumass · · Score: 1

      Yes, I'm aware of that. I didn't make myself clear. The prompt that used to appear as part of the config process for the openssl package asked you to press a bunch of random keys in order to help seed the random number generator. The prompt was very similar to whats described on this page:
      Well, the issue isn't the lack of a key for input being physically typed in. The random number generator code actually randomly picks a numbers to add to each key entered whether it was entered by you or supplied by a text file or another character generator or whatever. In theory, you shouldn't be able to get the same key twice by entering the same pass phraze twice even if it was entered at the same speed between key strokes or by a text file somewhere. If it were any different, All I would need to do is guess your pass phraze and I could have your key. So with the applications of the random numbers, the pass phrase becomes obfuscated to an extent randomly when the key is generated. This provides a layer that makes it difficult to discover the entire key using public portions of it.

      This is where the R comes in on the simplified example I gave. X is what you or a text file or whatever inputs, R is what the random number generator creates separate from X and then it is applied to an algorithm like in the X+R*256=key. I guess the most convenient way of illustrating this is where you type a pass phrase into a wireless router and can use the same pass phraze on the wireless clients to generate the same wep key in order for it to access the wireless router's services. With a random number generator applied like with openSSL, you would never get the same keys with the same pass phraze even when reentered on the same device. And of course this does no good if your not familiar with setting up wireless routers but it is the closest and easiest illustration I could think of. Without the random generator code, it would be like using WEP which we know can be broken pretty easily.

      If my memory serves me correct, the random number generator can or does use static input from key presses as well as mouse movements and other activities to create the "randomness". It depends on the how the generator is designed. I think most linux boxes can even take randomness from the PCI bus so playing a music file or transferring a large file between drives or partitions could create it too. But it is important to understand that it will still perform without entering anything into a prompt and using a supplied file or something. That is what I mean by It can be random or not, it should work just the same whether it has been entered manually or from a text file somewhere. You will likely still need some activity to cause the random process, normal processes and stuff will cause it too. It just takes a lot longer then if you were to open a free cell game or a text file and typed stuff into it.
    6. Re:i wondered what was going on by oni · · Score: 1

      If my memory serves me correct, the random number generator can or does use static input from key presses as well as mouse movements and other activities to create the "randomness".

      For the third time, this is what I'm talking about.

      the issue isn't the lack of a key for input being physically typed in

      I know how public key cryptography works.

    7. Re:i wondered what was going on by sumdumass · · Score: 1

      The prompt that used to appear as part of the config process for the openssl package asked you to press a bunch of random keys in order to help seed the random number generator
      This makes it look like your talking about having to type something in in order for the number generator to work- You don't. Your first post made it sound like a pass phrase or a code needed to be typed in but you clarified that in your reply to me. I covered that as well as "it isn't necessary to type anything in for the random number generator process to work". You don't need a box to open in order to get the randomness. It will take cues from other applications and processes and activity on the computer. The typing only speeds up the amount of usable cues that can be used in the process. It wasn't the missing box that was the problem. It is/was that ability to take information to make the process random. If everything was working according to design, simply playing a music CD or solitary or someone accessing your webserver would do the same thing as typing random characters would do except that it would take a little longer depending on the amount of usage the machine sees.

      Opening a text file and typing a report would have the same effect as a box opening for you to press random keys in in case you still want it after installing the fixed code. The lack of that isn't the problem though, it is the inability to use the input from that in processing random numbers that (or any of the other ways it takes cues to generate characters) is.

      And BTW, I didn't intend to make it look like I was attempting to school you. It's just that you aren't the only person reading this and it was an attempt to be as clear as possible with the ability for someone else to correct me if I got something wrong. Don't take my thoroughness as an insult. It wasn't intended to be one.
  2. stupid stupid stupid by spikedvodka · · Score: 5, Insightful

    Who did this? You don't remove the seeding... stupid

    did I mention stupid?

    this is how some of the old video games were "broken" despite using "random" numbers, the seed was always the same... leading to the same sequence of events

    --
    I will not give in to the terrorists. I will not become fearful.
    1. Re:stupid stupid stupid by Omnifarious · · Score: 4, Insightful

      Who did this? You don't remove the seeding... stupid

      That's what I was thinking too. What kind of idiot makes that sort of change?

    2. Re:stupid stupid stupid by penfold69 · · Score: 5, Funny

      That's funny, I use the exact same seed on my luggage.

      --
      Beer Coat: The invisible but warm coat worn when walking home after a booze cruise at 3 in the morning.
    3. Re:stupid stupid stupid by moderatorrater · · Score: 2, Interesting

      I also remember some games being broken because you could save, and if the battle didn't go how you wanted it to, you could reload and try again. Nowadays, games tend to save the generator's seed so that things go the same way.

      The point is that encryption, proper randomization, etc are HARD and prone to a lot of errors. That's why you commit changes upstream, so that the people who did the work in the first place are able to review the change and let you know if you changed something vital to the security.

    4. Re:stupid stupid stupid by John+Meacham · · Score: 1, Interesting

      Interestingly, another source of compromised security is seeding too often.

      http://lists.debian.org/debian-security-announce/2008/msg00152.html

      is an example of a vulnerability caused by seeding the random number generator with the current time right before use.

      --
      http://notanumber.net/
    5. Re:stupid stupid stupid by mikael · · Score: 4, Interesting

      There was a lawsuit story some time ago about a Las Vegas casino vs. a regular punter, over the use of a blackjack game. The punter had found a cabinet unit with a frazzled RNG, so it kept dealing the same sequence of cards every time. The punter managed to memorize the sequence, thus guaranteeing a win every time. Of course, the casino wasn't too happy about this.

      --
      Vintage computer adverts: http://www.vintageadbrowser.com/computers-and-software-ads
    6. Re:stupid stupid stupid by John+Meacham · · Score: 2, Informative
      --
      http://notanumber.net/
    7. Re:stupid stupid stupid by Yvanhoe · · Score: 2, Interesting

      This could be very smart.
      Planting a vulnerability that has gone undiscovered for 2 years and that gave the keys to a lot of SSH servers. Genius !

      --
      The Wise adapts himself to the world. The Fool adapts the world to himself. Therefore, all progress depends on the Fool.
    8. Re:stupid stupid stupid by sumdumass · · Score: 1

      The point is that encryption, proper randomization, etc are HARD and prone to a lot of errors. That's why you commit changes upstream, so that the people who did the work in the first place are able to review the change and let you know if you changed something vital to the security.
      This sort of makes you question the style of changing everything you can in debian. It seems that it is different enough from all the distros and changes that passing something upstream isn't really something they are custom to now. I would hazard to guess that whoever made the change thought it was debian specific and no one else but debian centric distros would be interested in it. This is probably more of a mindset then an act of malice however incorect the decision might have been.
    9. Re:stupid stupid stupid by SiliconEntity · · Score: 5, Informative

      The patch that broke it was checked in by Kurt Roeckx [kroeckx@debian.org]. Don't know if he broke it or if he was just the gatekeeper for checkins. See:

      http://svn.debian.org/viewsvn/pkg-openssl/openssl/trunk/rand/md_rand.c?rev=141&view=diff&r1=141&r2=140&p1=openssl/trunk/rand/md_rand.c&p2=/openssl/trunk/rand/md_rand.c which shows the change that introduced the bug; and its parent node:
      http://svn.debian.org/viewsvn/pkg-openssl/openssl/trunk/rand/?rev=141#dirlist which shows the maintainer responsible.

      From looking at this patch, I think this is what happened. valgrind complained about a rather unusual coding convention in ssleay_rand_bytes. This is a function that returns random data into a buffer. However, before writing into the buffer, it reads from the buffer and incorporates the old contents into the internal random state. valgrind complained about this use of an output buffer for input. Normally you would never want to use potentially uninitialized data like this, but in this case it is OK as all that is being done is the data is being folded into the random state. In the worst case, this can't hurt, and maybe it will help, if the old data had some randomness.

      Anyway, valgrind complained about it, and the maintainer commented out the use of the buffer. That would actually be OK, it is not a big deal. But the implementor made a mistake, and also commented out another similar usage, in a different function, ssleay_rand_add. This was a huge mistake, as the purpose of ssleay_rand_add is to add randomness into the random state. In that function, buf is an INPUT buffer, and adding it into the random state is perfectly legitimate, in fact it is the whole purpose of the function. But apparently because it looked similar to the questionable usage in ssleay_rand_bytes, the maintainer commented out the code in ssleay_rand_add at the same time. (I don't know whether valgrind also complained about this second usage, but if so, it was mistaken. I think it's more likely that the maintainer just got fooled and over-generalized from the valgrind complaint.)

      So the whole thing was an attempt to clean up code and remove warnings, but the fix accidentally broke a crucial piece of functionality, rendering ssleay_rand_add completely non-functional. So any attempt to add randomness into the RNG state, such as for seeding purposes, is ineffective. The random state ends up with much less variability, and therefore all the crypto is weak. As Bruce Schneier points out, bad crypto looks much the same as good crypto, so it took this long to notice it.

      Hats off to the reviewer who picked up on the problem. Don't know who it was, but the same Kurt Roeckx [kroeckx@debian.org] checked in the fix.

    10. Re:stupid stupid stupid by Dekortage · · Score: 4, Funny

      Exactly what I was thinking. But it could be interpreted multiple ways: (a) it was criminals; (b) it was terrorists; (c) it was Microsoft.

      --
      $nice = $webHosting + $domainNames + $sslCerts
    11. Re:stupid stupid stupid by bk2204 · · Score: 5, Informative

      It's not seeding too often that's the problem, it's seeding with predictable data and expecting that data to be random. The time is very predictable, and contains very little entropy (randomness).

      If you seed very often with data containing a lot of entropy (for example, radioactive decay), then there's no problem. It's also not a problem to add the time in the mix if you mark it as having almost no entropy.

    12. Re:stupid stupid stupid by Anonymous Coward · · Score: 0
      It's fairly easy to find out who was responsible for version 0.9.8c-1 of the openssl package in Debian.

      Does Debian have a formal procedure for investigating maintainers who create serious vulnerabilities like this?

      If so, does one of the paths of the investigation involve the police or a lawsuit option?

    13. Re:stupid stupid stupid by Beat+The+Odds · · Score: 2, Insightful

      Interestingly, another source of compromised security is seeding too often. http://lists.debian.org/debian-security-announce/2008/msg00152.html is an example of a vulnerability caused by seeding the random number generator with the current time right before use.

      That's not a case of seeding too often, that's a case of using a crappy seed

    14. Re:stupid stupid stupid by Yvanhoe · · Score: 4, Funny

      How is that mutually exclusive ?

      --
      The Wise adapts himself to the world. The Fool adapts the world to himself. Therefore, all progress depends on the Fool.
    15. Re:stupid stupid stupid by Jesus_666 · · Score: 1

      I also remember some games being broken because you could save, and if the battle didn't go how you wanted it to, you could reload and try again. Nowadays, games tend to save the generator's seed so that things go the same way.
      Actually, that opens new venues of attack: If a certain attack will fail you can try another one. Determinism allows you to generate a very specific plan through trial and error; with enough patience you can abuse this to always achieve perfect results.
      --
      USE HOT GRITS WITH STATUE OF NATALIE PORTMAN (NAKED AND PETRIFIED)
    16. Re:stupid stupid stupid by Anonymous Coward · · Score: 0

      Spaceballs?

    17. Re:stupid stupid stupid by dnoyeb · · Score: 1

      That makes sense. +5

    18. Re:stupid stupid stupid by Jesus_666 · · Score: 1

      Debian should make a new policy: Don't let someone who doesn't exactly know what he's doing muck about in crypto code.

      --
      USE HOT GRITS WITH STATUE OF NATALIE PORTMAN (NAKED AND PETRIFIED)
    19. Re:stupid stupid stupid by Anonymous Coward · · Score: 0

      So it's partially lack of comments in the source that made this bug possible?

    20. Re:stupid stupid stupid by bcat24 · · Score: 1

      It's posts like this that make me wish someone could get modded higher than +5. Thanks for the great summary!

    21. Re:stupid stupid stupid by ivanjager · · Score: 5, Informative
      Wow, that was still a really stupid patch. There was an #ifndef PURIFY there for a reason. It's because the openssl authors knew that line would cause trouble in a memory debuger like Purify or Valgrind. http://en.wikipedia.org/wiki/IBM_Rational_Purify

      Seriously guys, take a few minutes to understand the code before hacking on it. If it was written by a n00b, you need to understand it to make sure they didn't do other stuff wrong. If it was written by someone competent (which is probably the case for openssl), then you need to make sure you're not the one making the mistake. In this case, to make it work with valgrind, the patch should have been to debian/rules, simply changing the way Configure was called.

    22. Re:stupid stupid stupid by Anonymous Coward · · Score: 5, Insightful

      Lesson#1: It's best to not change code you do not understand without getting it reviewed by people who (are supposed to) understand the code.

      Lesson#2: If you write code that deliberately does weird things like wanting to read unitialised memory, PUT A COMMENT so that people other than you have a fighting chance with your code.

    23. Re:stupid stupid stupid by dvice_null · · Score: 1

      > If so, does one of the paths of the investigation involve the police or a lawsuit option?

      I hope not. Being afraid of making mistakes is a very efficient method for stopping progress. I bulieve that the people up there have enough pressures already, considering how many users they are serving. I bulieve it was a mistake that could have been made by anyone. It is always easy to notice the bug after someone points it out.

    24. Re:stupid stupid stupid by Anonymous Coward · · Score: 0

      I believe you are looking for optimal results for that seed. Since it may not be possible using the saved seed to succeed.

    25. Re:stupid stupid stupid by Anonymous Coward · · Score: 0

      At least for packages like openssl that have a huge security impact, I think it's very important to have a serious downside to introducing security holes. If the equation for introducing security holes only has an upside (earning money) and no downside, some maintainers will be drawn in to the dark side and Debian will attract people whose reason for joining is to introduce security holes for earning money. We will see corrupt maintainers earning money from organized crime sources anyway, but we can at least fight it.

      Since Debian maintainers are not stupid, it's less likely that this is indeed a mistake and the saying "never attribute to malice that which can be adequately explained by stupidity" doesn't apply with its usual strength.

      It also seems fairly obvious that this particular bug would have been spotted before it was distributed, had it only been code reviewed. In hindsight, it seems painfully obvious that all trusted code changes ought to be reviewed and signed off by at least two maintainers in addition to the maintainer that suggests the change.

    26. Re:stupid stupid stupid by Anonymous Coward · · Score: 1, Informative

      Looks like Kurt didn't feel quite sure about the patch from the start:

      http://marc.info/?l=openssl-dev&m=114651085826293&w=2

      In a follow-up message, Ulf Möller of OpenSSL approved of the patch. He at least should have known better.

    27. Re:stupid stupid stupid by CrazedWalrus · · Score: 1

      You forgot "spooks"

    28. Re:stupid stupid stupid by marcosdumay · · Score: 1

      "Criminal" and "Microsoft" obviousy aren't exclusve. Now, "terrorist" does never apply to companies, so I guess it excludes "Microsoft".

    29. Re:stupid stupid stupid by CrazedWalrus · · Score: 1

      I understand the knee-jerk reactions that are happening here. People want to see this guy strung up by his toes, never code again, whatever.

      The fact is that in any organization, and more-so for a volunteer one, you absolutely cannot create an inquisition over every mistakes. That's especially true when the person who did it is normally a valuable contributing member of the community.

      FOSS would go downhill pretty quick if someone got crucified for every bug. Every OS has small and large bugs, and they always will because people make mistakes sometimes. Debian may need a new set of rules or procedures following this incident, but certainly suing or calling the police on someone is absolutely the wrong approach. In other words, just chill out, or you'll make matters worse. The answer here is in procedure and policy, not persecution.

    30. Re:stupid stupid stupid by Chris+Burke · · Score: 1

      Will you please quit making up terminology like "output buffer", as if to say that some memory is somehow designated write-only? The buffer is uninitialized , not an "output buffer"... Memory is memory is memory, and valgrind is only checking to see if it's been properly written before.

      The memory is logically designated as write-only, which is why it was not initialized. Program semantics are at least as important as actual memory behavior. Memory is memory is memory is still a broken program if you only intended to write to a buffer, but read from it instead. "Output buffer" is a perfectly valid term for the way in which the program operated and why the buffer was uninitialized.

      --

      The enemies of Democracy are
    31. Re:stupid stupid stupid by penfold69 · · Score: 1

      well done ;)

      --
      Beer Coat: The invisible but warm coat worn when walking home after a booze cruise at 3 in the morning.
    32. Re:stupid stupid stupid by Score+Whore · · Score: 1

      They should make a new policy: Don't let people who think that satisfying the complaints of automated tools for the mere purpose of satisfying automated tools is a good idea.

      If you don't understand what's going on, don't touch it.

    33. Re:stupid stupid stupid by LaskoVortex · · Score: 1

      this is how some of the old video games were "broken" despite using "random" numbers, the seed was always the same... leading to the same sequence of events

      I remember getting a C on my 8th grade science project on this topic back in 1983. In short, I generated 10 random numbers, Power cycled the computer, and then generated 10 more random numbers. Both sets of 10 were identical. I made a poster with a magic marker. It took 20 minutes, tops. I'm glad the community is finally waking up to the importance of this work 25 years later. Maybe they will change my grade.

      --
      Just callin' it like I see it.
    34. Re:stupid stupid stupid by annodomini · · Score: 1

      That's the analysis I came up with as well. Thanks for posting this; it's good to confirm that I wasn't crazy.

    35. Re:stupid stupid stupid by Anonymous Coward · · Score: 0

      the same Kurt Roeckx had to patch the original infamous May/2006 patch , because he put nested comments and md_rand.c didn't compile :

      http://svn.debian.org/viewsvn/pkg-openssl/openssl/trunk/crypto/rand/md_rand.c?rev=173&r1=167&r2=173

      This is the complete revision history of md_rand.c at debian, including the last fix by the same Kurt Roeckx that reads

      "ssleay_rand_add() really needs to call MD_Update() for buf."

      http://svn.debian.org/viewsvn/pkg-openssl/openssl/trunk/crypto/rand/md_rand.c?rev=300&r1=173&view=log

      ooopss .... frightening

      I have to repeat what this paper says:

      " In a narrow sense, the security flaw we found in the Netscape browser serves merely as an anecdote to emphasize the difficulty of generating cryptographically strong random numbers. But there's a broader moral to the story. The security community has painfully learned that small bugs in a security-critical module of a software system can have serious consequences, and that such errors are easy to commit. The only way to catch these mistakes is to expose the source code to scrutiny by security experts.

      Peer review is essential to the development of any secure software. Netscape did not encourage outside auditing or peer review of its software-and that goes against everything the security industry has learned from past mistakes. By extension, without peer review and intense outside scrutiny of Netscape's software at the source-code level, there is simply no way consumers can know where there will be future security problems with Netscape's products. "

      http://www.cs.berkeley.edu/~daw/papers/ddj-netscape.html

      Debian: learn from this !!!

      and Kurt Roeckx, don't touch any code of security packages any more ( and yes, you can't nest comments if you want to build md_rand.c , perhaps you should slow down before pushing the "commit changes" button, at least until debian leaders start to put in place tighter and scrict testing-before-commit policies )

    36. Re:stupid stupid stupid by HeroreV · · Score: 1

      Debian makes tons of needless changes to lots of packages. Many times I have looked into bugs only to learn they were introduced by Debian. (I use Kubuntu.) Probably more than half the bugs I've searched for information about were Debian's fault. They just refuse to leave things alone.

      It's like not-invented-here syndrome, but instead of building new software, they just make all sorts of random changes to existing software so they can feel like its their own.

    37. Re:stupid stupid stupid by speedbiker · · Score: 2, Interesting

      Wow, that was still a really stupid patch. There was an #ifndef PURIFY there for a reason. It's because the openssl authors knew that line would cause trouble in a memory debuger like Purify or Valgrind. http://en.wikipedia.org/wiki/IBM_Rational_Purify
      Actually, Kurt did ask on openssl-dev whether this change is acceptable, and did not get any answer that this would be a no-no (his mail and subsequent answers can be seen here).
    38. Re:stupid stupid stupid by metamatic · · Score: 1

      Seriously guys, take a few minutes to understand the code before hacking on it.

      Seriously, guys, document the code to at least say what the functions are supposed to be doing, before you criticize someone for guessing wrong.
      --
      GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
    39. Re:stupid stupid stupid by jgreen1024 · · Score: 1

      The difference between open source and closed source software: Here's a security flaw, and on Slashdot some guy can analyze what happened and why. If this were Windows with the same problem, Slashdot would be alive with "Go figure, another security flaw in M$, when are they going to learn to write secure software?" Moral of the story: If you are going to have security vulnerabilities, make sure Slashdot readers can analyze the source code!

    40. Re:stupid stupid stupid by moderatorrater · · Score: 1

      You can search for the optimal result, but generally that'll take more retries than the random retry, although you'll be able to optimize the result more fully.

    41. Re:stupid stupid stupid by Jesus_666 · · Score: 1

      Ugh, yeah. Because the phase leader for my project* insisted on "zero CheckStyle warnings" I ended up writing a Java class that has a non-final constant. (For non-Java developers: What was supposed t be a constant was turned into an ordinary variable.)

      The class has a member variable that is supposed to be constant. It's a path to a per-user config file; depending on whether or not the app runs on Windows, the filename is either prefixed with a dot or not.** Defining a constant like that works if you use the ternary operator and the code, while not the prettiest, is quite readable if you don't screw up.

      Enter CheckStyle. CheckStyle immediately issues a warning because the ternary operator is evil and always has to be replaced with an if. Period. Of course that means that the constant (which everyone expects to be there so I can't easily get rid of it) is initialized after declaration, which means it can't be final. Incredibly ugly, but it's better(TM) because CheckStyle Said So.


      Oh, and did I mention that CkeckStyle caused another student to rewrite part of the class for "readability"? One function parses strings like "1 to 5 step 0.2" into sequences of numbers. For some reason the team decided against regular expressions, so it involves crawling through the line using offsets to skip the " to " and the " step " - yup, magic numbers. They're documented. It's not hard to see why we modify the offset by 4 after encountering " to ".

      CheckStyle, however, insists that the magic numbers be turned into constants to make the code more readable. Okay, well-chosen constant names might make the code more intuitive. No problem there. So my colleague chooses the names... STRINGLENGTH1 and STRINGLENGTH2, which tell even less about their use than the raw numbers. Brillant.

      Of course we dropped CheckStyle two weeks later. I'll have to refactor that class when I have the time... But I won't get it because the same person who insisted on "zero CheckStyle warnings" now discovered a tool that applies wonderful metrics to our code. Things like "this method, including the (project-)mandatory JavaDoc comment, is longer than 15 lines, which is bad". Guess which conclusions were drawn.


      Automated code checkers can be wonderful tools, as long as you know when not to listen to them.


      * My university's CS course contains a compulsory two-year group project.
      ** The Java class library does a lot, but it really could use a class that handles per-OS stuff like where config files should go and how they should be called.

      --
      USE HOT GRITS WITH STATUE OF NATALIE PORTMAN (NAKED AND PETRIFIED)
    42. Re:stupid stupid stupid by Kattspya · · Score: 1

      You should take some consolation from the fact that you made a mistake in a thread titled "stupid stupid stupid".

    43. Re:stupid stupid stupid by this+great+guy · · Score: 2, Interesting

      A similar story is described in the book The Art of Intrusion by Kevin Mitnick. Mitnick interviewed someone who claimed to be part of a group of 4 friends who bought a slot machine, reverse engineered the firmware, the game application, the pseudo random number generator, etc. They found a flaw in the PRNG, were able to determine its internal state by watching the cards dealt so far, and were able to develop an algorithm able to predict the outcome of the game.

      Then they built a small portable device to run their algorithm on-site, in casinos using the exact same slot machine model. It is rumored they won a lot of money this way and took enough precautions to never being caught (I guess they spread their attack over a large number of casinos/cities and multiple years).

      Of course the story is anonymized so can't be verified. And it is in Mitnick's interest to have exciting stories in his book. But IMHO the attack looks totally plausible. Game developers usually have no security background, especially regarding how to design a secure PRNG.

    44. Re:stupid stupid stupid by Anonymous Coward · · Score: 0

      AFAIK there is nothing in the C language spec that makes something semantically an "output buffer". Also, the code was written intentionally to read from uninitialized memory. Maybe the code will write to that location at a later point, but, how again is it an "output buffer" rather than something declared as an array somewhere and used in multiple ways?

    45. Re:stupid stupid stupid by canuck57 · · Score: 1

      Exactly what I was thinking. But it could be interpreted multiple ways: (a) it was criminals; (b) it was terrorists; (c) it was Microsoft.

      We should fix that:

      • (a) it was criminals
      • (b) it was terrorists
      • (c) it was Microsoft
      • (d) NSA to have a back door like _NSAKEY
      • (e) Any combination of above
    46. Re:stupid stupid stupid by LizardKing · · Score: 1

      Checkstyle and PMD (which is what the new tool you mention probably is) are configurable - I turn the warnings about the ternary operator off for example. Having a "zero Checkstyle warnings" policy is daft, as static code analysis tools are a good way of potentially bad code, not an indication that something absolutely must be changed.

    47. Re:stupid stupid stupid by Chris+Burke · · Score: 1

      AFAIK there is nothing in the C language spec that makes something semantically an "output buffer".

      There's also nothing in the C language spec that makes a heap buffer semantically a "stack", "queue", or anything else that is solely a function of how it was manipulated. There's no way to specify whether an integer variable is a loop counter, an accumulator, or a saturating event counter. Much of the high-level structure of how a program is supposed to work isn't "semantically" explicit, it's implicit in the lower-level operations that are performed.

      Also, the code was written intentionally to read from uninitialized memory. Maybe the code will write to that location at a later point, but, how again is it an "output buffer" rather than something declared as an array somewhere and used in multiple ways?

      Well the whole point here is that a bug was introduced by the person reading the code interpreting it differently from how the original author intended. For the purposes of that post, it was a good description that explained the problem well. You can pick nits if you want, but it serves no illuminating purpose.

      --

      The enemies of Democracy are
    48. Re:stupid stupid stupid by Jesus_666 · · Score: 1

      Luckily this time I have the backing of other students to push for a more liberal interpretation of the warnings - for example we ignore metrics like "too many method calls" in shorter methods. Of course some warnings are to be heeded (a method with a cyclomatic complexity of 18 is most likely suboptimal), but I'll make sure we don't blindly follow a "not everything is perfect accrding to this tool, so change it" approach again.

      By the way, I configured EclipseMetrics (the metrics tool we use) to ignore comments, empty lines and JavaDoc as soon as the installation was finished. Getting told that a function is too long because it's properly documented and readable is annoying.

      --
      USE HOT GRITS WITH STATUE OF NATALIE PORTMAN (NAKED AND PETRIFIED)
    49. Re:stupid stupid stupid by flink · · Score: 1

      Enter CheckStyle. CheckStyle immediately issues a warning because the ternary operator is evil and always has to be replaced with an if. Period. Of course that means that the constant (which everyone expects to be there so I can't easily get rid of it) is initialized after declaration, which means it can't be final.
      While I agree that banning the ternary operator out of hand is stupid, the cleanest way to handle conditional initialization of a final constant is to use a static initialization block. What are you going to do if the variable can take on more than two possible values? Nested ternary operators? Ick.

      Example:

      public static final CONF_PATH;
      static
      {
        String os = System.getProperty( "os.name" );
        String tmp_path = "my-file.conf";
       
        if( os == null ) { os == ""; }
        os = os.toLowerCase();
       
        if( os.indexOf( "windows" ) > -1 )
        {
      //IRL you would get %APPDATA% from environment, if possible.
          tmp_path = "D:\\Documents and Settings\\my-file.conf";
        }
        else if( os.indexOf( "mac os x" ) > -1 )
        {
          tmp_path = "~/Library/Application Support/my application/my-file.conf";
        }
        else if( os.indexOf( "unix" ) > -1 )
        {
          tmp_path = "~/.my-file.conf";
        }
      //other os cases....
       
        CONF_PATH = tmp_path;
      }
    50. Re:stupid stupid stupid by VGPowerlord · · Score: 1

      1 2 3 4 5
      Everyone in the car, so come on
      lets ride. To...

      Wait, wrong reference.

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
    51. Re:stupid stupid stupid by Anonymous Coward · · Score: 0

      If he had to guess, then he shouldn't have changed it.

      Looking at what happened this is what it looks like went down. Some program that checks code had a problem with one line of code, which he took a reasonable guess at what it did before commenting it out. This was actually OK.

      What wasn't OK was he also commented out a line of code that looked similar in a completely different place without even looking into what it did in that context. He just assumed it was for the purpose because it looked the same, he was wrong.

    52. Re:stupid stupid stupid by syousef · · Score: 1

      The patch that broke it was checked in by Kurt Roeckx [kroeckx@debian.org].

      a.k.a. Mr Unemployable.
      a.k.a. MUD

      Seriously I wonder what the employment consequences for making such a high profile mistake on an open source project are.

      --
      These posts express my own personal views, not those of my employer
    53. Re:stupid stupid stupid by Anonymous Coward · · Score: 0

      #1: He did ask the openssl ML about it

      #2: using uninitialized memory is always a verry bad idea

      At best it adds some weak entropy. At worst it allows attackers to injekt specifically generated data into the PRNG to make it vulnerable. Think md5 prefix attack. A vulnerability like that would allow someone to make the PRNG to always produce the same (or less random) sequence.

    54. Re:stupid stupid stupid by Eivind · · Score: 1

      Lesson #3: If the code you are hacking is the SECRET-KEY-GENERATOR for a piece of code that is CRITICAl to the security of a system, and normally network-exposed, apply lesson #1 and Lesson #2 in TRIPLE dosis.

    55. Re:stupid stupid stupid by Antique+Geekmeister · · Score: 1

      Excellent points: you've just described why it takes me twice as long to write things as many of my peers. It's because I try to insert comments and explaiin oddnesses. This leads to particular fun when someone else cuts and paste my code, with the comments, and fails to read them where they posted the code. It does make my debugging of their work a lot easier: it seems well worth the time.

    56. Re:stupid stupid stupid by Jesus_666 · · Score: 1

      Ah. Didn't run across that before, not even in the introductory courses that were supposed to teach me stuff like that. The ternary operator would have sufficed in our case, though, as parts of our software stack* assume a Unix-compatible environment and Windows support is just there so our Win-bound developers can work with most of the code. The OS X users (of which I am one) don't mind using ~/.foo.properties.

      I will replace the current initialization routine with a static block, though. Much cleaner than what we currently have.


      * It involves no less than four different languages (Java 1.5, Ruby, lex, C) for the core functionality. Ouch. On the other hand, the external Ruby preprocessing tool saved a lot of development time and lex/C is faster than comparable functionality implemented in Java.

      --
      USE HOT GRITS WITH STATUE OF NATALIE PORTMAN (NAKED AND PETRIFIED)
    57. Re:stupid stupid stupid by Anonymous Coward · · Score: 1

      And if you read the thread, he was given the right answer: build with -DPURIFY and all problems will be solved.

      He then ignored the response and broke it anyway.

    58. Re:stupid stupid stupid by jgrahn · · Score: 1

      Debian makes tons of needless changes to lots of packages. Many times I have looked into bugs only to learn they were introduced by Debian. (I use Kubuntu.) Probably more than half the bugs I've searched for information about were Debian's fault. They just refuse to leave things alone.

      It's like not-invented-here syndrome, but instead of building new software, they just make all sorts of random changes to existing software so they can feel like its their own.

      And you are saying Debian are special in this way? That RedHat, Novell (or whatever the commercial ones are called; I have lost track) don't? That the *BSDs don't? That the commercial Unices don't?

      As far as I know, all of them apply their own patches (or others' patches) when they feel it's useful. The question is if you trust them to do it decently well, and in a way which suits you. For example, I agree with Debian's policy on writing man pages when the upstream didn't bother to do it.

    59. Re:stupid stupid stupid by HeroreV · · Score: 1

      I don't know how Debian's actions compare to other distributions.

    60. Re:stupid stupid stupid by (Score.5,+Interestin · · Score: 1

      And if you read the thread, he was given the right answer: build with -DPURIFY and all problems will be solved. It's not quite that simple, he was using Valgrind but the response was to use a Purify-specific tweak to the build. It's a bit like reporting a bug with gcc and being told a Visual C++ option to change in response.
    61. Re:stupid stupid stupid by (Score.5,+Interestin · · Score: 1

      I don't know how Debian's actions compare to other distributions. Debian seems to be particularly bad in this regard, vastly more so than any other distro. Especially annoying are the gratuitous changes they make based on obscure Debian religious dogma that you need to be smoking three different types of crack to grasp, they're changes made not for any good technical reason but because "our religion dictates that we do it this way and not that way".
    62. Re:stupid stupid stupid by Anonymous Coward · · Score: 0

      meh.. here's the entire extent to which openssl-dev went to ensure he didn't do this:

      "There's your first clue, build with -DPURIFY :-)

      Cheers,
      Geoff"

      not a single openssl-dev person told him that if he removed the second line, the PRNG would be crippled.

    63. Re:stupid stupid stupid by Anonymous Coward · · Score: 0

      Let me guess, you're the idiot who submitted the patch to Debian?

      He was told to set a build configuration option (that just happened to be named after a different code checker) in order to work around problems with code checkers in general.

      It would be like someone porting OpenSSL to, say, Sparc64 (a 64-bit CPU) and running into some problem and being told to just use -DAMD64 because it enables 64-bit support. Just because the name isn't EXACTLY right doesn't mean it didn't solve the problem.

      He was told exactly how to solve the problem without breaking things because people had already run into the problem, and then completely ignored the answer.

    64. Re:stupid stupid stupid by Anonymous Coward · · Score: 0

      "He did ask the openssl ML about it"

      He didn't *ask*. He said some general thing (but didn't include patch), and got some vague responses. Hardly enough for such a critical package.

      "using uninitialized memory is always a verry bad idea"

      It's a bad idea to *rely* on uninitialized memory, but it's not a bad idea to use it. OpenSSL has some other methods for getting entropy, and it uses this to *enhance* the entropy it already got.

  3. Updated advisory from Ubuntu by Anonymous Coward · · Score: 5, Informative

    Ubuntu got an updated advisory at http://www.ubuntu.com/usn/usn-612-2

    1. Re:Updated advisory from Ubuntu by Anonymous Coward · · Score: 0

      For once they make it clear in this announcements that it comes from debian.

    2. Re:Updated advisory from Ubuntu by Anonymous Coward · · Score: 5, Informative
    3. Re:Updated advisory from Ubuntu by Hel+Toupee · · Score: 1

      Updates appeared in update manager a little bit ago, and work precisely as expected. Ubuntu 8.04 x64 here.

      --
      PERL:
      All of the power of Voodoo with most of the understandibility!
    4. Re:Updated advisory from Ubuntu by this+great+guy · · Score: 2, Informative

      Actually Ubuntu released 3 advisories for this vuln, because the vulnerable code is included in 3 packages. Their permanent links are: OpenSSL, OpenSSH and OpenVPN.

  4. Many eyes make all bugs shallow by Anonymous Coward · · Score: 0, Interesting

    And we were told this sort of bug could NEVER happen in an open source operating system. Seriously, this is a major cockup.

    1. Re:Many eyes make all bugs shallow by sterwill · · Score: 2, Insightful

      Who told you that? Why did you believe it? Please cite your sources.

    2. Re:Many eyes make all bugs shallow by n0dna · · Score: 3, Interesting

      http://en.wikipedia.org/wiki/Linus's_law

      I understand he's not unheard of in this arena.

    3. Re:Many eyes make all bugs shallow by Anonymous Coward · · Score: 0

      Here is the main one, the loudest.

    4. Re:Many eyes make all bugs shallow by sterwill · · Score: 1

      My second question was the more important one. Any answer?

    5. Re:Many eyes make all bugs shallow by Yetihehe · · Score: 1

      The rule was formulated and named by Eric S. Raymond in his essay "The Cathedral and the Bazaar". It was not very hard to find after wikipedia article.

      --
      Extreme Programming - Redundant Array of Inexpensive Developers
    6. Re:Many eyes make all bugs shallow by Yetihehe · · Score: 1

      Hmm, I misread your question. Actually many eyes DO make bugs shallow. If this is not true, why bother with peer review in scientific journals? That there is a bug in a code doesn't mean it's harder for bugs to slip through. It's harder, but not impossible. Show me some big bug-free code written by one programmer and not checked by anyone else.

      --
      Extreme Programming - Redundant Array of Inexpensive Developers
    7. Re:Many eyes make all bugs shallow by HappySmileMan · · Score: 1

      "Given a large enough beta-tester and co-developer base, almost every problem will be characterized quickly and the fix will be obvious to someone."

      First of all, this was Debian doing it and not releasing their patches upstream, that debatebly cancels out the large enough co-developer bases.

      It also uses the word "Almost"... maybe you misread it as "Always"? otherwise there's NO way you could claim that it in any way implies something could "NEVER" happen.

    8. Re:Many eyes make all bugs shallow by Score+Whore · · Score: 1

      The "many eyes make bugs shallow" statement shows a lack of understanding of the nature of the problem. Using your corollary of peer review, the purpose isn't to get a lot of eyeballs looking at the article but to get knowledgeable experts to consider the article. The same applies to code. If your reviewers don't understand the code, their eyeballs are worthless.

      One area where your comparison falls down is that in peer review there is a certain accountability that the peer review is actually happening. In open source code, you don't know that anyone is actually reviewing the source. Unless you can point at someone who has substantial incentive to do the code review, then it didn't happen.

    9. Re:Many eyes make all bugs shallow by LaskoVortex · · Score: 1

      And we were told this sort of bug could NEVER happen in an open source operating system.

      And when was the last time you certified that such things have not been part of your favorite closed source operating system for the last 20 years? Please provide the code for your favorite closed source operating system's RNG. I'm sure you feel very comfortable with the security of that code since you can review it and make sure the RNG is air tight and seeded properly.

      Still waiting on that code...

      --
      Just callin' it like I see it.
    10. Re:Many eyes make all bugs shallow by rantingkitten · · Score: 1

      You sure? I seem to recall this being shoved in my face on every Debian install I've ever done. The default motd. "Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law."

      --
      mirrorshades radio -- darkwave, industrial, futurepop, ebm.
    11. Re:Many eyes make all bugs shallow by Yetihehe · · Score: 1

      Sure, if you say "Many blind eyes make bugs shallow" it will not hold. The premise of this statement is that there ARE some eyes which are actually watching.

      --
      Extreme Programming - Redundant Array of Inexpensive Developers
  5. The big question is.. by Idaho · · Score: 4, Insightful

    whether this can possibly be claimed to be an accident *dons tinfoil hat*.

    But seriously, removing the code that seeds a random number generator? I can hardly imagine making such a change by accident. I may just lack a sufficiently colorful imagination, though.

    (or, before resorting to conspiracy theories, we should probably ask ourselves first, "can this possibly be explained by simple stupidity?"

    --
    Every expression is true, for a given value of 'true'
    1. Re:The big question is.. by rhavenn · · Score: 2, Insightful

      (or, before resorting to conspiracy theories, we should probably ask ourselves first, "can this possibly be explained by simple stupidity?" Very easily. Some coder who didn't understand what he was doing and couldn't figure out the code decided to just remove it.
    2. Re:The big question is.. by Anonymous Coward · · Score: 2, Interesting

      What business do they have going that deep within the code? I can understand modifying certain things to make the system more integrated (such as modifying the locations of files), but *WHY* on earth would you fuck around with the cryptographic algorithm? Stupid, stupid, stupid! And I'm not even totally opposed to the idea that this was intentionally done, either.

      This is going to make me seriously reconsider using Debian in the future. I always thought the OpenBSD guys were assholes. Now they're laughing at us.

    3. Re:The big question is.. by sciencewhiz · · Score: 5, Informative

      It was reading from initialized memory to for the seed value, leading to valgrind warnings. See the original Debian bug report: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=363516

    4. Re:The big question is.. by mikael · · Score: 1

      I can imagine the packager thinking, "Why would a encryption software module need the user to swizzle the mouse around a bit? Must be a piece of test code - I'll #ifdef it out, and if anyone complains, I'll remove the #ifdef's again."

      --
      Vintage computer adverts: http://www.vintageadbrowser.com/computers-and-software-ads
    5. Re:The big question is.. by Anonymous Coward · · Score: 2, Insightful

      If it was reading from "un"initialized memory, then OpenSSH was "crusin' for a bruisin'" as my father would say. How long before some OS decides "hey, to prevent process B from 'inheriting' key material, passwords, and other random goodies from process A simply by alloc()ing the space process A used to take up, let's zero out the block of memory that we allocate for each process"? A seed of nothing but zeros, every single time!

      If the memory was initialized, then it wouldn't be an issue for valgrind, and the seed would still be whatever the memory had been initialized to.

    6. Re:The big question is.. by gowen · · Score: 2, Informative

      And the ridiculous thing is, in that thread you quote, at least one person is telling the maintainer that they've done a seriously wrong thing, but the Debian OpenSSL maintainer would rather mindlessly eliminate the valgrind warnings than actually think about the reasons for those warnings.

      (Oh, and you meant "UNinitialized" memory.)

      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
    7. Re:The big question is.. by Anonymous Coward · · Score: 0

      unfortunately, the same instruction

      MD_Update(&m,buf,j);

      was used in the (unrelated) function ssleay_rand_add( ) and got commented out too.
      which lead to the missing seed. sice it is the only instruction in ssleay_rand_add that evaluates the content of buf (which is the seed).

      it is total unbelivable that this patch could ever pass a review. it is also total unbelivable
      that the code was touched in the first place (the problem mentioned above could be solved by simply switching on -DPURIFY in CFLAGS).

      since debian has an ugly history of not submitting patches upstream one can only hope this incedent teaches some people a lesson.

    8. Re:The big question is.. by Culture20 · · Score: 1

      But what C coder doesn't understand the difference between using a randomized (from HID input) seed and a static seed?

    9. Re:The big question is.. by Goaway · · Score: 4, Informative

      Apparently, OpenSSL was using uninitialized memory as a source of randomness. This made valgrind complain about the program, and some enterprising programmer decided to fix it by clearing the memory before use.

    10. Re:The big question is.. by Goaway · · Score: 1

      I'm pretty sure it was getting the memory off the stack, not the heap. OSes already do what you suggest when you allocate memory on the heap that was used by another process.

    11. Re:The big question is.. by pavon · · Score: 1, Insightful

      This is just strange. From the bug report it sounds like the only thing they did was remove the code which read into uninitialized memory, and fed the value into the random number generator. If this really was the only seed used by the RNG that seems like a pretty poor design decision on the part of OpenSSL developers to begin with.

      On the other hand it is possible that the Debian maintainer didn't understand what he was doing, and his changes did more than remove that read into uninitialized memory. In either case it I can't imagine why someone would modify a RNG or any other cryptographic code without checking with the original author first before distributing it. That is just unacceptable.

    12. Re:The big question is.. by IkeTo · · Score: 4, Informative

      I think the problem is not the removal of the use of uninitialized memory as source of randomness. Instead it is the wrong way it is done, removing nearly all sources of randomness as a result. By the way, the fixed package still don't use the uninitialized memory as source of randomness.

    13. Re:The big question is.. by Goaway · · Score: 1

      Yes, I looked closer at the patches, and you're right. There was a suggested patch to clear the memory before use, which was rejected.

      That would have been dumb, but not catastrophic, like what they finally did was.

    14. Re:The big question is.. by Anonymous Coward · · Score: 0

      I'm pretty sure it was getting the memory off the stack, not the heap. Actually, judging by what they get out, I'd say they were getting it from the steaming pile.
    15. Re:The big question is.. by hasdikarlsam · · Score: 1

      This may be an incredibly obvious "yes", but..

      Is *that* bug fixed now? Upstream, even?

    16. Re:The big question is.. by Anonymous Coward · · Score: 0

      The patch in #363516 zeroes out the buffer before before random data is read into it, thus eliminating (some of the) valgrind warnings without introducing a security hole.

      It is not the change that Debian actually committed, which was to not read the buffer at all (after filling it with random data). Ben Laurie's article (http://www.links.org/?p=327) links to the change actually made.

    17. Re:The big question is.. by Skewray · · Score: 1, Flamebait

      The packager who did this was completely correct to do so. Reading uninitialized memory is evil. If the routine doing the reading has been called ReadUnitializedMemoryAsASourceOfRandomness(), the problem never would have happened. Everyone is blaming the packager, but it is the idiot who wrote the seeder in the first place who is to blame. Stupid cutesy tricks have no place in something supposed to be 'secure.'

    18. Re:The big question is.. by Anonymous Coward · · Score: 0

      I thought the big deal with Opensource was that stuff like that was supposed to be discovered?

      It only took two years to notice by someone who wanted to fix the problem, how long did it take to notice for someone who wanted to exploit it, if possible?

    19. Re:The big question is.. by 0xABADC0DA · · Score: 3, Insightful

      Actually it looks like valgrind was just confused about whether the buffer was initialized. The openssl code for the edg swaps a pointer to be an uninitialized buffer right before calling read with it... maybe this kind of code confused valgrind.

      It isn't easy to find where the function they changed is actually called... it gets added to an array of function pointers and then a static variable is set to it, and then there are various macros that can obtain it. I can see how valgrind could be confused, but in any case there is a function that takes a buffer and adds it as randomness and they nuked it. They totally screwed up because they assumed that valgrind was perfect at figuring out what memory was initialized.

      There is no simple excuse like 'it was uninitialized wanyway', the debian openssl team just blew it, big time.

    20. Re:The big question is.. by sciencewhiz · · Score: 1

      The bug was in a patch that Debian/Ubuntu applied to the upstream source. There is no problem upstream.

      Both Debian and Ubuntu have released fixed packages.

    21. Re:The big question is.. by hasdikarlsam · · Score: 1

      "Apparently, OpenSSL was using uninitialized memory as a source of randomness."

      No, *this* bug. Nothing should ever depend on the value of uninitialized memory, and if clearing it produced a security flaw then there was one there already. Unless it was actually cleared after being filled from /dev/random or something, but then there shouldn't have been a valgrind warning in the first place.

    22. Re:The big question is.. by xtronics · · Score: 1

      I was thinking the same thing. If randomness is needed, getting it reliably from garbage left in memory is a REALLY_BAD_IDEA! Either it is needed or it isn't!

    23. Re:The big question is.. by Anonymous Coward · · Score: 0

      OpenSSL NEVER used uninitialized memory for randomness. The code Valgrind complained about was a loop which XOR'd random data into a buffer. OpenSSL never bothered to memset() the buffer because it was useless work, except they overestimated the intelligence of overzealous package maintainers, and thus the trouble it would cause people.

      Sometime in 2005 or 2006 OpenSSL added #ifdef'd code to call memset() when compiled with debugging enabled (specifically because of the Valgrind complaints). I'm curious whether this was added before or after this maintainer's "fix".

    24. Re:The big question is.. by Chandon+Seldon · · Score: 1

      Wow. You're so wrong it isn't even funny.

      The packager absolutely should have challenged the OpenSSH developers over this - and even submitted a patch to fix it - but you don't go making random "clean ups" to secure code that you're about to ship out to millions of users unless you are 100% sure you know what you're doing.

      --
      -- The act of censorship is always worse than whatever is being censored. Always.
    25. Re:The big question is.. by Chandon+Seldon · · Score: 1

      Nothing should ever depend on the value of uninitialized memory

      Great heuristic. Like any such rule of thumb though, there are occasional times when it doesn't apply. It's easy to argue that this is one of them. Adding arbitrary system-dependent data to an XOR / Hash managed random pool has no negative security effects (even if the attacker controls the arbitrary data - this can be proven mathematically), costs no computation time, and potentially provides a security benefit (making any PRNG explot platform dependent).

      --
      -- The act of censorship is always worse than whatever is being censored. Always.
    26. Re:The big question is.. by Rakarra · · Score: 1
      I can imagine the packager thinking, "Why would a encryption software module need the user to swizzle the mouse around a bit? Must be a piece of test code - I'll #ifdef it out, and if anyone complains, I'll remove the #ifdef's again."

      Such checks aren't so hot though, as packages must be built with automated installation in mind, whether it's as part of the system installation or an automated package update. There's blame to go around on both sides; yes, once such a "feature" creeps in you can't just yank it out without repercussions, but the package authors should have found another way to do it in the first place.

      Random numbers are "hard."

    27. Re:The big question is.. by pavon · · Score: 1

      Yeah, it makes a lot more sense after reading SiliconEntity's post. They wrote their routine to be called iteratively - it takes the previous value of a buffer and a random source and combines the two to create a more random value. They didn't bother to initialize the buffer the first time through since it wouldn't hurt to have garbage data in there. The "fix" made it so that the current value of the buffer was never used when getting the next value, so the randomness of the generator was only as good as the last data point from the random source, which was significantly weaker than the original design.

    28. Re:The big question is.. by Goaway · · Score: 2, Informative

      No, *this* bug. Nothing should ever depend on the value of uninitialized memory, and if clearing it produced a security flaw then there was one there already. Unless it was actually cleared after being filled from /dev/random or something, but then there shouldn't have been a valgrind warning in the first place. Uninitialized memory was only being used as an extra source of randomness. There was a compile-time flag to turn this off to make debuggers stop complaining.

      However, Debian didn't use this flag, but instead tried to comment out the code themselves. And they commented out too much, breaking the whole thing completely.
    29. Re:The big question is.. by Goaway · · Score: 1

      That is pretty much completely wrong.

      OpenSSL definitely used uninitialized memory for randomness. This was optional, and there was a flag to turn it off during compilation, because it made valgrind complain.

      However, Debian did not use this flag, but tried to comment the offending lines out themselves. However, they commented out more than they should, and rendered the whole code non-functional.

      Here is the actual patch:

      http://svn.debian.org/viewsvn/pkg-openssl/openssl/trunk/rand/md_rand.c?rev=141&view=diff&r1=141&r2=140&p1=openssl/trunk/rand/md_rand.c&p2=/openssl/trunk/rand/md_rand.c

      Note the lack of memset() or XOR loops.

    30. Re:The big question is.. by Anonymous Coward · · Score: 0

      In other words, the original code had *two* bugs: it didn't use an appropriate source of randomness, and it read uninitialized memory. The original Debian patch fixed the second problem, which masked the first.

    31. Re:The big question is.. by Goaway · · Score: 1

      No.

      Appropriate sources of randomness were used, in addition to uninitialized memory. Debian removed both, it turns out.

    32. Re:The big question is.. by sudog · · Score: 1

      Where are they telling him that what he's doing is seriously wrong?

    33. Re:The big question is.. by MichaelSmith · · Score: 1

      Apparently, OpenSSL was using uninitialized memory as a source of randomness. Sounds bad to me. What if one OS initialises that memory to a known value? You might have an OS specific systematic vulnerability.
    34. Re:The big question is.. by Goaway · · Score: 1

      Please read the other replies to this post, I am getting tired of answering this.

    35. Re:The big question is.. by makomk · · Score: 2, Insightful

      Nope, that's not quite right. Basically, there were two separate bits of code with two nearly-identical lines, one of which stirred in uninitialised data, and another which was used to add actual randomness. The Debian maintainers incorrectly commented out both lines, rather than just the one they needed to.

    36. Re:The big question is.. by jguthrie · · Score: 1

      "Uninitialized" does NOT equate to "random". In fact, my experience suggests that the contents of uninitialized blocks of memory are remarkably consistent given similar execution histories and I believe that using an uninitialized buffer as a "source of randomness" is simply stupid.

    37. Re:The big question is.. by |DeN|niS · · Score: 1

      "Apparently, OpenSSL was using uninitialized memory as a source of randomness.
      Sounds bad to me. What if one OS initialises that memory to a known value? You might have an OS specific systematic vulnerability."

      Will people give this a rest already? Worst case: memory is 100% predictable, entropy is 0, TA-DA, same result as initializing the memory to something before use. Best case: memory is 100% random. Likely typical case, somewhere in between. There are some free extra bits of entropy if you're lucky, and *no loss* if you're not, so it's kept in.

    38. Re:The big question is.. by Goaway · · Score: 1

      It does not hurt to use it as an addition source of randomness.

    39. Re:The big question is.. by Skewray · · Score: 1

      Somehow I don't think that this is what I said. Or meant. Of course the idiot packager should have sent the 'bug fix' upstream. The 'bug' may not have been a bug, was it was very poorly written code if it misled someone.

  6. Re:It will be fixed by gQuigs · · Score: 5, Insightful

    This problem isn't something you can just update your system to fix. This means the basis for all remote authentication on your Debian/Ubuntu machines is compromised until you go and fix it manually.

  7. Ubuntu Gutsy already updated... by psyopper · · Score: 3, Insightful

    Got up this morning, booted the machine and got a software update first thing: OpenSSH (et al) updates for my Ubuntu Gutsy install. Then I show up over here and see why. Presumably Feisty and Hardy got them as well - they are listed on the Ubuntu announcement.

    1. Re:Ubuntu Gutsy already updated... by gumpish · · Score: 1

      Your packages may have been updated, but that doesn't mean your weak keys are.

      Sadly it seems that the tool provided in the Debian mailing list post is only useful for detecting weak keys which are 1024 or 2048 bits. Guess I have to scrap all of mine...

    2. Re:Ubuntu Gutsy already updated... by Omnifarious · · Score: 1

      A simple update is not sufficient to fix the problems caused by this bug.

    3. Re:Ubuntu Gutsy already updated... by Tarlus · · Score: 1

      And yet a quick apt-get update/upgrade on my Debian Etch box reports absolutely nothing in need of an upgrade. Shouldn't the Debian guys be the first to have this fix ready to go in their repository?

      --
      /* No Comment */
    4. Re:Ubuntu Gutsy already updated... by sciencewhiz · · Score: 1

      I updated both of my etch machines 2 hours ago. What's in your /etc/apt/sources.list?

    5. Re:Ubuntu Gutsy already updated... by psyopper · · Score: 1

      No, but replacing bad keys with good ones is now an option...

    6. Re:Ubuntu Gutsy already updated... by psyopper · · Score: 1

      Maybe they're sending it upstream? Or Canonical is worried that their distro's popularity over Debian (no insult intended) means that they should take matters into their own hands and they don't feel that they have the time to wait for something to come downstream. Or the patch is readily available/accessible and they could update their packages to reflect what will be coming from Debian.

    7. Re:Ubuntu Gutsy already updated... by ArcherB · · Score: 1
      I got the same thing with LinuxMint, an Ubuntu based distro. Here is the note I got from MintUpdate:

      Some of the OpenSSH server host keys on this system were generated with a version of OpenSSL that had a broken random number generator. As a result, these host keys are from a well-known set, are subject to brute-force attacks, and must be regenerated.

      Users of this system should be informed of this change, as they will be prompted about the host key change the next time they log in. Use 'ssh-keygen -l -f HOST_KEY_FILE' after the upgrade has changed to print the fingerprints of the new host keys.

      The affected host keys are: /etc/ssh/ssh_host_rsa_key /etc/ssh/ssh_host_dsa_key

      User keys may also be affected by this problem. The 'ssh-vulnkey' command may be used as a partial test for this. See /usr/share/doc/openssh-server/README.compromised-keys.gz for more details.
      --
      There is no "I disagree" mod for a reason. Flamebait, Troll, and Overrated are not substitutes.
    8. Re:Ubuntu Gutsy already updated... by Frosty+Piss · · Score: 0, Troll

      Got up this morning, booted the machine and got a software update first thing: OpenSSH (et al) updates for my Ubuntu Gutsy install. Then I show up over here and see why. Presumably Feisty and Hardy got them as well - they are listed on the Ubuntu announcement.
      Thanks for that wonderful insight. Did you also scratch your balls a stroke the morning wood? Please let us know.
      --
      If you want news from today, you have to come back tomorrow.
    9. Re:Ubuntu Gutsy already updated... by togofspookware · · Score: 1

      I'm no apt-get whiz, but "apt-get dist-upgrade openssl" seemed to do the trick for me.

      --
      Duct tape, XML, democracy: Not doing the job? Use more.
  8. OSS, only as good as the last developer? by MosesJones · · Score: 5, Insightful

    First off I'm a big OSS supporter, yada, yada

    But the point here is that the freedom that OSS gives you does require you to trust the whole distribution chain. In this case there was an added muppet who did something they shouldn't have thus rendering everything downstream insecure. OSS is great but it required great developers, given that it has take well over a year to get the advisory out it shows that the many eyes piece didn't work here, mainly because the eyes were looking at the original source not the botched packaging job.

    The "easy to use" Linux box in the house uses Ubuntu and has this issue and like many people I didn't even think to check that the OpenSSL wasn't the REAL OpenSSL it was OpenSSL with muppet extensions. Maybe there needs to be some form of extension that warns that a package has been modified from its original source code and that the modification was done by "K. Frog" so you can determine whether to trust that package or look back to the source.

    Or some sort of voting system on contributors (how very Web 2.0) so you can see how the people who touched your package were rated with the biggest weighting being given to the last person through the code (hand edited by Linus = 5 stars, hand edited by James Gosling = 5 stars, hand edited by the bloke who wrote clippy = 2 stars, hand edited by a bloke who removed a seed generator = 0 stars).

    Having the code is great, but this makes me want to know much more about who last edited that code.

    --
    An Eye for an Eye will make the whole world blind - Gandhi
    1. Re:OSS, only as good as the last developer? by Anonymous Coward · · Score: 4, Funny

      Or some sort of voting system on contributors (how very Web 2.0) so you can see how the people who touched your package were rated

      I give anyone who touches my package 5 stars!!!

    2. Re:OSS, only as good as the last developer? by cdrguru · · Score: 1

      Yes, FOSS is subject to the "last person that broke it" problem. Unfortunately, the real problem is there are a limited number of people that really understand the code but lots of people that have access to it. Access that, as this proves, can be used to corrupt an otherwise working system.

      The problem with reviewing the last modifier for a package is there is no way to know if that last change interacts with some other package. If this change was actually required for OpenSSL to work with some other (modified) Debian package it would not be possible to know this in advance. At least with the current structure of things. I would say this is where the real problem lies - you can always back out modified packages back to the "original" version as long it doesn't break anything else.

    3. Re:OSS, only as good as the last developer? by maxume · · Score: 1

      How many OpenSSH keys have you generated on that particular box? How many dollars worth of transactions have you done over SSL connections?

      --
      Nerd rage is the funniest rage.
    4. Re:OSS, only as good as the last developer? by peragrin · · Score: 4, Insightful

      Ah so if the same thing happened from MSFT but no one noticed it does that mean closed source is better.

      No software is perfect. when F/OSS screws up everything including the exact versions of the software where the bug began, until it is fixed is known. You know what/where/when/how, and most of the time why it happened.

      With closed source software your considered lucky if you get a patch in a timely fashion.

      Personally i would rather know what happened and when too.

      --
      i thought once I was found, but it was only a dream.
    5. Re:OSS, only as good as the last developer? by hackstraw · · Score: 1

      But the point here is that the freedom that OSS gives you does require you to trust the whole distribution chain.

      Yeah, I just got blind-sided by a Debian developer at a party last week. He knocked me out cold, I can't trust any of them anymore.

      That was sarcasm, dunno why.

      Seriously, this was a BIG silly mistake by someone. Maybe someone was doing some testing and forgot to undo the testing code? I don't know.

      But as far as this being some kind of universal distrust, even the king of trusts like Verisign and Microsoft were dinged when someone was able to get a java development cert that could have done anything. I don't remember the details, but it was very similar to this kind of incident.

      I like debian, and I trust their package people as much or more than any other distro because they do a damn good job with their packages. I have a feeling this was some kind of mistake. I mean, nobody in their right mind would take out the entropy to seed generation to a security package. But for development reasons, sometimes its nice to have consistant seeds for testing (or similar).

      Just in case, I'm pulling my tin foil hat so that its snug on my head.

    6. Re:OSS, only as good as the last developer? by Peter+H.S. · · Score: 1, Interesting

      Having the code is great, but this makes me want to know much more about who last edited that code. The great thing about the rpm package management system on Fedora and Red Hat is, that the source rpms always include the pristine, original sourcecode as provided by upstream. The rpm package of course also include separate patches and a .spec file that shows how the patches should be applied on the fly when the binary package is built.
      So if one didn't like the 'muppet.patch' included, one could always remove it before building the package. Much, much better than delivering a patched tarball.

      --
      Regards
    7. Re:OSS, only as good as the last developer? by Hatta · · Score: 3, Insightful

      It's debian. ALL your packages have been patched for debian. It's pretty much the only thing I don't like about debian, all the patching. You can get the original source, and you can get the patches, but yeah it would be nice if it were a little more transparent.

      --
      Give me Classic Slashdot or give me death!
    8. Re:OSS, only as good as the last developer? by Anonymous Coward · · Score: 0

      *Generally* the Debian source packages include the pristine original source code too.

    9. Re:OSS, only as good as the last developer? by Kjella · · Score: 1

      It's easy enough to do *if* you know you ought to do it, but it doesn't help you one bit to find out. I assume most of the changes debian/ubuntu developers do have some purpose and would rather not try recompiling everything from upstream source.

      --
      Live today, because you never know what tomorrow brings
    10. Re:OSS, only as good as the last developer? by gnuman99 · · Score: 1

      Debian has the original tarball + patch file. But zellots in the project are so nuts these days they will go into the original, strip any non-free stuff they can find (like linux's binary blobs) and ship that as the new tarball. The user doesn't even have a chance to recompile the with non-free bits if they wanted to.

      I find this behaviour total BS from a security standpoint. Fortunately, this is NOT the case with OpenSSL. The original upstream tarball is available without modifications. The error was in the patch that modifies the upstream source.

    11. Re:OSS, only as good as the last developer? by shamer · · Score: 1

      Gentoo emerge / masked package.

    12. Re:OSS, only as good as the last developer? by atomic-penguin · · Score: 3, Insightful

      The great thing about the rpm package management system on Fedora and Red Hat is, that the source rpms always include the pristine, original sourcecode as provided by upstream. Yeah, source debs have that too.
      --
      /^([Ss]ame [Bb]at (time, |channel.)){2}$/
    13. Re:OSS, only as good as the last developer? by Graftweed · · Score: 2, Insightful

      Agreed.

      The parent asked how can we be sure we're using the real OpenSSL? Simple, just use a distro that maintains a policy of minimal interference with upstream code. Slackware comes to mind, and not much else unfortunately.

      Any distro that's liberal about patching upstream code is liable to suffer from security issues, as just exemplified by this story, and also to reduce the value of bug reports to the upstream projects, since they have to go through an extra triage to make sure the bug isn't specific to that distro.

    14. Re:OSS, only as good as the last developer? by caluml · · Score: 1

      even the king of trusts like Verisign and Microsoft Splutter....
      Was that sarcasm too?
    15. Re:OSS, only as good as the last developer? by Carnildo · · Score: 1

      The parent asked how can we be sure we're using the real OpenSSL? Simple, just use a distro that maintains a policy of minimal interference with upstream code. Slackware comes to mind, and not much else unfortunately.


      Gentoo's also pretty good with this. Most packages with extensive modification have a "-vanilla" use flag or a "vanilla" variant with minimal modifications. Further, since it's a source-based distribution, you can modify it to simply not apply any patches before compiling.
      --
      "They redundantly repeated themselves over and over again incessantly without end ad infinitum" -- ibid.
    16. Re:OSS, only as good as the last developer? by b4dc0d3r · · Score: 1

      Or some sort of voting system on contributors (how very Web 2.0) so you can see how the people who touched your package were rated with the biggest weighting being given to the last person through.
      I'm pretty sure Craigslist could help you there.
    17. Re:OSS, only as good as the last developer? by fwarren · · Score: 1
      Maybe there needs to be some form of extension that warns that a package has been modified from its original source code and that the modification was done by "K. Frog" so you can determine whether to trust that package or look back to the source.

      It is already a feature of Slackware. No packages is ever modified. So you end up with all the binary goodness, or badness of the original source of the package.

      --
      vi + /etc over regedit any day of the week.
    18. Re:OSS, only as good as the last developer? by ratboy666 · · Score: 1

      This is exactly why my preference list for distributions is:

      1 - Slackware (unaltered packages, tgz wrapping, no "packaging" to speak of)
      2 - Redhat (Fedora)
      3 - Everybody else

      Redhat slides in at number 2 because they have to security conscious. Fedora squeaks in with Redhat.
      Strange part is my trust of Slackware (the "smallest" distributor) is on par with Redhat (the "biggest"). I trust Patrick to not muck it up; he wouldn't have the time!

      --
      Just another "Cubible(sic) Joe" 2 17 3061
    19. Re:OSS, only as good as the last developer? by Anonymous Coward · · Score: 0

      And how is that different from commercial softwares ? You need just the same to trust the developpers, even more so, because you have no way to check what they've really put inside their soft ...

    20. Re:OSS, only as good as the last developer? by xenocide2 · · Score: 1

      On the contrary when I try to fix bugs in Ubuntu I often find Debian Developers who refuse patches to their packages if they aren't in upstream. This is in spite of the upstream lead author saying things, when asked about a similar bug at a conference in front of a video, "Sure it's ugly, but until you the other guy does the work to change broken software we interact with, we'll do it this way. If you don't like it, fix it the right way yourself." Of course there's also people who don't follow that philosophy as hard; perhaps they feel upstream should focus on long term fixes instead of short term kludges, and so they patch locally but don't push for adoption upstream.

      What I think needs to happen is perhaps realize that distributions do a different kind of work than upstream authors, and tools that allow, perhaps even encourage this is handy. Distributed source systems like git and bzr are great for tracking patches applied in Ubuntu, Debian, Redhat and so-on.

      --
      I Browse at +4 Flamebait

      Open Source Sysadmin

    21. Re:OSS, only as good as the last developer? by narfbot · · Score: 1

      But the point here is that the freedom that OSS gives you does require you to trust the whole distribution chain. In this case there was an added muppet who did something they shouldn't have thus rendering everything downstream insecure. OSS is great but it required great developers, given that it has take well over a year to get the advisory out it shows that the many eyes piece didn't work here, mainly because the eyes were looking at the original source not the botched packaging job. This is actually the number one reason I use slackware. Every package gets built by one guy. And if anything, it's easy to trust one guy. And he happens to be the one with the most experience at making packages. Not only that, his philosophy is to provide pristine packages from its source as far as possible. No worries of changes to these packages except critical bug fixes, and these are usually the kind that go upstream anyway.

      Frankly, I'm not surprised that this occurred in Debian. I have seen how they package before. Usually that have the original source and one giant make-package-debian-centric diff file that would be insanely hard to audit -- correct me if I'm wrong -- at least for anyone outside debian or did not build the package in the first place.
    22. Re:OSS, only as good as the last developer? by matlhDam · · Score: 1

      Or some sort of voting system on contributors (how very Web 2.0) so you can see how the people who touched your package were rated with the biggest weighting being given to the last person through the code (hand edited by Linus = 5 stars, hand edited by James Gosling = 5 stars, hand edited by the bloke who wrote clippy = 2 stars, hand edited by a bloke who removed a seed generator = 0 stars).

      A++++++++ would totally use code again d00d!!!!!!!!!!!1111one
    23. Re:OSS, only as good as the last developer? by flydpnkrtn · · Score: 1

      I for one support these muppet coders of which you speak.

    24. Re:OSS, only as good as the last developer? by Anonymous Coward · · Score: 0

      Hey, another reason for me never to touch Debian again (this, after years of using it) and sticking to FreeBSD ports. It makes it much harder to fuck things up so bad.
      Gosh.

    25. Re:OSS, only as good as the last developer? by Reasonable+Radical · · Score: 0

      I think he was referring to TRUSTS as in antitrust legislation, not trust as in trusted source. At least, I hope so.

    26. Re:OSS, only as good as the last developer? by Anonymous Coward · · Score: 0

      Sure its stupid to knock out code that you dont understand, but:

      the bloke posted his intentions on the openssl-dev list and got the green light from them

      The code wasnt documented...

    27. Re:OSS, only as good as the last developer? by heffrey · · Score: 1

      It's interesting that the collection of geeks and nerds here talk mostly about the technical side of this problem. Yes there's a horrible security flaw and yes it's been patched, albeit somewhat slowly.

      But the parent post seems to me to touch on the real issue and that is the process of software development and packaging. It seems to me that the very nature of the bazaar makes this sort of process failure if not inevitable then very hard to avoid. There are many aspects of security and trust is a key one. Is it really the case that Linux distros are developed in this way? Downstream packagers make changes without getting those changes reviewed by the upstream experts? That is quite astonishing if it is the norm. My trust has just evaporated.

    28. Re:OSS, only as good as the last developer? by Cro+Magnon · · Score: 1

      IIRC, in one version of Slack, there was a package that needed a patch, and instead of patching it like Debian does, it had a seperate patch with instructions on how to apply it.

      --
      Slow down, cowboy! It has been 4 hours since you last posted. You must wait another few hours.
    29. Re:OSS, only as good as the last developer? by David+Jao · · Score: 1

      The great thing about the rpm package management system on Fedora and Red Hat is, that the source rpms always include the pristine, original sourcecode as provided by upstream. Yeah, source debs have that too.

      The problem with source debs is that they aggregate all the patches into a single diff, so you can't easily tell what each individual modification is for. Source rpms on the other hand can (and almost always do) contain multiple patch files, where each individual patch file involves one single conceptual change to the codebase.

      When the patches are separated out into individual diffs, it's much easier to examine them one by one for correctness. I suspect (although we will never really know) that the "one big diff" limitation played a role in allowing this error to slip through the cracks.

    30. Re:OSS, only as good as the last developer? by CompMD · · Score: 1

      MosesJones, thanks to you, the next program I write will have muppet extensions.

  9. Don't we have a built-in utility for this? by Anonymous Coward · · Score: 0

    Why are we not just using /dev/urandom for this, which is already seeded with random data?

    Do we really need to reinvent the square wheel for every cryptographic program?

    1. Re:Don't we have a built-in utility for this? by Goaway · · Score: 1

      OpenSSH is hardly "every cryptography program".

    2. Re:Don't we have a built-in utility for this? by IkeTo · · Score: 1

      It is a problem of OpenSSL, not OpenSSH. The former has a much larger set of applications, including, e.g., telnet-ssl and Apache SSL module.

  10. Of course... by Oxy+the+moron · · Score: 1

    ... this had to be discovered four days *after* I finished setting up my new Ubuntu 8.04 server... *grumble*

    --

    Proudly supporting the Libertarian Party.

    1. Re:Of course... by Anonymous Coward · · Score: 0, Troll

      Yeah, and? What has that got to do with anything? Want some cheese to go with that whine?

      Quit being a cry baby and run 'apt-get upgrade' already. It would have taken you less time than to come in here complain.

    2. Re:Of course... by Oxy+the+moron · · Score: 5, Insightful

      Quit being a cry baby and run 'apt-get upgrade' already. It would have taken you less time than to come in here complain.

      ... and regenerate all the keys, yes? It isn't quite as simple as you suggest...

      "All OpenSSH and X.509 keys generated on such systems must be considered untrustworthy, regardless of the system on which they are used, even after the update has been applied."

      --

      Proudly supporting the Libertarian Party.

    3. Re:Of course... by Anonymous Coward · · Score: 0

      Yes, and rebuy my SSL certificates that had the request originally generated on a Debian machine. This is wonderful.

    4. Re:Of course... by travalas · · Score: 3, Informative

      On ubuntu.... according to the vulnerability description.. Once the update is applied, weak user keys will be automatically rejected where possible (though they cannot be detected in all cases). If you are using such keys for user authentication, they will immediately stop working and will need to be replaced (see step 3). OpenSSH host keys can be automatically regenerated when the OpenSSH security update is applied. The update will prompt for confirmation before taking this step.

    5. Re:Of course... by Builder · · Score: 1

      Oh, and don't forget to pay your certificate provider because the key you used when generating your SSL certificate for your website needs to be re-done as well!

    6. Re:Of course... by cha5on · · Score: 1

      If I'm not mistaken, what they meant was "All OpenSSH and X.509 keys generated prior to the update on such systems must be considered untrustworthy, regardless of the system on which they are used, even after the update has been applied."

    7. Re:Of course... by goofy183 · · Score: 4, Informative

      But that doesn't fix all of the machines that my public key (generated on Ubuntu) resides on that do not run Ubuntu. So yes fixing Ubuntu machines is easy, it is a PITA to have to go and re-upload my public key to all of these hosts.

    8. Re:Of course... by TheRealMindChild · · Score: 1

      Yeah... not to mention the poor folks running OpenSSH on a 70mhz microsparc II (looking at you sparcstation 5). It literally takes HOURS to (re)generate SSH keys.

      --

      "When life gives you lemons, don't make lemonade. Make life take the lemons back!" -- Cave Johnson
    9. Re:Of course... by Qzukk · · Score: 1

      Fortunately, I renew SSL certs for several years rather than on a yearly basis.

      Bigger question: does the seed issue affect the session keys generated for every https connection?

      --
      If I have been able to see further than others, it is because I bought a pair of binoculars.
    10. Re:Of course... by Just+Some+Guy · · Score: 4, Informative

      So yes fixing Ubuntu machines is easy, it is a PITA to have to go and re-upload my public key to all of these hosts.

      Especially when they won't work anymore:

      Once the update is applied, weak user keys will be automatically rejected where possible (though they cannot be detected in all cases). If you are using such keys for user authentication, they will immediately stop working and will need to be replaced (see step 3).

      The GP poster said the same thing, but this is for the benefit of other readers who were skeptical that any such policy was in place.

      So, basically, once you upgrade, you'll have no apparent way to access your other machines [1] to upload your new key. That's just spiffy!

      [1] Uninstall openssh-blacklist first.

      --
      Dewey, what part of this looks like authorities should be involved?
    11. Re:Of course... by robo_mojo · · Score: 1

      So, basically, once you upgrade, you'll have no apparent way to access your other machines [1] to upload your new key. That's just spiffy!

      It doesn't do much good to transfer your new keys over a channel encrypted with your old, weak key. If someone can guess the old key, then they have the new key, too.
    12. Re:Of course... by Just+Some+Guy · · Score: 1

      It doesn't do much good to transfer your new keys over a channel encrypted with your old, weak key. If someone can guess the old key, then they have the new key, too.

      Nope. You're uploading your public key to the remote server, so the only issue is verifying the integrity of that key, eg making sure that a man-in-the-middle attack using your old public key didn't upload the attacker's own key. That example is why it's critically important to remove your old, compromised key from ~/.ssh/authorized_keys leaving only the new one in place.

      --
      Dewey, what part of this looks like authorities should be involved?
    13. Re:Of course... by robo_mojo · · Score: 1

      Sorry, mod that down, I mistyped. Exchanging public keys isn't a problem even over an insecure channel.

      What I'd meant to say was that being able to log in to upload your new key wouldn't do much good since you don't know whether the person logging in is a fake or not. The old key is already assumed to be compromized. Hopefully you have some other way of identifying yourself in that situation.

    14. Re:Of course... by robo_mojo · · Score: 1

      That's right. I just mis-read what the GGP said but thanks for pointing it out.

      In fact you'd be pretty much foobar'd if someone managed to replace your key for you before you had the chance to, if you didn't have any other ID for the server to verify against you. Perhaps locking users out until a plan can be made for your users to provide new keys isn't a bad idea.

      And also, it might be wise to have multiple keys generated from different tools just in case something like this happens, and make sure everyone knows about all of them, so you don't get SOL.

    15. Re:Of course... by Anonymous Coward · · Score: 0

      The weak keys are rejected by the server, not the client. Installing the patch doesn't stop you from using the keys to login to unpatched systems.

  11. Re:It will be fixed by Anonymous Coward · · Score: 1, Informative

    Yes it's already fixed. I was in the middle downloading the update when when I saw this article.

  12. Re:It will be fixed by Anonymous Coward · · Score: 0

    I am presently downloading a patch. Open source is amazing that way.

  13. I see problems on Gutsy with mine. by khasim · · Score: 1

    Preparing to replace openssh-server 1:4.6p1-5ubuntu0.2 (using .../openssh-server_1%3a4.6p1-5ubuntu0.3_i386.deb) ...
    Template #4 in /var/lib/dpkg/tmp.ci/templates has a duplicate field "template" with new value "ssh/vulnerable_host_keys". Probably two templates are not properly separated by a lone newline.
    dpkg: error processing /var/cache/apt/archives/openssh-server_1%3a4.6p1-5ubuntu0.3_i386.deb (--unpack):
      subprocess pre-installation script returned error exit status 255

    And then:
    openssh-server: Depends: openssh-client (= 1:4.6p1-5ubuntu0.2) but 1:4.6p1-5ubuntu0.3 is installed

    Anyone else seeing this?

    1. Re:I see problems on Gutsy with mine. by Yath · · Score: 1
      --
      I always mod up spelling trolls.
    2. Re:I see problems on Gutsy with mine. by blueser · · Score: 1

      Yes, same problem here. MD5 is ok for the file according to Ubuntu official security notice, so someone probably screwed up during packaging. I guess we'll need to wait for fixed packages to be uploaded...

    3. Re:I see problems on Gutsy with mine. by amrik98 · · Score: 1

      Confirmed on Gutsy server edition.

  14. What's the hurry? by n0dna · · Score: 5, Funny

    It was accidentally introduced in 2006... so that's what, another 14 years before it gets moved into 'stable'?

    *grin*

    1. Re:What's the hurry? by Anonymous Coward · · Score: 0

      I know that's a joke, but the fix is in debian stable already, and when you install it a notice pops up telling you more about it, and giving some additional instructions.

    2. Re:What's the hurry? by pjt33 · · Score: 1

      Some of us run 'testing', you insensitive clod!

    3. Re:What's the hurry? by Anonymous Coward · · Score: 0

      You're really not being fair here: While this might be (almost) true for regular software updates, they handle security fixes very quickly and responsibly!

    4. Re:What's the hurry? by Gnavpot · · Score: 1

      You're really not being fair here: While this might be (almost) true for regular software updates, they handle security fixes very quickly and responsibly!

      Whoosh.

      He commented on the time it takes THE ERROR to get included in Debian Stable.
    5. Re:What's the hurry? by marcosdumay · · Score: 1

      I guess he is saying that the bug didn't make it to stable yet. Not the fix.

      What is a joke. Please don't read the above and think you are safe.

    6. Re:What's the hurry? by KiloByte · · Score: 1

      It appeared in stable yesterday.

      New features don't get into stable. Security and grave bugfixes do.

      --
      The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
  15. Re:It will be fixed by JackieBrown · · Score: 2, Interesting

    As far as the bug linked for changes upstream (#477454,) is that seriously the best example of Debian not sharing changes back upstream?

    It seems more like an attempt to show that a maintainer was being petty which is not what the article was about.

    Does anyone one really think that this change would have been accepted upstream (or even have had a place for it there?)

  16. Yeah, that'll get people to switch... by Sun.Jedi · · Score: 1, Troll

    So this is how linux is going to replace Windows on the desktop? By creating custom functionality that break RFC and common sense? Some things never change, do they?

    1. Re:Yeah, that'll get people to switch... by Anonymous Coward · · Score: 0

      Kerberos is not unique to MS. It was built at MIT and its implementation was released freely under the BSD license. Moreover, there is no reason you can't use Kerberos and OpenSSH together on GNU/Linux or BSD system. Kerberos is only an authentication method, OpenSSH keys are RSA and DSA keys used for both authentication and cryptography in SSL. So the use of Kerberos doesn't solve the issue.

      If this issue were in a Microsoft service, you'd probably only be getting an advisory today, and you'd be getting a patch in a month or two.

  17. Re:It will be fixed by Archangel+Michael · · Score: 4, Insightful

    It shouldn't need fixing in the first place.

    Debian people screwed up. This leaves a huge distaste in my mouth for Debian (and Ubuntu).

    --
    Agent K: A *person* is smart. People are dumb, stupid, panicky animals, and you know it.
  18. Re:It will be fixed by rhavenn · · Score: 5, Insightful

    I'm sure the problem will be fixed if the developers acknowledge that the problem exists. Not a big worry. No, but it shouldn't have been changed in the first place. Debian needs to stick their ego up their ass sometimes and just let the people who wrote the software do the coding vs. sticking their own code in in places they don't fully understand. This and their attitude of licensing and not reporting changes back upstream is a stupidly annoying habit.

    note: When I have to run Linux instead of a BSD it's Debian and/or Kubuntu all the way since the benefits outweigh the negatives, but it's still an annoying habit of theirs.
  19. Re:You stupid god damned open sourcers by clang_jangle · · Score: 5, Insightful

    Windows here I come. At least someone would be accountable for shit work like this.


    Yeah, like all those times when MS cut checks for all their customers whose computers were compromised! Oh, wait...
    --
    Caveat Utilitor
  20. Re:It will be fixed by Omnifarious · · Score: 5, Informative

    I'm sure the problem will be fixed if the developers acknowledge that the problem exists. Not a big worry.

    Yes, it is a big worry because any keys generated with this package are now potentially suspect. This means that anybody who's used Debian or a Debian derived distribution like Ubuntu needs to go back and destroy all host and personal keys generated since 2006. All of those keys are potentially guessable.

    And that's a real vulnerability. Early versions of Netscape's SSL implementation (the first SSL implementation) were trivially crackable because of just such a vulnerability.

  21. How Frakin stupid can you be? by nweaver · · Score: 5, Funny

    "You fell for one of the classic blunders, the most famous being 'Never get involved in a land war in Asia' but only slightly less well known is 'Don't use poorly seeded pRNGs in cryptographic protocols!' HAHAHAHAHAHHAHAHAHAHHAHAHAHAHAHA!!!!

    --
    Test your net with Netalyzr
    1. Re:How Frakin stupid can you be? by EricR86 · · Score: 4, Funny

      BUTTERCUP: Who are you?

      MAN IN BLACK: I am no one to be trifled with, that is all you ever need know.

      BUTTERCUP: To think -- all that time it was your cryptographic protocol that was poorly seeded.

      MAN IN BLACK: They were both poorly seeded. I spent the morning downloading a patch to build an immunity to keys being guessed.

    2. Re:How Frakin stupid can you be? by Tom · · Score: 1

      Actually, it's more general than that. I'd phrase it roughly as "don't fucking mess with crypto if you aren't a cryptographer".

      --
      Assorted stuff I do sometimes: Lemuria.org
    3. Re:How Frakin stupid can you be? by soliptic · · Score: 2, Insightful

      One of the OpenSSL developers (or at least, that's what I infer) puts it in even more general terms:

      never fix a bug you don't understand.

      However, I can't help wondering if some fault may arguably lie with the OpenSSL coders. I mean... by his own admission:

      Usually it is bad to have any kind of dependency on uninitialised memory, but OpenSSL happens to include a rare case when its OK...

      (Emphasis mine)

      So, since it's unusually doing something that looks an awful lot like a Cardinal Sin, did this block of code include a prominent:

      /*
      NB: Yes, we are reading unitialised memory
      This is deliberate, NOT A BUG!
      <explanation here>
      */

      I mean, if you're going to write code that basically looks like a duck, walks like a duck and quacks like a duck, and which you know is going to head downstream toward a huge bunch of duck-hunters, it's really a good idea to add a big visible note saying THIS IS NOT A DUCK.

    4. Re:How Frakin stupid can you be? by Chandon+Seldon · · Score: 1

      I mean, if you're going to write code that basically looks like a duck, walks like a duck and quacks like a duck, and which you know is going to head downstream toward a huge bunch of duck-hunters, it's really a good idea to add a big visible note saying THIS IS NOT A DUCK.

      If the Debian developer had submitted the patch upstream, that would have been the whole story. A couple people would have had to regenerate keys for their debian unstable boxes, and the OpenSSL developers would have had a good laugh at the Debian guy screwing up.

      The fact that this was in stable for 2 years makes this completely different. The Debian packager and the Debian security team both screwed up royally - the latter perhaps simply by having a poor security-critical patch policy.

      --
      -- The act of censorship is always worse than whatever is being censored. Always.
    5. Re:How Frakin stupid can you be? by soliptic · · Score: 1

      You're not really addressing my point there at all.

      AFAICS, the only way you are, is (implicitly) saying "(the OpenSSL folks arent at fault because) the Debian guys are REALLY BADLY at fault".

      Inasmuch as I want to be chucking around blame (I don't: I don't code C, don't use Debian, haven't got a leg to stand on), I would not treat that blame as zero-sum. By suggesting some may lay with the OpenSSL team, I'm not suggesting Debian didn't screw up at all. Furthermore, what I'm really doing is suggesting "2 grams" of blame may lay with the OpenSSL team, as opposed to the undenied 1 kg with Debian.

      Let me put it this way: when I find myself using easily misread voodoo in my code at work, I put in a bloody big comment explaining what and why, even though in practice I'm the only person who ever maintains that code. This is because one day, I will leave that job, and the poor sod who picks up my hackery isn't going to have the option of submitting a patch or even a query "upstream" (ie, to me).

      Also, to be honest, if I come back to an obscure part of the codebase after a year, I'm not necessarily going to remember the subtle gotchas in my code.

      So basically, any time I find myself doing something which is a potential "gotcha", something "naughty", or unconventional, or hacky, or ambiguous, or magic-number-y, but thinking "this is voodoo, but I have a good reason for it...", I unmissably comment both what the voodoo is, and what the reason for it was. You can't assume other users/maintainers of the code will always have the luxury of conversing with you or gaining your approval.

      Anyway - like I said - not trying to flame on OpenSSL, for all I know the relevant code does have such comments, just makin' conversation :)

    6. Re:How Frakin stupid can you be? by prockcore · · Score: 1

      The OpenSSL people actually put ifdefs around the code so you could disable it safely.

      The debian people didn't use the ifdefs, instead they started commenting code out.. and not only did they comment out the part that was mostly harmless, but they also commented out all other entropy sources.

    7. Re:How Frakin stupid can you be? by Anonymous Coward · · Score: 0

      I mean, if you're going to write code that basically looks like a duck, walks like a duck and quacks like a duck, and which you know is going to head downstream toward a huge bunch of duck-hunters, it's really a good idea to add a big visible note saying THIS IS NOT A DUCK.

      The piece of code in question did have a comment saying that code checking tools did complain about it, and this could be inferred as saying 'this is not a duck'

      But that's a red herring anyway, the problem wasn't commenting out a line of code that read from uninitialised memory. The problem was commenting out a line of code in a completely different location that *did not* read from uninitialised and *was not* flagged by the code checking tool but happened to look very similar to the line of code that 'was not a duck'

    8. Re:How Frakin stupid can you be? by ins0m · · Score: 1

      But it _wasn't_ in stable when it was submitted, and that's the big thing. It was introduced to stable when etch went stable back in February.

      If you, like most responsible sysadmins, only ran your production boxes using stable, then any keys generated while running sarge would still be fine. If you did dist-upgrade to etch, THEN made new keys on your now-stable box, then you'd have a problem.

      Granted, it's still a fairly major botch-job, but I don't see why everyone's ballyhooing this as "ZOMG 2 YEARS IN PRODUKSHUN!" It was introduced in unstable, floated under the radar in testing, and was just committed to stable a couple months ago.

      Running testing or unstable on your production servers is playing with fire. Period. That it was caught within 3 months of being moved to stable helps to put realistic damages in perspective, but I'd still think this should cause serious review of the package maintenance process at Debian.

      --
      Never attribute to Hanlon that which can be adequately attributed to Heinlein.
    9. Re:How Frakin stupid can you be? by locofungus · · Score: 1

      Running testing or unstable on your production servers is playing with fire. Period. That it was caught within 3 months of being moved to stable helps to put realistic damages in perspective, but I'd still think this should cause serious review of the package maintenance process at Debian.

      Still running sarge on production servers here and I had a weak key with root access (added in the last week when I got an eeepc) and another with non-root access that was added over a year ago when I reinstalled my laptop with testing when etch was in testing.

      The problem here is that people might be using "bleeding edge" software on their clients that they are using as terminals to maintain production boxes.

      Standard practice is to generate the ssh key locally so that the private key never leaves the machine.

      One of the things I will start doing now is including the date when an ssh key is generated in the public key comment. Putty does this anyway.

      At home I've got certificates for imap which are probably weak. I also have smtp TLS certs that are probably weak including some on production servers. They are due to expire on 1st June anyway and it's a minor issue for me.

      If this was just ssh using a weak session key then it's no big deal. But what are places like sourceforge going to do now? My key there is ok but are they going to check every key? Are they going to remove all the authorized_keys files? How are they going to stop people unknowingly re-uploading existing weak keys?

      Tim.

      --
      God said, "div D = rho, div B = 0, curl E = -@B/@t, curl H = J + @D/@t," and there was light.
    10. Re:How Frakin stupid can you be? by MadMidnightBomber · · Score: 1

      Inconceivable!

      --
      "It doesn't cost enough, and it makes too much sense."
  22. 2 years? by Anonymous Coward · · Score: 5, Interesting

    The seeding was removed and it wasn't noticed for TWO YEARS? In a distro as popular as Debian?

    1. Re:2 years? by jrothwell97 · · Score: 4, Interesting

      Hang on. There was a story here the other day about a bug in BSD that had been carried down to all its descendants (FreeBSD, OS X, NetBSD etc) for twenty-five years without anyone noticing. Two years is nothing.

      --
      Those using pirated Tinysoft signatures(TM) are a real threat to society and should all be thrown in jail.
    2. Re:2 years? by Free+the+Cowards · · Score: 1

      The BSD bug would cause some directory entries to be missed with a certain rare sequence of API calls. This bug causes every single private key generated with a couple of popular Linux distros to be massively insecure. You'd hope that enormous security holes would be noticed a whole lot sooner than obscure directory traversal bugs.

      --
      If you mod me Overrated, you are admitting that you have no penis.
    3. Re:2 years? by Chemisor · · Score: 2, Funny

      Open Source programmers are getting older, and many eyes are getting blurry.

    4. Re:2 years? by jrothwell97 · · Score: 1

      Yes, but surely a bug is a bug? Whether it's a broken readdir() function in a certain sequence or a critical security flaw with SSH, it boils down, at code level, to being an oversight or typo by the programmer, which may be almost invisible when skimming through it in SVN or an IDE. Simple as.

      However, considering that it was two years and that this is such an important part of the system, perhaps some should consider setting up "code patrols" - ie someone roots through all the code and gives it the once over every month or so, and pulls out or fixes any bugs or vulnerabilities. Especially with important things like SSH, this might be very useful.

      --
      Those using pirated Tinysoft signatures(TM) are a real threat to society and should all be thrown in jail.
    5. Re:2 years? by Free+the+Cowards · · Score: 3, Insightful

      Bugs with differing severities have different priorities, though.

      If 99.9% of client code works, then an obscure bug in BSD directory traversal code is pretty unimportant. It won't affect most people, so it won't be found by most people.

      This kind of bug, on the other hand, severely harms the security of everyone using this distro. It's tricky because it's hard to tell the difference between good crypto and crypto which has a critical flaw at the beginning which makes it insecure, which is why it lasted for so long before being found. But still, one would think that crypto software would get more attention and that someone would have noticed that every affected machine is spitting out nearly identical keys.

      --
      If you mod me Overrated, you are admitting that you have no penis.
    6. Re:2 years? by Anonymous Coward · · Score: 0

      so much for "many eyes, makes for more security"

    7. Re:2 years? by fishtop+records · · Score: 1

      yes, because the patch was not offered up to the openssl folks. Its pure arrogance on the debian folks, crypto can have subtle bugs.

    8. Re:2 years? by Anonymous Coward · · Score: 0

      It only pretends to be popular - Ubuntu surpassed it.
      Then again Windows is also (much more) "popular", and thus has more hidden long-year holes too. No?

    9. Re:2 years? by Kjella · · Score: 1

      Well, there's two factors:
      1. The code isn't broken (for some definitions of broken), it generates valid keypairs and with 250k+ keys to choose from you're not going to casually see it.
      2. If you're doing any development or performing some sort of cryptographic study, you're likely to use the upstream source.

      The result is that the kind of analysis required to detect this was very unlikely to be done on the source in question. I guess this applies to all downstream versions, if you could get for example a kernel exploit into a downstream kernel I guess it would be much the same, the chance of detection would be far, far less than in Linus' tree.

      --
      Live today, because you never know what tomorrow brings
    10. Re:2 years? by Anonymous Coward · · Score: 0

      I didn't realize one had to be "old" to get blurry vision.

    11. Re:2 years? by iabervon · · Score: 1

      Actually, it was sent to the mailing list that OpenSSL's README says to send patches to. They just seem not to have looked at it.

    12. Re:2 years? by fishtop+records · · Score: 1

      Opps, then I may be wrong. Sorry.

  23. Re:It will be fixed by Anonymous Coward · · Score: 4, Informative

    Um.... it doesn't matter if it's been patched, you still have to regenerate all your keys.

    There most certainly is something to see here, this is kind of a big deal.

  24. Re:It will be fixed by compro01 · · Score: 1

    i was sure that netscape problem was due to the US crypto export regs (the silly encryption=munitions thing) that limited the encryption to 40-bit keys.

    --
    upon the advice of my lawyer, i have no sig at this time
  25. Linux at its best... by Bfaber · · Score: 0, Flamebait

    'Makes it appear to be run by a bunch of half-wits.. I don't understand any level of justification that would make anybody think it was wise to touch SSL in your own distribution.

    Such bugs and the thread posted from debian discussions show how far linux has to go to really be viewed in any sort of professional light.

  26. Re:It will be fixed by Anonymous Coward · · Score: 0

    You obviously didn't read or understand the advisory if that's your attitude.

  27. comics by Anonymous Coward · · Score: 5, Funny

    http://www.random.org/analysis/dilbert.jpg
    http://www.xkcd.com/221/

    1. Re:comics by SheeEttin · · Score: 1

      And today's XKCD references the vulnerability itself:
      http://www.xkcd.com/424/

    2. Re:comics by Anonymous Coward · · Score: 0

      This was the topic of today's xkcd
      http://xkcd.com/424/

  28. To non-IT people by Thelasko · · Score: 2, Informative

    This is on the SSH server side. If you are a casual desktop user, you don't have to do anything.

    --
    One of our competitors trademarked the term "hypothesis". From now on, we will call them "boneheaded ideas".
    1. Re:To non-IT people by maxume · · Score: 2, Informative

      It affects all https connections, even client https connections. They are probably transient enough to mitigate the issue, but they are impacted.

      --
      Nerd rage is the funniest rage.
    2. Re:To non-IT people by Sun.Jedi · · Score: 5, Insightful

      This is on the SSH server side. If you are a casual desktop user, you don't have to do anything. Yes, a good observation for IM/Email/Youtube/Facebook crowd... but how many others ssh into their home machine? I'd wager the ability to ssh into a home box is one of the better perks to running linux@home.
    3. Re:To non-IT people by jdowland · · Score: 4, Informative

      Uhhm, no. If you generated a key using the affected packages (ssh-keygen), as a user, your key needs to be replaced.

    4. Re:To non-IT people by Anonymous Coward · · Score: 0

      This is on the SSH server side. If you are a casual desktop user, you don't have to do anything. You assume that casual desktop users do not generate SSH keys. Anyone who generated an SSH key is potentially vulnerable.
    5. Re:To non-IT people by Anonymous Coward · · Score: 0

      Wrong, desktop users who use SSH are affected as well. Keys generated by vulnerable versions of ssh-keygen are vulnerable.

    6. Re:To non-IT people by gnuman99 · · Score: 1

      I'm at a loss which HTTPS connections are affected here.. For example, the following will be affected,

      Problem 1:
      1. generate a CA
      2. sign your own certs with that CA.

      Solution??:
      1. get new certificates? Or do you need to generate a new CA? (second option is nasty :(

      Problem 2:
      1. generate a REQ
      2. get it signed by some trustworthy 3rd party source, like Thawte

      Solution??:
      1. Is the key compromised? Or just update to openssl will fix the https sessions??

      Problem 3:
      1. encrypted filesystem with cryptsetup.

      Solution?:
      1. Not affected?

    7. Re:To non-IT people by maxume · · Score: 1

      The client uses the random number generator to set up a key for the secure session. It generates the random number and encrypts it with the servers public key.

      --
      Nerd rage is the funniest rage.
    8. Re:To non-IT people by Culture20 · · Score: 1

      As already mentioned, this effects all of the ssl stuff. Even if it were just ssh though, you'd want to be aware that a lot of servers you connect to might be changing their keys (if they're debian boxes), so you may have to muck around with your ~/.ssh/known_hosts file a few times.

    9. Re:To non-IT people by totally+bogus+dude · · Score: 1

      If you used the broken openssl to create the private key, then you should assume somewhere who cares enough will be able to guess the private key. Since generating your own CA and generating a certificate request using openssl implies with almost 100% certainty you created the private key using openssl as well, then you should regenerate all of these. I think your problem #3 will be affected, too, assuming it uses openssl.

      Thus, this is a huge friggin deal. I'm not sure what's appalling: the fact such a change was implemented in the first place, or the fact that it took 2 years before they powers that be realised it was a problem and fixed it. This is definitely a huge blow to Debian's credibility.

      On the plus side, I appreciate how honest and direct the advisory was - no flowery language to try to downplay the fuckup. It can be really hard to admit when you've done something stupid, especially something as colossally stupid and far-reaching as this. Still, W. T. F. I guess the important thing is that they (and others) learn from this mistake.

    10. Re:To non-IT people by maxume · · Score: 1

      Just to clarify, it affects any SSL connection initiated by OpenSSL (so Firefox isn't at risk, it doesn't use OpenSSL).

      --
      Nerd rage is the funniest rage.
    11. Re:To non-IT people by Anonymous Coward · · Score: 0

      it's not even true. Also casual desktop users of ssh servers might need to create their keys.

    12. Re:To non-IT people by xtronics · · Score: 1

      That is a dangerous blanket statement.

    13. Re:To non-IT people by Thelasko · · Score: 1

      Some clarification about the people effected by this.
      Do you know how to create an SSH/SSL encryption key?
      if no
      end (you are not effected by this problem)
      if yes
      Have you ever created a key with your machine?
      if no
      end (you are not effected by this problem)
      if yes
      sudo apt-get update
      sudo apt-get upgrade
      create new SSH/SSL keys
      end

      If Linux ever wants to make it to the desktop we have to put things in terms everyone can understand. A casual user, such as myself, might understand that he/she uses SSL while using his/her bank's website and panic upon reading this article. These issues need to be clarified.

      Would MS bother to make these clarifications? Damn right! Unless of course, they try to cover up the fact they made this mistake in the first place.

      --
      One of our competitors trademarked the term "hypothesis". From now on, we will call them "boneheaded ideas".
    14. Re:To non-IT people by maxume · · Score: 1

      Most web browsers don't appear to use OpenSSL for encryption, but the bug makes the session key of all SSL connections subject to guessing.

      Copied directly from the advisory:

      Affected keys include SSH keys, OpenVPN keys, DNSSEC keys, and key material for use in X.509 certificates and session keys used in SSL/TLS connections.
      --
      Nerd rage is the funniest rage.
    15. Re:To non-IT people by Anonymous Coward · · Score: 0

      This is on the SSH server side. If you are a casual desktop user, you don't have to do anything. Reading the parent posting it appears SSH connections are compromised too.

      Could please someone confirm that SSH keys must be recreated too (i.e., is the problem with OpenSSL only or is SSH affected too)?
    16. Re:To non-IT people by Anonymous Coward · · Score: 0
      From the debian security update (my emphasis):

      Security holes were fixed with this release. Services may not use these fixes
      until they are restarted. Note: restarting sshd should not affect any existing
      connections.

      Following is a list of detected services that need to be restarted. Please
      correct the list, if you think it is incorrect. The services names must be
      identical to the script names in /etc/init.d and must be separated by spaces. If
      you clear the list, no services will be restarted.

      If other services begin to fail mysteriously after this upgrade, it may be
      necessary to restart them too. We strongly recommend you to reboot your machine
      to avoid the SSL related trouble.

      Which services should be restarted to make them use the new libraries? Oops, on my system sshd failed to stop/start...
    17. Re:To non-IT people by Anonymous Coward · · Score: 0

      I use SSH to connect to my Mac at home.

    18. Re:To non-IT people by Anonymous Coward · · Score: 0

      Er, no. This applies to anyone who does key-based auth from a desktop, as well.

    19. Re:To non-IT people by setagllib · · Score: 1

      You need to generate a new CA if its private key is weak. Having that primary key, an attacker can sign his own certificates and have them join your PKI. Unless you're auditing every certificate authenticated against your systems, you'll never even notice. This isn't like an individual client certificate you can just revoke.

      OpenVPN, etc. are extremely vulnerable to this. In fact, all of public key cryptography hinges entirely on the secrecy of private keys, so any vulnerability which reduces the search space is a really really big deal.

      I'm very confident black hats have had this in their arsenal for a long time, leaving it unannounced while weak keys accumulate.

      --
      Sam ty sig.
    20. Re:To non-IT people by Anonymous Coward · · Score: 0

      Completely untrue. A bad PRNG in the client will render SSL encryption useless.

    21. Re:To non-IT people by OttoM · · Score: 1

      This is on the SSH server side. If you are a casual desktop user, you don't have to do anything.

      This is NOT true. All key material generated with the patch is potentailly predicatble. This includes client SSL certs and personal ssh keys.

    22. Re:To non-IT people by Anonymous Coward · · Score: 0

      Wrong, this also applies to your authentication keys in ~/.ssh/

    23. Re:To non-IT people by Anonymous Coward · · Score: 0

      This is on the SSH server side. If you are a casual desktop user, you don't have to do anything. Genuine question, not rhetorical bullshit...

      Doesn't this effect OpenSSL and all of the key-pairs generated by it? So, on that principle, wouldn't it mean the keys generated by the client in SSL connections would be vulnerable as well?
    24. Re:To non-IT people by Anonymous Coward · · Score: 0

      This is on the SSH server side.

      WRONG.

      When using private key authentication (the most secure solution, and the only one that allows you to securely create an account over a non-encryptet medium - e.g. by e-mail to a hosting provider) needs random data to create the private key ON THE CLIENT.

    25. Re:To non-IT people by Anonymous Coward · · Score: 0

      User's authentication keys are also affected. Though you could say that its up to a server's administrator to scan those with the tools provided with the fix and prevent people from logging in with compromised keys.

    26. Re:To non-IT people by Anonymous Coward · · Score: 0

      Yeah, it definitely affects the desktop users.
      Anybody who uses ssh-keygen without a passphrase is in deep shit here.

  29. Re:It will be fixed by Jellybob · · Score: 4, Informative

    Downloading the patch is step one - you also need to regenerate any certificates made with OpenSSL since 2005, since they can't be guaranteed to be secure.

    This has the potential to turn into a huge pain in the arse for Debian based shops, who will need to reissue SSL certificates, SSH keys, and a whole host of other essential elements of their security infrastructure.

  30. Re:It will be fixed by Omnifarious · · Score: 2, Informative

    i was sure that netscape problem was due to the US crypto export regs (the silly encryption=munitions thing) that limited the encryption to 40-bit keys.

    Then you are mistaken. Read the linked to paper. N bit security doesn't protect you much when you can guess N-10 bits of the N bits.

  31. who was it? by Anonymous Coward · · Score: 1, Insightful

    Who was the member of the security services who acted as package maintainer?

    I cannot believe that such a change would have gone by unnoticed if it had been properly documented, and I cannot believe anyone given the trust of the OpenSSL distribution would make such a mistake.

    This was an intentional act of sabotage.

    1. Re:who was it? by Goaway · · Score: 1

      It was properly documented. It was an entirely understandable mistake, if you assume the person who made it was so goddamn stupid he felt he had to mess with the guts of OpenSSL.

    2. Re:who was it? by metamatic · · Score: 1

      I cannot believe that such a change would have gone by unnoticed if it had been properly documented

      If the code was properly documented he wouldn't have made the mistake.
      --
      GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
    3. Re:who was it? by Anonymous Coward · · Score: 0

      Who was the member of the security services who acted as package maintainer?

      Kurt Roeckx, a guy that seems to be paid by the enemy .. for example, he patches openssl but don't know that nested comments will no compile and had to repatch it:

      http://svn.debian.org/viewsvn/pkg-openssl/openssl/trunk/rand/md_rand.c?rev=141&r1=140&r2=141
      http://svn.debian.org/viewsvn/pkg-openssl/openssl/trunk/crypto/rand/md_rand.c?rev=173&r1=167&r2=173

      Worst , the same guy *stills* commits changes. See the comment of the last change ( the fix of the stupid thing about disabling RNG ):

      "ssleay_rand_add() really needs to call MD_Update() for buf."

      ( http://svn.debian.org/viewsvn/pkg-openssl/openssl/trunk/crypto/rand/md_rand.c?rev=300&r1=199&r2=300
      )

      Still arrogant! yes ! ssleay_rand_add() *really* needs to call MD_Update. What do you thought? that openssl developers just put useless code for fun? my god, this people ( like Kurt ) is actually committing changes to a fundamental/pervasive security package without ever test that the RNG still works

      If you are interested, here is the complete changelog of this md_rand.c source file:

      http://svn.debian.org/viewsvn/pkg-openssl/openssl/trunk/crypto/rand/md_rand.c?rev=300&view=log

      IMHO, something has to change at Debian. Learn from Perl people: automated strict testing in any new patch, regression testing, etc.

  32. Re:It will be fixed by 1984 · · Score: 1

    There were two issues: one was that the "export version" had 40-bit encryption which was relatively mathematically weak. Everyone knew that it could be brute forced with enough horsepower, and eventually someone demonstrated that -- though it still cost a lot more computer time (100 HP minis for a year?) than you'd probably want to spend for a single CC number.

    The second issue was that the full-strength domestic version used a crappy RNG source. That narrowed the possible keyspace by some tremendous amount. What remained could be brute forced on a desktop PC in a few hours.

    Only as good as the implentation :)

  33. Re:It will be fixed by 2short · · Score: 5, Insightful

    Basic cryptographic services have been compromised for a year and your analysis is to assume on faith that it's open source so it will be fixed, so no problem?

    If someone stole your crypto keys and has had them for a year...

    How thoroughly might they have compromised your system by now?
    How many passwords might they have stolen that you use on other systems?
    What else might they have done that will give them access in the future even after you fix this?

    Just regenerate your keys and no problem? The problem that guessable keys are generated will undoubtably be fixed asap, if not already. The problem that this has been the case for the last year will not be, and is a big worry.

  34. Re:It will be fixed by robot_love · · Score: 1

    It shouldn't need fixing in the first place.

    Debian people screwed up. This leaves a huge distaste in my mouth for Debian (and Ubuntu).

    How very...reasonable...of you.

    So, you're luvin' Windows, then?
    --
    .there is enough of everything for everyone.
  35. Re:It will be fixed by Anonymous Coward · · Score: 0

    How does the announcement's line "As a result, cryptographic key material may be guessable." make a machine automatically "compromised?" More vulnerable is more like it. The key still needs to be guessed. If the discovered weakness cuts a brute-force effort down to days (or less) instead of years, then I agree ... may as well say "compromised." Perhaps saying "compromised" motivates lazy sysadmins to get off their asses and apply updates? I'm just curious.


    I hate slow work days.

  36. Too early by sakonofie · · Score: 5, Funny
    I realized I probably should be legally required to have a morning cup of coffee before thinking because I am an idiot otherwise.

    I wake up and what do I see first thing? That there is a problem with Debian's OpenSSH package and the /. article links to the following code snippet:

    def init(pipeline, librarian):
              gst.debug_set_default_threshold(gst.LEVEL_ERROR)
    - if gst.element_make_from_uri(gst.URI_SRC, "file://", ""):
    + if gst.element_make_from_uri(
    + gst.URI_SRC,
    + "file:///Sebastian/Droge/please/choke/on/a/bucket/of/cocks", ""):
                      global playlist
                      playlist = PlaylistPlayer(pipeline or "gconfaudiosink", librarian)
                      return playlist

    Now I am thinking, "What exactly is going on here? Is choking on a bucket of cocks not a good source of randomness?"
    1. Re:Too early by Koiu+Lpoi · · Score: 1

      Buckets of Cocks are well known to be predictable in size and weight, the two normal ways of obtaining randomness from them. the change is to a bucket of cookies, which provides considerably more secure randomness. I mean, you've got oatmeal, oatmeal rasin, oreo, etc. Considerably more random than cocks.

  37. Blame me! by pacroon · · Score: 1

    I honestly don't think this is much more than a mistake, like one of those who surfaces every two years. I wouldn't go as far as blaming OSS or any other instance for that matter. No matter what you feel, you cannot deny that Debian usually has some of the most comprehensive focus on security in the scope of popular Linux Distributions.

    --
    It's all fun & games until someone loses the game.
    1. Re:Blame me! by Anonymous Coward · · Score: 0

      Oh yes, your are so right about that! Almost all of Debian's daemon owners have interactive shells.

  38. A great filter by Free+the+Cowards · · Score: 4, Insightful

    Anyone who posts to this story saying that this is no big deal or telling other people to stop whining should simply be banned from Slashdot for life. If you cannot be bothered to read the article and you cannot be bothered to understand just what a serious vulnerability this is but you insist on insulting those who do, why should you be allowed to continue to post your ignorant bleating?

    --
    If you mod me Overrated, you are admitting that you have no penis.
    1. Re:A great filter by Anonymous Coward · · Score: 0

      Right; freedom of expression is only for those who understand things as well as you do.

    2. Re:A great filter by Free+the+Cowards · · Score: 0, Flamebait

      If you want to walk around being an insulting moron then I'd prefer you to exercise your freedom of expression elsewhere. Slashdot is a private organization and you have no right to express yourself in this particular place.

      (I have no problems with people who don't understand the problem, only with those who are militant about it.)

      --
      If you mod me Overrated, you are admitting that you have no penis.
    3. Re:A great filter by Grapes4Buddha · · Score: 1

      Yes, it is important to apply the updates and regenerate the keys.

      No, it is nothing to get too excited about. I just did the update on my Gutsy box and it not only fixed my host key, but it popped up a dialog box telling me that I had to check my user keys and how to do it.

      So here I go: stop whining! It takes a couple minutes to update your system. If that's the toughest part of your day, you're a very lucky person.

    4. Re:A great filter by Free+the+Cowards · · Score: 4, Insightful

      Your SSL-enabled web sites spent two years being vulnerable to masquerade or man-in-the-middle attacks. Your SSH servers spent two years being vulnerable to same. Your SSH key pairs spent two years being easily crackable by anyone who happened to notice this vulnerability but didn't tell the world. I'm not entirely sure, but I think that SSL and SSH sessions either to or from the affected OSes may be crackable, and if so this would include traffic that was recorded at any time during the vulnerable period and can now be analyzed using knowledge of this bug to find out what data they carried.

      This is a big deal. Maybe it doesn't affect you very much. It doesn't affect me at all, I've never run these distros. But you can bet right now that there are a lot of heavy Linux users out there going through a lot of trouble. This is going to be a bonanza for certificate authorities as everyone who generated SSL keys with these distros is going to need to purchase a new cert.

      --
      If you mod me Overrated, you are admitting that you have no penis.
    5. Re:A great filter by Anonymous Coward · · Score: 0

      "It doesn't affect me at all, I've never run these distros"

      Did you ever connect to one that did over SSH or SSL?

    6. Re:A great filter by Free+the+Cowards · · Score: 1

      That's a very good point. I should have said that I have nothing to do to mitigate any of the damage, because I'm not in charge of any of the affected systems. I mostly just have to hope that none of my data has been compromised as a result of it.

      --
      If you mod me Overrated, you are admitting that you have no penis.
    7. Re:A great filter by setagllib · · Score: 1

      How do you know it doesn't affect you? This particular case may not affect you, but security systems have had entropy weaknesses since the beginning of time. Windows has come under a lot of fire for having a pitiful entropy architecture in general, and Linux has in the past as well (Linux the kernel, that is, which is where we get /dev/random).

      --
      Sam ty sig.
    8. Re:A great filter by Free+the+Cowards · · Score: 1

      Um, what? Read the title of the page. "Debian Bug Leaves Private SSL/SSH Keys Guessable". Debian Bug. A particular OpenSSL porting error which was only present in Debian. A seeding error which is not duplicated elsewhere. If you want to go on about how I may be vulnerable to other security bugs then fine, do so, but "it" in this context refers to a Debian bug which does not exist elsewhere.

      --
      If you mod me Overrated, you are admitting that you have no penis.
    9. Re:A great filter by setagllib · · Score: 1

      Except that it affects all keys generated on Debian. Even if your client is not running Debian, any number of your servers may be, whether they're in your administrative domain or not. Keys may have been generated on Debian machines and then used on Windows servers. The companies you rely on to store your sensitive details may have already been compromised. How the hell can you say you're not affected? Everyone's potentially affected. That's kind of the problem with PKI in general, which is meant to be "solved" with strong entropy.

      --
      Sam ty sig.
    10. Re:A great filter by Free+the+Cowards · · Score: 1

      As I mentioned in another post, "not affected" was bad wording. What I should have said is that I'm not in a position to fix any of the ways I may be affected by this, as compared to various sysadmins who are no doubt putting in a lot of work to clean up their own localized messes.

      --
      If you mod me Overrated, you are admitting that you have no penis.
  39. Surely this is not the only source of entropy! by argent · · Score: 4, Interesting
    Going to http://www.links.org/?p=327 I read...

    OpenSSL happens to include a rare case when its OK, or even a good idea: its randomness pool. Adding uninitialised memory to it can do no harm and might do some good, which is why we do it.
    Uninitialised data doesn't seem to be a good source of randomness to depend on, since depending on where it happens you may consistently end up with a buffer that previously contained all zeroes (or some default memory test pattern), the same part of the same shared library header, or a series of stack frames that for whatever reason happen to be the same frames on every run.

    In fact I'd expect that separate runs of the same program with the same parameters and environment would leave the same junk on the stack every time.

    So I would hope that they have some better source of entropy than unpredictable uninitialized data of dubious randomness.

    So if this is really a serious problem, then it seems to me there's already a serious problem in OpenSSH.
    1. Re:Surely this is not the only source of entropy! by gnuman99 · · Score: 1

      Why does *everyone* have to get fancy with teh random number generators!?! Why not just use /dev/random and stop the stupid games with reinventing the wheel?

      http://en.wikipedia.org/wiki//dev/random

      If you have an up-to-date implementation, like on Linux or most other OS, you don't need to get fancy BS random pool in userspace.

      As to uninitialized memory, I don't see why wouldn't a secure system just initialize ALL malloc to 0, just to make sure you can't spy on other processes.

    2. Re:Surely this is not the only source of entropy! by JeffSchwab · · Score: 1

      What would be a better source of randomness?

      HW RNG is already on video game systems; Cell processors have magical registers you can read to get eight random bits at a time. AFAICS, that's the only real solution to this problem. It's already common to use the system clock to seed non-critical RNGs on PCs, showing that the need for HW-based RNGs is widely known and long-standing.

    3. Re:Surely this is not the only source of entropy! by Anonymous Coward · · Score: 0

      Just think if OpenSSL was on a certain "hardened" unix systems or a patched linux system that zeroed memory before/after use. If I understand how this works correctly; The unallocated memory would be zero almost every time and therefore the keys be just as guessable.

    4. Re:Surely this is not the only source of entropy! by Anonymous Coward · · Score: 1, Informative

      The uninitialised memory there isn't the only source they use, they just use it if it is there because it doesn't matter, and at worst doesn't make the data less random. They then call a randomisation routine. The broken patch commented out both calls. The fix doesn't restore the proper state as it doesn't fully undo the change that broke it, so in due course there will be another fix later this week with a full fix.

      Don't mess with code you don't understand, especially when it is so important.

      If you used this code to generate certificate requests, do you need to repurchase your SSL certificates?

    5. Re:Surely this is not the only source of entropy! by Just+Some+Guy · · Score: 1

      Why does *everyone* have to get fancy with teh random number generators!?! Why not just use /dev/random and stop the stupid games with reinventing the wheel?

      I'm guessing it's because /dev/random isn't good on every system where OpenSS{L,H} runs so they wrote a portable version that's acceptably decent everywhere.

      Speaking of which, is this same code (minus the Debian "fixes") present in the OpenBSD-native version of OpenSSL as well, or is it only in the portable version? Not that it should matter much, but I'm wondering if OpenBSD trusts their own /dev/random.

      --
      Dewey, what part of this looks like authorities should be involved?
    6. Re:Surely this is not the only source of entropy! by mmontour · · Score: 2, Insightful

      Why not just use /dev/random and stop the stupid games with reinventing the wheel? Probably because the rate at which it dribbles out random bits is too slow for most real-world applications (unless you happen to have it hooked up to a hardware RNG).
    7. Re:Surely this is not the only source of entropy! by argent · · Score: 2, Insightful

      The uninitialised memory there isn't the only source they use, they just use it if it is there because it doesn't matter, and at worst doesn't make the data less random.

      Yes, I get that, you're just restating what I quoted in slightly different words. My point is that it looks to me that at best it doesn't matter because it's not a good source of randomness.

      They then call a randomisation routine. The broken patch commented out both calls.

      Both calls were to the same routine, MD_Update, that added part of the uninitialized buffer to the message digest being built in two different places.

      Don't mess with code you don't understand, especially when it is so important.

      I'm not messing with it, I'm questioning it. If that code is important, then I'd like an explanation of why they think this is a good sort of randomness to depend on.

      If they don't want to use /dev/random, and they don't want to make the user stop and enter some random text (I always faithfully enter gibberish for OpenSSH initialization, don't you?), then they could pick a better fallback than a chunk of data whose randomness depends unpredictably on the execution environment.

      Heck, you can do a lot better by deliberately taking advantage of known variations in the environment: they'd do better hashing /var/log/messages, particularly as soon after a boot as this seems likely to happen, because then at least they'd get a buffer that actually depends on the details of the hardware installation, the IP address, the speed of the processor, the amount of memory, the distro, the enumeration of the PCI bus, the file systems, programs installed, the time and date, and so on... not predictable or reproducible (even if you cloned the hardware and faked the time and IP address network load will change the contents of timestamps unpredictably).

    8. Re:Surely this is not the only source of entropy! by argent · · Score: 1

      What would be a better source of randomness?

      Well, the first thing they should be using is /dev/random. If that isn't trusted enough, then waiting for the user to enter a page of random "lkjhfoip mef4nbfkuln3xo8897 69hj8y8363t8iowemj67 8h6&O*H8T87gn9p9U90 786bionnng" is traditional. Alternatively, see my suggestion in http://slashdot.org/comments.pl?sid=551636&cid=23393904 (which actually picks up a few of the things /dev/random is commonly seeded from).

    9. Re:Surely this is not the only source of entropy! by Chris+Burke · · Score: 3, Insightful

      Uninitialised data doesn't seem to be a good source of randomness to depend on, since depending on where it happens you may consistently end up with a buffer that previously contained all zeroes (or some default memory test pattern), the same part of the same shared library header, or a series of stack frames that for whatever reason happen to be the same frames on every run.

      Well yeah, especially because a byte of "uninitialized" memory, like all memory regardless of how many times it has been initialized, is much more likely to contain the value zero than any other. That'd be like using a 6-sided die as a source of randomness when the '1' side was ten times the area of the '6' side.

      However as mentioned, that's not the only or main source of randomness, and getting rid of that randomness was not the bug. It was getting rid of other sources of randomness in the process, because they -resembled- the function that used uninitialized memory.

      --

      The enemies of Democracy are
    10. Re:Surely this is not the only source of entropy! by argent · · Score: 1

      However as mentioned, that's not the only or main source of randomness, and getting rid of that randomness was not the bug. It was getting rid of other sources of randomness in the process, because they -resembled- the function that used uninitialized memory.

      My crypto-fu wasn't good enough to tell that from a few minutes of browsing the code. Can you elaborate?

    11. Re:Surely this is not the only source of entropy! by Anonymous Coward · · Score: 0

      Er. Any user can seed urandom with any data (/dev/urandom is, by default, 666). The cryptographic algorithm used handles this appropriately.

    12. Re:Surely this is not the only source of entropy! by Anonymous Coward · · Score: 0

      You're exactly correct.

      Uninitialized means that you can't assume ANYTHING about the memory contents; they could be totally random or completely regular.

    13. Re:Surely this is not the only source of entropy! by Free+the+Cowards · · Score: 1

      OpenSSL uses a lot of different sources of randomness. The uninitialized data is just one source out of many.

      The problem here is not the removal of the uninitialized data source. The problem is that the removal was botched, and resulted in disabling every source.

      This is not due to a problem in OpenSSL's implementation, nor would removing the uninitialized data seeding cause any security problems. The compromise was caused by a clueless maintainer making bogus changes to code he didn't understand, pure and simple.

      --
      If you mod me Overrated, you are admitting that you have no penis.
    14. Re:Surely this is not the only source of entropy! by Chris+Burke · · Score: 1



      This post explains it fairly well.

      --

      The enemies of Democracy are
    15. Re:Surely this is not the only source of entropy! by Anonymous Coward · · Score: 0

      Somebody else summarized the problem down below a bit, but basically what happened is that the patch that removed the reads from the uninitialized data also removed reads from data that had been initialized to random values. Removing the references to uninitialized data was fine, but removing a source of randomness from the RNG was the fatal mistake.

    16. Re:Surely this is not the only source of entropy! by ergo98 · · Score: 1

      Uninitialised data doesn't seem to be a good source of randomness to depend on

      They didn't depend on it: They needed a buffer to do some XORing to, and there was no need to initialize it. So they didn't initialize. That choice offered a potentially minor increase in entropy, and saved the admittedly minor computational cost of initializing the memory.

      There was no reason to initialize the memory, so they didn't.

      The problem is that in satisfying an automated code check to correct a complete non-bug, the enterprising developer removed additional, critical code seemingly haphazardly, not understanding what it did. In doing so he not only eliminated the minor randomness of the starting buffer, but a majority of all other, enormously much more significant randomness.
    17. Re:Surely this is not the only source of entropy! by hav0x · · Score: 1

      yes

    18. Re:Surely this is not the only source of entropy! by Niten · · Score: 1

      Speaking of which, is this same code (minus the Debian "fixes") present in the OpenBSD-native version of OpenSSL as well, or is it only in the portable version? Not that it should matter much, but I'm wondering if OpenBSD trusts their own /dev/random.

      OpenSSL is not part of OpenBSD. It's an entirely separate project by a different group of people, whose name just happens to start with the same prefix. (Unlike OpenSSH, OpenNTPD, OpenBGPD, and OpenCVS, which are created and maintained by the OpenBSD folks.)

    19. Re:Surely this is not the only source of entropy! by Anonymous Coward · · Score: 0

      My crypto-fu wasn't good enough to tell that from a few minutes of browsing the code. Can you elaborate?

      It "-resembled-" the function that used uninitialized memory because it WAS the function that used uninitialized memory. There were two calls to MD_Update() with the exact same parameters, one of which was before the seed buffer was initialized, one of which AFTER it was set to the actual seed. They removed both of them because whoever wrote it didn't bother to document that the exact same function with the exact same arguments was doing a totally different operation the second time. You know, kind of like
      x=add(a,b);
      y=add(a,b); /* BTW, This time add() is actually multiplying */

      People are ranting about how the reversed patch didn't put both of them back in, but the first one (the one commented out by the PURIFY #define because BSD's testing gear whined about it... same reason Debian removed it) was just the uninitialized memory call, which if the buffer was heap-allocated, would have been reading zeros on Linux anyway.

    20. Re:Surely this is not the only source of entropy! by Just+Some+Guy · · Score: 1

      Oops! My bad. You're right, of course.

      --
      Dewey, what part of this looks like authorities should be involved?
    21. Re:Surely this is not the only source of entropy! by mollymoo · · Score: 1

      If that code is important, then I'd like an explanation of why they think this is a good sort of randomness to depend on.

      They do not depend on it. They just don't bother to eliminate it because it cannot decrease the randomness. Eliminating it (by explicitly clearing the memory) would cost cycles and bring no benefit in terms of the way the program works. That said, it would cost so few cycles I'd argue the cost is worth it to have code debuggers don't bitch about.

      --
      Chernobyl 'not a wildlife haven' - BBC News
    22. Re:Surely this is not the only source of entropy! by argent · · Score: 1

      Thanks for the pointer. Appreciate it.

    23. Re:Surely this is not the only source of entropy! by makomk · · Score: 1

      Both calls were to the same routine, MD_Update, that added part of the uninitialized buffer to the message digest being built in two different places. The second call to MD_Update added the uninitialized buffer to the message digest. The first one added actual random data (for example, from /dev/random) to it. Debian commented out both without looking properly at the context surrounding them. (They should just #define PURIFY, which disables the correct one. An OpenSSL dev suggested this, but they didn't listen.)
    24. Re:Surely this is not the only source of entropy! by setagllib · · Score: 1

      OpenSSL is not from the OpenBSD camp, otherwise it would be BSD-licensed and a whole lot better. OpenSSH is from OpenBSD, yes, and a great number of its exploits in the past only affected other systems (running the pX versions).

      --
      Sam ty sig.
    25. Re:Surely this is not the only source of entropy! by seh4 · · Score: 1

      What would be a better source of randomness? Everyone here should know that you just need to dangle the leads of your /dev/random kernel module in a Brownian motion producer (say a nice, fresh cup of really hot tea), especially before running ssh-keygen.
    26. Re:Surely this is not the only source of entropy! by robo_mojo · · Score: 1

      Why not just use /dev/random and stop the stupid games with reinventing the wheel?

      Because /dev/random doesn't exist on every system that OpenSSL runs on. And reading bytes from /dev/random is very slow, a few B/s at best, less if the system is otherwise idle.

      /dev/urandom is faster, about 10MB/s on my system but also does not exist on every system either. In contrast OpenSSL on my system is about 25MB/s. This with the fact that /dev/{,u}random isn't portable would be a good reason to have a userspace RNG.
    27. Re:Surely this is not the only source of entropy! by SteveAyre · · Score: 1

      I think the key word is 'add'. As long as it's not the only source of entropy it doesn't decrease it and may add to it (depending on the contents of the memory).

    28. Re:Surely this is not the only source of entropy! by cygonik · · Score: 1

      Surely you can't actually think that this was their only source of entropy, by design..?

      OpenSSL, anywho, are not the creators of the problem, but the debian maintainers[*]. ..and OpenSSH merely uses OpenSSL, but I figure that was a typo.

      Anyway, they didn't design it to depend on uninitialized data as their "only source of entropy". If they did, there would indeed be issues (even though on separate runs of the program, the system would probably give them some new location in memory for that buffer). However, it seems you're misunderstanding what kind of mistake was made -- not one of faulty conceptualization or design, but one of careless modification.

      There were two basically identical lines of code that copied randomness from different sources. Considering that the things between /* and */ are comments, and not a part of the code, these two lines are pretty similar, right?

      MD_Update(&m,buf,j);

      MD_Update(&m,buf,j); /* purify complains */ ..yeah. Except, in the place where that first line is found, 'buf' points to information from a vary random source (e.g., the system entropy pool). In the place where the second line is found, 'buf' points to some semi-random chunk of memory that probably has noise in it, (to add to the *existing* randomness).

      The first is easily sufficient to provide randomness, however, it doesn't hurt (and may help) to add in the second. But the second caused a code checking tool to complain. When the line causing the complaint was removed, the person who changed it also removed the other, "identical" (but extremely necessary) line of code.

      Anyway, what it brings up for me is the question of Debian's review processes for sensitive packages. E.g.,

      * Is there a formal difference between packages that are more "sensitive" and those that aren't?
      * Is there a review process for code submitted to a sensitive package?
      * If so, how did that fail, and why did it fail? ..these are, unfortunately, things that I'm interested in, but not so interested that I can create enough time to look into it just now. :-p' Perhaps once work calms down a bit.

      [*] By 'debian maintainers', I am not referring to the term 'maintainer' as defined by debian.

      --
      I am not an atomic playboy.
  40. Re:It will be fixed by Anonymous Coward · · Score: 0, Troll

    Debian people screwed up. This leaves a huge distaste in my mouth for Debian (and Ubuntu).

    Yeah! Cause you never made a mistake did you. plus this was such an obvious and egregious mistake; any fool could/would have caught it. The Debian distributions are obviously crap.

    Are you kidding me?

  41. Re:It will be fixed by HappySmileMan · · Score: 1

    Or any other distro, or Mac, just because he doesn't like the way Debian does things doesn't automatically mean he's sleeping with bill Gates.

  42. Lovely - if only I could update by Anonymous Coward · · Score: 0

    I've been getting badsigs since last week every time I try to update Hardy. Looks like I'm not alone, judging by the forums.

  43. Re:Strikes at the heart of the matter by JackieBrown · · Score: 1

    Can you show me the succeful suites since wga came out?

  44. The issue is a bit more complicated... by Anonymous Coward · · Score: 2, Insightful

    Hmm... no, it shouldn't have been changed. There is absolutely no excuse for touching crypto code when you don't *fully* understand it.

    But the fact that changing the use of NON-INITIALISED memory causes most of the seed of a RNG to go away really is worrisome... unless that memory is actually initialized with a seed BUT in a way Valgrind and others can't track. Which means it is sloppy coding on OpenSSL.

    You cannot trust unitialized memory, PERIOD. And it will take looking deep into OpenSSL code for me to tell if it was intialized in a way valgrind couldn't see, or that OpenSSL was working due to just plain blind luck (or lack of an attacker).

    Either way, upstream prepared the trap, and a debian maintainer sprung it.

    Why do YOU think we are not calling for blood on the guy who did the change? Because code that breaks like that is a travesty by itself.

    1. Re:The issue is a bit more complicated... by Free+the+Cowards · · Score: 3, Informative

      This has been explained elsethread, but just in case anyone wanders into this one....

      The problem is not the fact that the uninitialized memory seeding was removed. The problem is that the removal was done in an incompetent and destructive manner. Rather than remove only the uninitialized memory seeding, the maintainer managed to remove all seeding.

      Reading uninitialized memory as part of random seeding isn't very useful but it's not bad either, since at worst the data is predictable, and OpenSSL mixes it with lots of other randomness. But when you botch your change and completely destroy any randomness present in the system, this is not the fault of the software you were trying to "fix".

      --
      If you mod me Overrated, you are admitting that you have no penis.
  45. Re:It will be fixed by lazy_playboy · · Score: 1

    Well, Debian tries hard to build its reputation for stability and security and sensibleness in general, but arrogantly modifying source code without sending it upstream for verification seriously undermines this.

    And I'm not sure that it could be any more serious than when dealing with encryption.

  46. Servers, not desktops. by Anonymous Coward · · Score: 0

    This isn't about "desktop linux", this is really a huge problem for server admins.

    And what does kerberos have to do with anything?

    1. Re:Servers, not desktops. by Sun.Jedi · · Score: 1

      This isn't about "desktop linux", this is really a huge problem for server admins. Thats a narrow view. The problem is really huge for anyone who is running the modified openssh package; thats not limited to server installs. I would concede that there is larger potential (financial/application) impact to a server, but I still need to fix all my desktop keys. The problem is the process by which this change got into a distribution in the first place. One of the pinnacles of OSS was that this sort of dumbness wouldn't happen.

      And what does kerberos have to do with anything? The MS-Kerberos debacle was an example of what happens when an entity takes a standard (from RFC or common sense) repackages and changes it so that it no longer works as intended. This kind of goof was not supposed to happen because of open source, many eyes, and collective common sense. What other packages have been modified 'for convenience' that we won't know about for 2+ years?
  47. Re:It will be fixed by illumin8 · · Score: 2, Interesting

    This means that anybody who's used Debian or a Debian derived distribution like Ubuntu needs to go back and destroy all host and personal keys generated since 2006. All of those keys are potentially guessable.
    Great... just when I had mostly convinced the PHBs in management that yes, open source software was trustworthy, and that yes, good developers write Linux, and that no, you don't always get what you pay for, and answered all the hundreds of questions about "why do you think they would develop this software for free?" Now some jackass that shouldn't have even been touching this code fucks around with OpenSSL... I'm not trolling, but maybe open source isn't ready for the enterprise. If some coder did this at a company at least I'm pretty confident they'd get their ass fired, but with open source it's basically "whoops, my bad."
    --
    "When the president does it, that means it's not illegal." - Richard M. Nixon
  48. Did anybody read the "tension" link ? by King-Friday · · Score: 1

    There is a great little story in the link. The best part of the story is where the mod says, "Although this abuse is unfortunate, I fail to see what makes this bug release critical." I nearly fell out of my chair laughing.

    1. Re:Did anybody read the "tension" link ? by Anonymous Coward · · Score: 0
      If you read the whole "tension" link, you will see that that issue is unrelated to the current one

      Namely that "bug" was about the inclusion of:

      - if gst.element_make_from_uri(gst.URI_SRC, "file://", ""):
      + if gst.element_make_from_uri(
      + gst.URI_SRC,
      + "file:///Sebastian/Droge/please/choke/on/a/bucket/of/cocks", ""):
  49. Re:It will be fixed by MSG · · Score: 4, Insightful

    I think the point was that if the Debian maintainer had submitted his patch upstream, he'd have been told exactly how stupid it was.

  50. Why open source doesn't work for business by holophrastic · · Score: 0, Troll

    So who's accountable for damages as a direct result of such a problem? If I were using such software to run my business, and this sort of security problem became more than just a threat, what sort of recourse do I have? Which programmer do I get to sue?

    1. Re:Why open source doesn't work for business by ledow · · Score: 3, Informative

      Hello troll,

      You have no recourse unless you have PAID to have one, like with almost everything else in the world. The GPL specifically states that it's not a warranty or guarantee that things will work.

      However, if you were using it in a business, I would hope that you either a) hired your own programmers to work with the code or b) bought a support package/liability clause from someone like Red Hat. In which case it would be down to your programmers or Red Hat respectively. But we're not talking about Red Hat. Or any of the other big-name, support-contract-and-some-sort-of-indemnity-clause-included distros. They don't have this problem, presumably because they are not that stupid.

      We're talking about Debian. Got a support contract / liability agreement with Debian? No? Bad luck. It's a bit like asking Microsoft to accept responsibility for your pirate copy of Windows, then, isn't it?

    2. Re:Why open source doesn't work for business by Alarindris · · Score: 1

      If that's not tongue in cheek, you need to think about that question a little more. Which programmer forced you to use his free open-source software?

    3. Re:Why open source doesn't work for business by Experiment+626 · · Score: 2

      So who's accountable for damages as a direct result of such a problem? If I were using such software to run my business, and this sort of security problem became more than just a threat, what sort of recourse do I have? Which programmer do I get to sue?

      As opposed to the closed source world? If a security bug were discovered in Windows, would Microsoft would compensate you for your damages instead of just disavow any liability in a EULA?

    4. Re:Why open source doesn't work for business by guruevi · · Score: 1

      I don't know, go into the SVN or CVS repo and find out yourself. Luckily you're not using closed source where you don't even know if the code does it's work nor do you know the programmer.

      And I heard the 'we get to sue x if we buy from x' but when was the last time you sued Microsoft because of your system being part of a botnet? Or Oracle because their database corrupted. Heck, it's difficult enough to sue or set responsible PeopleSoft or SAP for the defective product they (after 3 years of implementation and about 200 contractors) don't/can't deliver, imagine something you DID get.

      --
      Custom electronics and digital signage for your business: www.evcircuits.com
    5. Re:Why open source doesn't work for business by Ikkyu · · Score: 1

      Read you EULA, you can't sue your vendor either.

    6. Re:Why open source doesn't work for business by Minwee · · Score: 3, Insightful

      It's a bit like asking Microsoft to accept responsibility for your pirate copy of Windows, then, isn't it?

      Or a bit like asking Microsoft to accept responsibility for the copy of Windows that you paid for.

      Look through the Windows license agreement some time and see how many times phrases like "THERE IS NO WARRANTY OR CONDITION OF ANY KIND", "YOU ARE NOT ENTITLED TO ANY DAMAGES" and "IN NO EVENT SHALL MICROSOFT OR ITS SUPPLIERS BE LIABLE" show up.

      The only difference with Microsoft is that if Windows breaks you don't get to keep both pieces.

    7. Re:Why open source doesn't work for business by holophrastic · · Score: 1

      That's not the accountability I'm talking about. No matter how much you don't like Microsoft, or their software, they want you to like it. Every time you don't, they lose money.

      When a Microsoft programmer makes a mistake, they risk losing their job. They risk class-action suits. There are many ways to be held accountable.

      But when a hobbyist programmer writes something, and it doesn't work, they've lost nothing.

      Nothing to lose. It's that simple. I'm not saying they have nothing to gain by doing it properly. I'm saying that they have nothing to lose by failing miserably.

      I write custom software. Of course even my clients can't sue me for huge damages and bugs. But I'm held very accountable for any problems. I risk losing the client, which is incredibly significant to me -- dollar-wise. I risk losing the reference, the reputation, and my entire business.

      Tell me, while we're speaking of security, what stops a malicious person from "contributing" to the open source package, with the intension of destroying it? I know that there are plenty of checks, just like Wikipedia, but clearly this one made it through.

      I can be absolutely certain that any malicious code in Windows is from someone who works for Microsoft. That's a much smaller group, and that group is well scruitinized.

    8. Re:Why open source doesn't work for business by holophrastic · · Score: 1

      No one's forced me use anything, that's why I create much of my own.

      But tell me, this particular person who caused them bug, will they lose their job? Their annual bonus? Anything at all?

    9. Re:Why open source doesn't work for business by holophrastic · · Score: 1

      First, if it were bad enough, Microsoft would be sued class-action style. Second, the programmer responsible likely loses his job. That's the big thing. Just because you don't publicly see the issue being dealt with, doesn't mean that nothing happened.

      There's a damn good reason to not screw up -- you can lose your job. But that bets that your actions are linked to your job.

    10. Re:Why open source doesn't work for business by holophrastic · · Score: 1

      I hate this stupid community. Every time I mention anything about not liking open source -- a.k.a. open liability -- no one reads the point. And then I can't even respond to them all, because there's a limit.

      I can't sue microsoft for a bug in windows just like I can't sue apple for a scratch in my ipod. But we're not talking about consumer worlds here. I'm talking about the business world.

      When a commercial solutions provider implements a solution for me, I can sue them. Second, Microsoft and Apple get class-action suits all the time.

      But all of that is still not what I'm talking about. I'm saying simply this. When a Microsoft or Apple programmer screws up, they risk losing their job. When a volunteer and often anonymous programmer screws up, they lose absolutely nothing. And what's more, where's the security in open source if a programmer can cause these sorts of problems? Forget security in the end product, what about security in the non-existent office?

      The first thing that I tell my clients is that their database can't be any more secure than the lock on the office door.

    11. Re:Why open source doesn't work for business by holophrastic · · Score: 1

      Again, as everywhere else, someone loses their job. And class-action exists for a reason.

    12. Re:Why open source doesn't work for business by Surreal_Streaker · · Score: 1
      So who's accountable for damages as a direct result of such a problem? ...blah blah blah

      You are.

    13. Re:Why open source doesn't work for business by gnuman99 · · Score: 1

      NSA has a much easier time inserting backdoors into Windows than in open source. And what about the backdoor to Firebird database that was only discovered after Borland open sourced it?

      If you just want blood, you will NOT get it from Microsoft if their random number generator sucks. And it did, for a long while. The most damages you are entitled to is a refund of your purchase price. Want more?? Better get insurance or lucky with jury. And if you do get lucky, and if I were microsoft, I would sure require you and anyone connected with you to NEVER use the software every again (remove you explicitly from licensing in future)

      The error here was 2 lines of code that upstream said were ok to remove (at least some people upstream :). See Debian advisory for upstream link.

    14. Re:Why open source doesn't work for business by gnuman99 · · Score: 1

      Then you are telling them a wrong thing. A database can be much more secure than the lock on the office door. Encrypt the filesystem and require passkey to startup the filesystem (NOT on the machine!). That way, you can't just go into the office, and steal it (the data). So since you apparently don't know that, and if someone steals their box and takes their data, can they sue you for not encrypting the disk??

      In a class action, you can't get more than the product value anyway. So the point is moot. And people suing Apple or Microsoft are idiots in the first place.

      Sure, you can sue the debian developer, or debian, or whoever the hell you want. And no, you will not get ANY money back and just get a huge public backlash.

      Finally, I don't think you will win any modpoints calling the slashdot community stupid! Does that make you stupid as well? ;-)

    15. Re:Why open source doesn't work for business by totally+bogus+dude · · Score: 1

      I can be absolutely certain that any malicious code in Windows is from someone who works for Microsoft.

      Really? Absolutely certain is a very strong phrase! You're absolutely certain that every single line of code that winds up in a released product out of Microsoft has been peer reviewed by someone with a good understanding of the software, and a manager or someone has personally verified that the developer whose name is against that code in their source control system did in fact make the change? For every single bit of code in every single product, every single time any kind of release is made? And that the code in source control is in fact the code that was used to compile the release build, and no nasty hacker with knowledge of the processes got into any of the systems involved to plant their own code?

      I'm sure they have stringent checks and plenty of security in various forms in place, but I'm not absolutely certain that they will always work 100% of the time.

      Besides, I'm not sure that really matters. The change was made by a Debian developer, not some random Joe, and so is equivalent to someone at Microsoft deciding to make the change. Given it was a "simple fix" to make the valgrind output look nice, I don't see any particular reason why this kind of mistake couldn't happen at a commercial shop, even Microsoft. In fact, I'd suggest that a place like Microsoft would have very strict requirements that every build passes a variety of automated tests of the valgrind variety, as they release a crapload of software and it's essential they maintain same base level of code quality. That would increase the likelihood of a seemingly innocuous change in order to comply with code auditing programs resulting in problems, which may not be identified by the user test scripts.

      Besides which, as others have pointed out in related threads, firing a talented and productive developer because they made a mistake will eventually result in you having very few talented and productive developers left. Also, all of this "accountability" is an effective way of rewarding those who cover up their mistakes, and punishing those who admit them. Both on an individual level (blame shifting etc.), and on a corporate level (not announcing critical security fixes if the flaw isn't already generating a lot of bad publicity).

    16. Re:Why open source doesn't work for business by Minwee · · Score: 1

      Wow. That's so cute.

      You actually seem to believe that you are not only a customer of Microsoft, but that your happiness somehow matters. You probably think that TV stations should support programs you like because you are their customer too. You even used the phrase "class-action suit" as if it was something big and scary.

      Microsoft is interested in one thing: Making money. If they can cut corners without losing their multi-bazillion installs every year through Dell, then they will do it. If that happens to piss off a number of self-styled security experts and drives them off to use a third party product, then that just means the corporation has to spend less time and money supporting them. It's not about "doing the right thing" or "making code for code's sake", it's about shipping a whole lot of product and making money off of it.

      Given the choice between putting in a one line hack that makes a number of very obvious and potentially embarrassing profiler warnings go away and assigning enough people to make a proper change, a project which could take weeks or months, when nobody is ever going to notice the difference until long after next quarter's financials have come in, and the seven quarters after that, why do you believe that a large corporation is somehow going to be motivated to spend extra money when they don't need to?

    17. Re:Why open source doesn't work for business by holophrastic · · Score: 1

      So who got fired for the problem? Who lost their job? Or their bonus?

      I'm not saying that I need to get money when something doesn't work to perfection. I'm saying that someone is held accountable not out of my need for revenge, but out of the very simple concept that actions should have consequences -- both negative and positive ones.

    18. Re:Why open source doesn't work for business by holophrastic · · Score: 1

      I'm not asking for accountability out of a sense of revenge. I'm simply saying that actions benefit from consequences -- negative and positive alike.

      Regarding the database, no one ever said stealing the data involved stealing the machine. The database is a live server, running, with data loaded. Not only can someone find the unencrypted data in active memory during decryption, but someone sitting there can simply use the interface directly. Second, any encryption can be broken, especially if you have unlimited time to do so. Stealing the machine and taking it away gives you all the time in the world. And finally, not all data is always encrypted all the time. Even that data is private, confidential, secret, or valuable.

      And yes, if I weren't encrypting the credit-card data, and it got stolen, I would be sued by a dozen clients. And not only do I agree with that, but I offer that accountability voluntarily. They have a very simple choice. They can trust that I've done things correctly, or they can go and hire someone to check. If they trust me, they pay me that extra money, instead of someone else.

    19. Re:Why open source doesn't work for business by gnuman99 · · Score: 1

      If your entire life is "who pays in blood for a mistake", then you live a very very sad life.

      "I'm saying that someone is held accountable not out of my need for revenge"

      All your posts ARE about REVENGE. I think you should crawl under the rock you slithered out of as you do not seem to provide any constructive criticism at all.

    20. Re:Why open source doesn't work for business by holophrastic · · Score: 1

      I specifically said that it's not about revenge. I said it's about holding people responsible and accountable for their actions and decisions. I wouldn't want to live in a world without consequences -- that's a religious world, where credit and blame are conveniently shuffled off to an imaginary creature.

      But if you're saying that you prefer to live in a world where you acn make mistakes willy-nilly and not be held accountable for them, then clearly you do shotty work at best, and are not to be trusted with anything important.

    21. Re:Why open source doesn't work for business by holophrastic · · Score: 1

      That's not what I said. What I said was that given the choice between making a change that is sure to cause public mayhem, and one that won't, anyone trying to ship product will choose not to anger their entire market. In the case where an employee makes the opposite decision, that employee will be held responsible for going against the company's interests. It's got nothing to do with me as the customer, it has everything to do with us as the market.

    22. Re:Why open source doesn't work for business by holophrastic · · Score: 1

      I never said you have to fire the person, I said you get to hold them accountable. Please see the difference. Bonusses, vacations, required to stick-around and fix things late, reference letters, reduced salary, demotion, fringe benefits, allowances, assistants, and general trust.

      And yes, I'm absolutely certain that the code was written by someone who works for microsoft, doesn't have to be a manager, can be a lowly programmer, but the point is that it's still someone who can be held accountable for mistakes.

    23. Re:Why open source doesn't work for business by totally+bogus+dude · · Score: 1

      I never said you have to fire the person

      So when you said When a Microsoft programmer makes a mistake, they risk losing their job. you meant they risk misplacing their job, and not being able to find it again? Okay... :)

      I said you get to hold them accountable

      Yes, and any kind of meaningful accountability is going to have negative consequences for the person or people involved. If a lowly programmer makes a mistake, their manager and their manager's manager are going to held accountable as well, because it's their responsibility to ensure there's procedures in place to prevent mistakes being released and ensure the procedures are always followed.

      So either the accountability is such that there's going to be a strong incentive for those involved to hide mistakes whenever possible; or the accountability is going to be on the same level as for open source software and therefore, according to you, either meaningless or non-existent.

      Furthermore, you're assuming the person responsible still works at the company. 2 years is a long time for a programmer to spend in one job, and there's plenty of stupid security flaws and other bugs that are way more than two years old.

      Here's the things you suggested:

      Bonusses, vacations,

      It's likely people will be very keen on retaining both of these, and not many people are going to be keen on signing contracts that say the company might deny your vacations on a whim.

      required to stick-around and fix things late,

      This assumes there's some kind of punishment for not staying 'til late, and can apply just as much to open source software -- so long as you're actually willing to follow through with a meaningful punishment. "Fix it or you're off the project."

      reference letters,

      A lot of open source coders will use their open source work in their CVs. I'm sure the Debian openssl maintainer used to have that on his CV. Do you think he'll be so keen now, knowing that when any potential employer searches the 'net for info on his involvement they're going to find out he introduced a bug which rendered all Debian-generated keys compromised for 2 years?

      Also it's worth noting that this information is public and easy to find. Employers providing reference checks will usually limit themselves to confirming that the individual worked their in a particular position, and not make any comments on their job performance. It's just too dangerous, and the company doesn't benefit from doing so. Even if Microsoft does fire a programmer for writing really bad code, all anyone else will know is that they did in fact work at Microsoft on such-and-such a project for a period of time. Most employers would see that as a good thing. If the person involved thinks the people at Microsoft will actually warn people not to hire them - as unlikely as that is - then they can simply leave their time at Microsoft off their resume. Say they took time off to find themselves, or whatever. Or simply make sure the reference they provide likes them and will say nice things.

      So in terms of accountability for future positions, there's virtually none in the commercial world because your blunders aren't going to be publicised for the world to see. You screw up in free software and it's going to be all over mailing lists and tech sites. Any time you apply for a job or contribute to another project, you have to be prepared to be asked "wtf happened with such-and-such a project". For the rest of your life. If anything, there's too much accountability for mistakes in free software.

      Using this particular case as an example, the Debian maintainer made a pretty innocent mistake. This could happen to anyone. However, it was both a) in a very important package and b) not noticed for a very long time. Tiny innocent mistake is now a big black mark against his name for the rest of his life. If the

  51. Re:It will be fixed by eean · · Score: 4, Informative

    Check out this bug report and tell me they weren't just being arrogant:
    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=363516

    Says the first comment to the patch, in regards to what is being reversed:
    "What it's doing is adding uninitialised numbers to the pool to create random numbers."

    OpenSSL having more-random numbers vs. Valgrind looking good. And Valgrind won?

    The consensus in the bug report seems to be not to do it, but then someone adds the patch anyways.

  52. interdiff by Anonymous Coward · · Score: 0

    The patch was:

    --- openssl-0.9.8c/crypto/rand/md_rand.c
    +++ openssl-0.9.8c/crypto/rand/md_rand.c
    @@ -271,10 +271,7 @@
                    else
                            MD_Update(&m,&(state[st_idx]),j);

    -/*
    - * Don't add uninitialised data.
                    MD_Update(&m,buf,j);
    -*/
                    MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c));
                    MD_Final(&m,local_md);
                    md_c[1]++;

    What is this?  Why would Debian ever make such a change?  This is either arrogance or malicious.

    1. Re:interdiff by lukas84 · · Score: 2, Insightful

      Never attribute to malice that which can be adequately explained by stupidity.

    2. Re:interdiff by bdcrazy · · Score: 1

      Why would Debian ever make such a change? Must get rid of all compiler warnings. If it compiles without error or warnings, turn it in!
      --
      Tonights forecast: Dark. Continued dark throughout most of the evening, with some widely-scattered light towards morning
  53. Re:It will be fixed by robot_love · · Score: 1

    True enough.

    I considered, "So, you're luvin' whichever operating system you prefer, then?" as a punch line, but it didn't have quite the same effect. I'll try to be a little more vendor/ideology neutral when crafting nerd jokes in the future.

    --
    .there is enough of everything for everyone.
  54. Does SSH not use /dev/random? by vincecate · · Score: 1

    I thought /dev/random used several sources of randomness. Does SSH not use /dev/random?

    1. Re:Does SSH not use /dev/random? by eddy · · Score: 1

      This is what I want to know. I have a hardward-rng seeding /dev/random, so why the hell are openssl playing around with uninitialized memory instead of just drawing from the source?

      May 13 20:14:22 xxxxxxxx rngd[2534]: stats: bits received from HRNG source: 60700064
      May 13 20:14:22 xxxxxxxx rngd[2534]: stats: bits sent to kernel pool: 60601536
      May 13 20:14:22 xxxxxxxx rngd[2534]: stats: entropy added to kernel pool: 60601536
      May 13 20:14:22 xxxxxxxx rngd[2534]: stats: HRNG source speed: (min=363.948; avg=2004.798; max=2205.426)Kibits/s
      May 13 20:14:22 xxxxxxxx rngd[2534]: stats: Time spent starving for entropy: (min=0; avg=0.000; max=0)us

      Well 'duh' you're never starved if the one package that should really use you, doesn't :-(

      --
      Belief is the currency of delusion.
    2. Re:Does SSH not use /dev/random? by vrmlguy · · Score: 5, Informative

      The problem is, OpenSSL needed a buffer in which to XOR several sources of randomness, including /dev/random. OpenSSL didn't bother initializing the buffer, because doing so just eats CPU cycles, and a possibly random buffer is marginally better than a non-random one. However, the Debian patch removed *all* of the randomness except for the PID, leaving the user with one of just 262148 (or so) distinct keypairs. The tool that checks if your keys have been conpromised has a list of all of those keypairs and checks if your keypair appears.

      --
      Nothing for 6-digit uids?
    3. Re:Does SSH not use /dev/random? by eddy · · Score: 1

      >The problem is, OpenSSL needed a buffer in which to XOR several sources of randomness

      Doesn't make any sense. The output of /dev/random isn't going to become any more random by XORing other streams into it. The whole purpose of /dev/random is that software won't have to reinvent/ad-hoc a stream of randomness. If openssl needs entropy, it should just read from /dev/random, period. If they'd done that, there'd been no valgrind warning, and no asstastic patching.

      IANAC, but I sometimes pretend to know some basic shit about security and cryptography.

      --
      Belief is the currency of delusion.
    4. Re:Does SSH not use /dev/random? by vrmlguy · · Score: 1

      You're assuming that /dev/random isn't buggy. A flaw in the implementation would render SSH insecure.

      --
      Nothing for 6-digit uids?
  55. Re:It will be fixed by imbaczek · · Score: 5, Informative

    Not entirely true. Keys generated before the patch made it to the repos are safe - and I think quite a lot of debian boxes are old enough (I know I've got one.) There's a link in the advisory to a tool that checks if the keys are vulnerable.

    This doesn't change the fact that this is a really serious fuckup. Debian lost quite some credibility in my eyes.

  56. Don't underestimate corporate arse-covering by zooblethorpe · · Score: 4, Insightful

    If some coder did this at a company at least I'm pretty confident they'd get their ass fired, but with open source it's basically "whoops, my bad."

    I, on the other hand, strongly suspect that any similar mistake at a major software corporation would in all probability be quietly ignored, if it were even noticed at all -- and if it were instead deemed enough of a public relations risk to warrant dealing with, the company would likely just silently push an update to correct the problem for future users, leaving anyone using extant keys with their arses hanging in the breeze.

    But maybe I'm just being overly cynical. :-\

    Cheers,

    --
    "What in the name of Fats Waller is that?"
    "A four-foot prune."
    1. Re:Don't underestimate corporate arse-covering by Omnifarious · · Score: 2, Insightful

      I think you are completely correct and that this is exactly what would happen in most cases with software that came out of a corporation. I don't think you're being cynical at all, just realistic.

    2. Re:Don't underestimate corporate arse-covering by CrazedWalrus · · Score: 1

      I'd like to add a "me too". I've seen mistakes at large corps that involved real money. No one got fired. They just fixed the problem and moved forward.

      Now, if there's a *pattern* of this type of thing happening, or if it were shown to have been *malicious*, that's quite a different story. Usually though, it's just a mistake, and everyone makes them from time to time. You can't go around firing the people who know your system because they make a mistake. Small, innocent mistakes can have disproportionately massive consequences, so you have to look more at the size of the mistakes and not so much the size of the consequences when deciding to let someone go because of it.

    3. Re:Don't underestimate corporate arse-covering by canuck57 · · Score: 1

      You are not being cynical at all.

      In fact, you are being kind. I know of commercial products that do worse, put the hashes in an open socket with no access controls or on a custom attribute in LDAP, world/anonymous readable no less.

      Their security fix in the LDAP case was to move the service to port 1389....still anonymous and open.

      Plus how easy would it be to guess this key with this defect? I haven't seen much on that. So what if it takes an average of 10 years instead of 1000 years on a high speed 1000BT network for a 50/50 chance of getting the key... So how easy is it to crack the key for real?

      The best part is this is open source, it will be patched quickly I suspect.

    4. Re:Don't underestimate corporate arse-covering by CrazyKen · · Score: 1

      I agree, for the most part, and this is what happens in today's closed source world. Vendors want bugs regarding their software to be silent until they patch it. Even after it's patched, their security advisories, changelog, and patch notes don't go in to great detail regarding the issue. In today's open source world, bugs are mentioned and fixed in a timely fashion.

    5. Re:Don't underestimate corporate arse-covering by ztane · · Score: 1

      Plus how easy would it be to guess this key with this defect? I haven't seen much on that. So what if it takes an average of 10 years instead of 1000 years on a high speed 1000BT network for a 50/50 chance of getting the key... So how easy is it to crack the key for real?

      The Debian utility that detects vulnerable keys has fingerprints of 1024 and 2048 bit SSH keys, DSA and RSA... 65536 each I presume. We had 5 of our SSH keys on that list. So instead of generating 2^100 distinct keys, the code did 65536. And because they know the fingerprints of the public keys, they must have had access to the private keys. Even to those our backup system used for passwordless authentication on our remote system. So all you really need to do is to create those 65536 private keys, guess a username with a key in authorized_kkeys and then brute force a connection to a Debian box. Furthermore, you can find more hosts that might use the same key... by just looking at the hacked accounts known hosts! It would be extremely easy.
    6. Re:Don't underestimate corporate arse-covering by pjt33 · · Score: 1

      Since you didn't link it, the utility is question is at http://security.debian.org/project/extra/dowkd/dowkd.pl.gz, and a GPG signature can be obtained by appending .asc to that URL.

  57. The stack has randomness? by Anonymous Coward · · Score: 0

    I'm pretty sure it was getting the memory off the stack

    And when main() calls foo() calls bar() calls do_random_seed() the stack is going to be different from the next run when main() calls foo() calls bar() calls do_random_seed()? Last I checked, apache starts with the exact same commandline parameters every time I run apachectl start.

    1. Re:The stack has randomness? by Goaway · · Score: 1

      Actually, looking closer, the real problem was not that they removed the uninitialized memory use (which was just there because it couldn't hurt with a little extra randomness), but that they also removed OTHER sources of randomness due to incredible stupidity.

  58. Keeping port 22 firewalled helps by gnuman99 · · Score: 1

    I'm glad I keep port 22 firewalled, except from specific hosts. The largest problem is the CA certificates though...

    Are encrypted file systems affected?? cryptsetup for example?

    1. Re:Keeping port 22 firewalled helps by Stephen+Williams · · Score: 1
      Grabbed from one of my Debian boxes:

      [thalassa.~] ldd =cryptsetup
          linux-vdso.so.1 => (0x00007fffd55fe000)
          libpopt.so.0 =>; /lib/libpopt.so.0 (0x00002b5ad54f0000)
          libdevmapper.so.1.02.1 => /lib/libdevmapper.so.1.02.1 (0x00002b5ad56d4000)
          libuuid.so.1 => /lib/libuuid.so.1 (0x00002b5ad58eb000)
          libc.so.6 => /lib/libc.so.6 (0x00002b5ad5af0000)
          libselinux.so.1 => /lib/libselinux.so.1 (0x00002b5ad5e38000)
      /lib64/ld-linux-x86-64.so.2 (0x00002b5ad54b8000)
          libdl.so.2 => /lib/libdl.so.2 (0x00002b5ad6053000)
      It isn't linked against libssl or libcrypto, so it's safe. Encrypted block devices use the kernel's internal crypto libraries which are completely independent of OpenSSL.

      -Stephen
    2. Re:Keeping port 22 firewalled helps by setagllib · · Score: 1

      Only the private keys like RSA and DSA are affected. Unless you use that to protect an otherwise exposed key for cryptsetup, no, crypsetup is unrelated.

      But another way of saying this is, because of this vulnerability, everyone is potentially harmed, and many machines have probably already been exploited. The vulnerability basically reduces a very large key search space to a small one. Given your public key, an attacker could find the private key in a relatively short time.

      --
      Sam ty sig.
  59. Re:It will be fixed by appelza · · Score: 1

    Not "Or any other distro" in this case, this is a 'debian way' result.

  60. Re:It will be fixed by Archangel+Michael · · Score: 1, Insightful

    As the other guys have stated, but stating it myself for clarity:

    1) They shouldn't have messed with the NON-BROKEN Source (which every other distro uses), without testing it better.

    2) I use whatever works, currently I have Ubuntu on my kids computers, Windows and SUSE and Mac OS and BSD at work. I'm more of a utilitarian; computers are nothing more than tools. Right tool for the job, makes all the difference in the world.

    3) Reputations are hard to come by. Good ones are hard to maintain. I'm sorry for Debian, because they lost a tad bit of credibility on this one, in my book.

    --
    Agent K: A *person* is smart. People are dumb, stupid, panicky animals, and you know it.
  61. You are funny by FranTaylor · · Score: 2, Insightful

    Read the end-user agreements for your commercial software and you will see that you have no right to sue them for anything beyond the purchase price of the software.

    1. Re:You are funny by holophrastic · · Score: 1

      That's not true. For so many reasons. If it were, you'd never have class-action issues. But that's not really what I'm talking about.

      A real corporate is accountable because people lose jobs, stock prices fall, companies go bankrupt.

      Open source developers just walk away from their hobby. There's no reason to even feel bad about it.

    2. Re:You are funny by Zaiff+Urgulbunger · · Score: 1

      Open source developers just walk away from their hobby. There's no reason to even feel bad about it. I don't believe that lower-level code such as this is just someone's hobby! Most, if not all, people contributing this code will be working within the industry and may well be sponsored by their employer. Not only that, these people are undoubtedly IT nerds through and through, who will at the very least feel personally responsible for any bugs they introduce.

      No repercussions? Well, probably not for a single bug, even a big one like this, but on the other hand, you can only screw up so many times before you loose credibility.

      Also, in another of your replies, you've implied that anyone can just contribute code and have it accepted. AFAIK this is not the case. You really need to work to gain the respect of your peers in order that they'll even look at your contributions let alone include them. Saying that, not all projects are equal... I suspect many less critical projects would be easier to contribute to.

      But again, does this differ on any practical level with commercial software? If I work for (say) MS, and introduce a vulnerability somewhere, it isn't any more likely to be discovered than with FOSS. At least with FOSS, more people *could* look at the code.

      I must admit, I'm struggling to understand what point you are trying to make! It is true that a commercial product with a serious bug could impact the business in that they *might* get sued and/or loose market share to a competitor.... *BUT* this doesn't appear to make such a bug any less likely. So, why are you searching for some kind of accountability? How does that help you? What are you looking for in a product?
  62. Fixed now! by khasim · · Score: 1

    I just updated again and they fixed the package.

  63. Bug found & fixed -- "many eyes" seems to work by zooblethorpe · · Score: 3, Insightful

    And we were told this sort of bug could NEVER happen in an open source operating system. Seriously, this is a major cockup.

    First off, we were not told any such thing -- or at least I've never run across any such claims myself. Secondly, this would actually seem to substantiate the many-eyes theory, as the bug was found and summarily corrected, rather than never found, or found and swept under the rug, or found first by black-hats and exploited, all of which seem quite common in the proprietary software world.

    The many-eyes model does not guarantee zero bugs, nor does it guarantee speedy bug hunting. However, it would seem to guarantee that bugs will be found eventually, and also that they will be dealt with in some productive way once they are found. This model aims for the opposite of security through obscurity, that hoary old chestnut of proprietary development, by instead ensuring security by knowing exactly what things do. That also means that folks need to go through all changes -- i.e., many eyes actually need to go over the code. Open source ensures that this is possible, but actual people still need to put in the time and effort.

    Cheers,

    --
    "What in the name of Fats Waller is that?"
    "A four-foot prune."
  64. Re:It will be fixed by fwarren · · Score: 1
    Or as in my case, my keys were generated on Slackware and RHEL4 back in 2005. I think I will be just fine.

    On the other hand, I met, dated and got Married since 2006. My wifes ssh key is "Debian compromised". Looks like I have some work to do....

    --
    vi + /etc over regedit any day of the week.
  65. Re:It will be fixed by truthsearch · · Score: 5, Funny

    My wifes ssh key is "Debian compromised". Talk about an easy key to guess! At least throw in some numbers or something. ;)
  66. Degree of Compromise? by ewhac · · Score: 5, Interesting
    Does anyone have any back-of-the-envelope calculations as to how badly this compromises existing keys? That is to say, about how long is the brute-force lifetime shortened? If it's been shortened from the age of the known universe to 300 hours, then that's a problem I need to address fairly immediately. OTOH, if it's been shortened to one-quarter the age of the known universe, then I'm not going to deal with this before I've had more coffee...

    Schwab

    1. Re:Degree of Compromise? by spinkham · · Score: 1

      Ubuntu ships with a list of 98307 known bad SSH-DSA keys. I don't know if this list is exhaustive, but if it is, that's really a vanishingly low number of possibilities to try to brute force. Might want to put down that coffee...

      --
      Blessed are the pessimists, for they have made backups.
    2. Re:Degree of Compromise? by noahm · · Score: 1

      The DSA contains a link to http://security.debian.org/project/extra/dowkd/dowkd.pl.gz, which can examine an ssh authorized_keys file (among other things) and let you know which, if any, keys are weak.

    3. Re:Degree of Compromise? by Anonymous Coward · · Score: 1, Interesting

      Since all the random data isn't being used, openssl only uses the processID as a random seed, thus for every ssh key type there are 2^15 possibilities.

    4. Re:Degree of Compromise? by Anonymous Coward · · Score: 0

      This a really important point - I have read that this is 'trivially crackable' but what that means in reality is crucial to know for systems administrators, companies that have been using this patch. Do root kits need to be deployed and run to re-assure?

    5. Re:Degree of Compromise? by multi+io · · Score: 5, Informative

      If I read the published "weak key detector" script correctly, Debian OpenSSHs will always generate one out of a fixed set of 262148 possible keypairs. Do the math yourself. If you know those keys, this is a 5-minute brute force attack.

    6. Re:Degree of Compromise? by Anonymous Coward · · Score: 0

      does rkhunter or something similar need to be deployed, sorry said just root kit in previous post.

    7. Re:Degree of Compromise? by vrmlguy · · Score: 1

      Arrgh! The script uses the DB_File module, which I don't seem to have installed on any of my boxes. That's going to slow me down a bit.

      --
      Nothing for 6-digit uids?
    8. Re:Degree of Compromise? by ewhac · · Score: 1
      I concur with your evaluation. I've regenerated my host keys. Now I can get back to my coffee...

      I can hardly wait to see the SSH logs on my FreeBSD server at home tonight...

      Schwab

    9. Re:Degree of Compromise? by prockcore · · Score: 1

      Let me put it this way, the test script, dowkd.pl has an 8 meg __DATA__ block that contains every key-signature possibly generated by this screwed up SSL.

      The problem has been reduced to a matter of milliseconds.

    10. Re:Degree of Compromise? by Anonymous Coward · · Score: 1, Insightful

      If you know those keys, this is a 5-minute brute force attack. We do know the keys, so it's not a 5-minute brute force attack.

      It's a 5-microsecond table lookup.
    11. Re:Degree of Compromise? by cygonik · · Score: 1

      It's shortened approximately from the age of the known universe to a bit over 10 minutes. See http://taint.org/2008/05/16/165301a.html, which has some useful info.

      --
      I am not an atomic playboy.
    12. Re:Degree of Compromise? by cygonik · · Score: 1

      (noticing my sig)

      *snicker*

      --
      I am not an atomic playboy.
  67. Is it good enough now? by Animats · · Score: 2, Insightful

    Has someone actually checked the random output for cryptographic soundness?

    The proper source of cryptographic-quality random bits in Linux is "/dev/random". Reading uninitialized memory is not a good source of entropy - it might be initialized to some constant value, especially if you're compiling with a debug allocator or running under a virtual machine monitor.

    OpenSSL makes substantial efforts to get a good random starter. Unless someone did something so stupid that OpenSSL didn't use /dev/random, it should still work. OpenSSL is supposed to have a check for bad random seeds. Was that bypassed, or doesn't it work, or what?

    Obtaining a good source of randomness is hard. Computers are rather deterministic. Historically, there have been major failures in this area. See "Venona" where the USSR was generating "one-time pads" by having people type random digits on typewriters. Arlington Hall, NSA's predecessor, cracked that. Humans aren't random enough. True random number generation requires special hardware, like a noise diode or a radiation source.

    "Any one who considers arithmetical methods of producing random digits is, of course, in a state of sin." -- John von Neumann

    1. Re:Is it good enough now? by IamTheRealMike · · Score: 1

      Well apparently, the patch that removed the uninitialized memory as a source of randomness, managed to remove lots of other sources (all of them?) as well. So it sounds possible that /dev/random isn't used either, yes.

    2. Re:Is it good enough now? by Animats · · Score: 1

      So where's the diff and check-in info of the idiot who took the checks out? Do we have a background check on them?

    3. Re:Is it good enough now? by IamTheRealMike · · Score: 1

      It's Debian, I don't think they background check at all. For the longest time the official Debian Wine packager worked for TransGaming, a company with very clear financial motives to make Wine not work well. It wasn't exactly a secret.

      I'm sure it was just an accident, but for all we know, the guy could be working for the Russian mafia.

  68. correct me if I'm wrong by Deanalator · · Score: 4, Interesting

    From this log: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=363516
    It looks like openssl is pulling in "entropy" from uninitialized memory, causing valigrind to complain. The debian maintainer "fixed" this issue by memsetting the buffer to zero.

    My question is, wouldn't I see the same behavior using grsecurity to scrub deallocated memory? From what I am seeing, this looks much more like the fault of the openssl team.

    1. Re:correct me if I'm wrong by Anonymous Coward · · Score: 0

      This is indeed not correct. The memset patch zeroes the buffer before reading random data into it. It therefore eliminates a valgrind warning without compromising security. The change actually committed was entirely different.

    2. Re:correct me if I'm wrong by LearnToSpell · · Score: 1

      From what I am seeing, this looks much more like the fault of the openssl team.

      Yeah, those bastards! I also blame the ALSA team, the Samba team, and the New York Knicks.

    3. Re:correct me if I'm wrong by hackstraw · · Score: 3, Interesting

      It looks like openssl is pulling in "entropy" from uninitialized memory, causing valigrind to complain. The debian maintainer "fixed" this issue by memsetting the buffer to zero.

      If you look further down the code, it then fills up the buffer with stuff from some random device (/dev/random /dev/urandom, or other things found in ./configure).

      AFAIK, all modern Linux implementations have /dev/urandom and isn't that enough entropy for a seed?

      I only spent a minute looking that the code and the diff in the parent's post, but this is looking not to be a bug to me. But, like I said that I didn't look at the code that long, but I don't see where memsetting the memory makes any difference if its all being overwritten.

    4. Re:correct me if I'm wrong by annodomini · · Score: 4, Informative

      No, I don't think you're quite correct. The original patch in that thread is not what actually was applied. There are two functions, one for seeding the pseudo-random number generator, and one for getting random data out of it. The one for getting random data out was actually mixing in some uninitialized data into the entropy pool. This is not particularly harmful, but not particularly helpful either, and it caused Valgrind to complain. So, the maintainer removed that line, but also removed the line that mixes in the value provided to seed the random number in the first place (maybe it was being called with unitialized data at some point, too).

      See my comment here for more details: http://reddit.com/info/6j7a9/comments/c03zxko

  69. Might as well... by GeekDork · · Score: 1, Funny

    OK, this is as good a place as any.

    FUCKING IDIOT NOOB ASSHOLES!!!!!1!

    --

    Fight hunger. Filet a politician and send him to a 3rd world country of your choice.

    1. Re:Might as well... by Shadow-isoHunt · · Score: 1

      I KNOW! Fucking AWPs...

      --
      www.isoHunt.com
  70. What does "guessable" mean here? by Kent+Recal · · Score: 2, Insightful

    Can someone explain what "guessable" means in this context?

    Does that mean someone can now generate a "master-key" and ssh into root@any-debian-box that allows public key authentication?
    What does a realistic attack scenario look like?

    1. Re:What does "guessable" mean here? by Yogiz · · Score: 0

      I'm not an expert but I think that when the randomness that is used to generate the key turns out to be non-random, then the potential keyspace becomes extremely small. So small, that you might be able, in theory, to brute force it as there are not that many possibilities. Correct me if I'm wrong.

    2. Re:What does "guessable" mean here? by Yogiz · · Score: 0
      The security advisor at linuxsecurity.com seems to confirm that this is how it works:

      A weakness has been discovered in the random number generator used by OpenSSL on Debian and Ubuntu systems. As a result of this weakness, certain encryption keys are much more common than they should be, such that an attacker could guess the key through a brute-force attack given minimal knowledge of the system. This particularly affects the use of encryption keys in OpenSSH, OpenVPN and SSL certificates.
    3. Re:What does "guessable" mean here? by Yvanhoe · · Score: 4, Informative

      From what I undestood, with my limited cryptographic knowledge and my total reluctance to dig into all the details of the sources, what happens is that when you asked your debian box to generate a key, it did so without integrating enough random data in its choice. That means that a brute force attack will not have to try every key to find yours but only a small subset, depending on the knowledge it has about your machine and its state when it generated the keys.
      There is no such thing as a master key, but it would mean that several different servers may have generated the same "random" keys and that a clever attacker could create a dictionary of plausible keys (or, more plausibly, an algorithm to generate them) and try all of them on your server with a good chance to have one of them working. The dictionary would probably be huge however. A good measure would be to block an IP on SSH after a reasonnable number of failures (like 100)

      --
      The Wise adapts himself to the world. The Fool adapts the world to himself. Therefore, all progress depends on the Fool.
    4. Re:What does "guessable" mean here? by Kent+Recal · · Score: 2, Interesting

      Thanks to you and the other guys who responded and confirmed.
      I have now patched my firewall and ssh config to (hopefully) limit any bruteforcing to one attempt per minute: /etc/sshd/sshd_config
      MaxAuthTries = 1 /root/bin/firewall
      iptables -I INPUT -p tcp --dport 22 --syn -m limit --limit 1/minute -j DROP

      Ofcourse what remains is the question of how many attempts would be realistically needed to break a weakened key?
      I'm eager to see the first proof-of-concept exploit.

    5. Re:What does "guessable" mean here? by LordSnooty · · Score: 2, Informative

      SSHDFilter may help in this regard. Everyone should be taking steps to limit brute-force ssh attacks even without this current issue.

    6. Re:What does "guessable" mean here? by Anonymous Coward · · Score: 0

      A good measure would be to block an IP on SSH after a reasonnable number of failures (like 100) fail2ban does just that
    7. Re:What does "guessable" mean here? by caluml · · Score: 1

      This sounds like a very reasonable explanation. Of course, I think it means that unless you use public key auth in SSH ( do any of your users have any keys in ~/.ssh/authorized_keys2 ), then it can't affect you, as there is no key to "guess".

    8. Re:What does "guessable" mean here? by Serious+Callers+Only · · Score: 1

      As I understand it, the keys which are generated on debian/ubuntu are the ones which are affected, so depending on the source of public keys in authorized_keys, they might not be vulnerable.

      The keys which are guessable for every server will be those which identify the server to clients, making it possible to do a man in the middle attack, impersonating the server (if you can guess the key and intercept a client trying to log in by poisoning DNS).

      Most people will generate their keys on a local machine (which could be OS X, Linux, whatever), and upload the public one to login with, and those keys would not be vulnerable necessarily, they'd only be vulnerable if created on a debian derivative (ubuntu).

    9. Re:What does "guessable" mean here? by Ernesto+Alvarez · · Score: 1

      A good choice, sure. But there is another avenue of attack.
      SSH and SSL also generate temporary keys, nonces and such. An attacker that sniffed a session in the past could in theory analyze the captures and guess the session keys. With that, they could sniff your session. You might want to change your passwords too.

      I've had an awful day at work, and it looks like tomorrow will be worse.

    10. Re:What does "guessable" mean here? by elronxenu · · Score: 2, Informative

      What you are doing here is dropping only one packet per minute (with a maximum burst of 5 by default). The opposite of what you intended.

      To make it work the way you intended, you need two rules:

      iptables -I INPUT 1 -p tcp --dport 22 --syn -m limit --limit 1/minute -j ACCEPT
      iptables -I INPUT 2 -p tcp --dport 22 --syn -j DROP

      The limit rule runs first, accepting an average of 1 syn packet per minute. If the rate is exceeded then the rule fails and the DROP rule runs, which drops all further attempts to connect to ssh.

    11. Re:What does "guessable" mean here? by Antique+Geekmeister · · Score: 1

      Except that if you can brute force the *host* keys, you can create a man-in-the-middle attack that the user cannot easily tell does not go to the same host they've always been contacting.

      Of course, most SSH users don't care much about that 'your hostkey has changed, are you sure you want to contact this?' dialog, and automatically click yes or update their 'known_hosts' table, assuming that the server has been replaced without their knowledge. In fact, that's what's going to happen on every Debian or Ubuntu server that change its host key right now.

      This sort of vulnerability is why security needs to be layered: SSH's habit of providing full file-system access to SSH, SCP, or SFTP clients needs to be balanced in its risk against having a properly encrypted access channel. Once an attacker has stolen the private key, or the paword, what can they do to your system? This is why SSH is a poor choice for upload or download clients: the very limited tools to chroot client access are quite limited, so you're usually giving clients way too much access to your system.

    12. Re:What does "guessable" mean here? by Kent+Recal · · Score: 1

      Yea sorry for posting early and thanks for the correction.
      I was actually still fiddling with the rule while posting and too quick with the submit button.

  71. mod parent up by Anonymous Coward · · Score: 0

    clear explanation of incident

  72. Re:It will be fixed by profplump · · Score: 3, Insightful

    It's not arrogance. Or it's at least not arrogance alone. As a distro maintainer I can tell you that upstream providers generally do not care about distro-specific patches. Even if you have a patch that would be useful on more than on distro, there's often a reluctance to inherit code to support any installation method other than source tarballs.

    That's not to say that upstream providers are unduly arrogant either -- if you're happy with the way your build/install system works, why would you want to maintain patches for some other system that you don't even use? It's extra code to keep up, and requires more testing on more platforms, and it it doesn't make your core package any better.

  73. Re:It will be fixed by TheRaven64 · · Score: 1

    As a maintainer of some upstream code, I can tell you that I am always happy to receive patches that make life easier for one distribution / OS as long as they don't break anything for anyone else. We want your users to be our users too, so please help us make life easier for them.

    --
    I am TheRaven on Soylent News
  74. Re:It will be fixed by makomk · · Score: 1

    I think it's worse than that. Basically, it looks like they're disabling the addition of truly random data to the random pool, full-stop, by commenting out the line that does it.

  75. Re:It will be fixed by MikeyO · · Score: 4, Informative

    I think the point was that if the Debian maintainer had submitted his patch upstream, he'd have been told exactly how stupid it was.


    Actually, here is where the Debian maintainer brought this up with upstream, and he was not told how stupid it was, in fact the Debian maintainer says, "the pool might receive less entropy." and upstream says, "If it helps with debugging, I'm in favor of removing them."
  76. Re:It will be fixed by Aaron+Denney · · Score: 4, Informative

    Actually, any DSA key *used* on a box with the bad SSL packages may be compromised:

    From http://wiki.debian.org/SSLkeys

    Additionally, some DSA keys may be compromised in the following situations:

            * key generated with broken openssl = bad
            * key generated with good openssl and used to ssh from a machine with bad ssl = bad
            * key generated with good openssl and used to ssh from a machine with good ssl = good

    This is because the random numbers used during the signature process must also be good.

  77. Re:It will be fixed by RiotingPacifist · · Score: 1

    Yeah fuck all these people compiling stuff for me, its not like im too lazy to compile and patch my own system!

    --
    IranAir Flight 655 never forget!
  78. Re:It will be fixed by RiotingPacifist · · Score: 1

    Its a shame that this isnt always the case though, for example the 25 year bsd bug got reported by samba but it got bumped back at samba instead of looking into it.

    Some maintainers upstream/distro are just hard to work with, it seams premature to label all debian maintainers arrogant tho, just as it would be premature to claim that all BSD maintainers are arrogant.

    --
    IranAir Flight 655 never forget!
  79. So who was it? by Anonymous Coward · · Score: 0

    So, who's the CIA agent that implemented this "feature"?

  80. Keys generated on sarge fine by propanol · · Score: 1

    The host keys on my two file servers, generated while they were still running sarge, were OK according to the perl script provided by Debian to verify whether a key is weak or not. If you were previously running sarge and have upgraded to etch but haven't issued new keys after upgrading, you're fine (as least as far as your host keys go). The host keys on my recently installed etch workstation were detected as being weak, however.

  81. Re:It will be fixed by caluml · · Score: 1

    Debian needs to stick their ego up their ass sometimes Aye. And their stupid licencing nonsense really gets in the way sometimes. Want to install mod_security for Apache in Debian? You can't. You have to install all sorts of apache- and apr-dev stuff, and build it manually. And Ubuntu's gone and done something stupid with the init process that makes it not work as a guest in Linux Vserver.

    Gentoo - the distro that lets me do what I want, without forcing things on me. (Apart from removing XMMS with little notice. Grr. :) )
  82. Re:Strikes at the heart of the matter by Anonymous Coward · · Score: 0

    This is why I only use software that is cryptographically signed by Windows Update; that way there's someone to sue if critical security flaws are "updated" into my system.


    Read your EULA lately?
  83. Re:It will be fixed by dondelelcaro · · Score: 2, Informative

    The consensus in the bug report seems to be not to do it, but then someone adds the patch anyways.

    The package maintainer first checked with upstream about the best way to resolve this. In retrospect, it's clear that upstream didn't either understand what was being asked, or what the code was doing. In any event, another Debian Developer, Luciano Bello, later found the problem and resolved it.

    --
    http://www.donarmstrong.com
  84. Facepalm by Anonymous Coward · · Score: 0


    Facepalm

    I don't have any other words.

  85. Re:It will be fixed by dotancohen · · Score: 5, Funny

    My wifes ssh key is "Debian compromised" Say thank you that your wife is at least that far. If I dare say ssh in the wife's presence, I get a vase thrown at me and she screams for me to shut the fuck up.
    --
    It is dangerous to be right when the government is wrong.
  86. Re:It will be fixed by IamTheRealMike · · Score: 4, Interesting

    He would have been told, but who says he would have cared? This happens all the time, although usually it doesn't result in a giant fucking security hole. I was warning people this sort of thing would happen more than two years ago back when I was working on autopackage. It was entirely predictable.

    Having distributors randomly change source code as they package it is fundamentally broken. It cannot ever work. It's not just OpenSSL that's been broken like this. Wine often went through periods in which the Debian packages were completely hosed in subtle ways. It would look like a bug in Wine, but was in fact due to parts of the software "going away", because the Debian packager felt they weren't important enough to be a part of the base install. Pointing out that their change was broken didn't help. The result was many, many hours wasted tracking down non-bugs. Then you go through a giant waste of time trying to get the bug in the packages fixed, and just as you finally get it sorted out, some other distribution introduces some other bug into their packages.

    So I got sick of this, and started telling people to avoid their distros packages. Some distributors (especially Debian) took it personally and started childish slanging matches. But really, who cares how "integrated" a program is, if it could have had arbitrary bugs silently introduced? It's just a busted model of software distribution.

    Imagine if Microsoft reserved the right to modify any software for Windows in any way it saw fit! Yet that's exactly what Debian (and Fedora and Mandrake and Ubuntu) said to me - they reserve the right to make any modifications they like to the software they ship, and if upstream don't like it, tough luck.

    I wonder if they'll re-evaluate that policy in light of this disaster. Probably not.

  87. Re:Affected programs by Anonymous Coward · · Score: 0

    Who the hell let you to use English ?

  88. Re:It will be fixed by uncqual · · Score: 1

    1) They shouldn't have messed with the NON-BROKEN Source (which every other distro uses), without testing it better. In this case, it doesn't seem that traditional "testing" would have caught this problem - code review/examination (by people with the right skill/knowledge sets) is about the only way to catch something like this after the mistake has been made.

    Certainly a black eye on Debian here - it's not the distro I use and it's a little less likely that it will be in the future because of this. (So many distros, so little time...)
    --
    Why is there an "insightful" mod and why isn't it "-1"? If I wanted insight, I wouldn't be reading /.
  89. Mod parent up. by TheLink · · Score: 1

    Mod parent up.

    How do you know uninitialized = random or even different?

    You could end up reading some BIOS junk that's the same even after cold reboots.

    --
  90. Re:It will be fixed by fwarren · · Score: 3, Insightful
    I guess the real question is how many compromised keys are out there?

    Most users do not generate nor use ssh/ssl keys or certificates.

    The real questions are

    • How many clueless users are actively using these keys/ceritificates?
    • How many cluefull users are using these keys and think they are not an issue or that their keys are ok and won't fix it?
    • How many cluefull users are going to fix their keys/certificates?
    • Is someone able to develop a workable exploit?
    • Will it be worth anyones time with a working exploit to scan the internet for compressible systems?
    --
    vi + /etc over regedit any day of the week.
  91. Patched, but how do I renew all certificates? by kickmyassman · · Score: 1

    It appears to have already been patched on my Debian etch system (both kernel and libraries). Does anyone know how to force all my ssl/ssh keys to refresh? Yes, I know it'll break all the old connections, but I'd much rather know it was secure.

    1. Re:Patched, but how do I renew all certificates? by TSDMK · · Score: 1

      You need to run ssh-keygen to update the keys ssh uses. I just updated my Debian box and ran the following as root:

      ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
      ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa

      This is for SSH2 only. I got the warning of a key change when I tried logging into it again over ssh, so I guess it worked.

  92. Suppressing valgrind uninitialized warning by Myria · · Score: 1

    Is there a way to suppress specific valgrind uninitialized memory warnings without having to clear the buffer (and potentially mess up other code)? Some of my code has the same problem - valgrind whines when I encrypt a block of uninitialized memory, even though the numbers are intended to be random.

    --
    "Screw Sun, cross-platform will never work. Let's move on and steal the Java language." - Visual J++ Product Manager
  93. Re:It will be fixed by LurkerXXX · · Score: 1

    Yeah. It would have a beautiful change for someone who sells certs for a living to make. All that extra $$$ from folks who have to buy new certs.

    I wonder what the cost from this screw up will be for certs alone, let alone man hours changing keys on machines and distributing them to the appropriate clients, and whatever hacks may have happened in the past two years.

  94. Kurt Roeckx (debian) mail to openssl-dev list by omz · · Score: 3, Interesting

    Found this post at openssl-dev list by Kurt Roeckx ( AFAIK the Debian OpenSSL Team member that made this RNG-clean patch )

    http://www.mail-archive.com/openssl-dev@openssl.org/msg21156.html

    Extract:

    "What I currently see as best option is to actually comment out those 2 lines of code. But I have no idea what effect this really has on the RNG. The only effect I see is that the pool might receive less entropy. But on the other hand, I'm not even sure how much entropy some unitialised data has.

    What do you people think about removing those 2 lines of code?

    Kurt

    "

    BTW, i thought that Debian had some kind of policies about testing each package before committing changes in testing/stable branches. Also, the following paper, contributed by another poster, says interesting things about touching cryptographic code, we have to learn from this experience and have tighter policies !

    " In a narrow sense, the security flaw we found in the Netscape browser serves merely as an anecdote to emphasize the difficulty of generating cryptographically strong random numbers. But there's a broader moral to the story. The security community has painfully learned that small bugs in a security-critical module of a software system can have serious consequences, and that such errors are easy to commit. The only way to catch these mistakes is to expose the source code to scrutiny by security experts.

    Peer review is essential to the development of any secure software. Netscape did not encourage outside auditing or peer review of its software-and that goes against everything the security industry has learned from past mistakes. By extension, without peer review and intense outside scrutiny of Netscape's software at the source-code level, there is simply no way consumers can know where there will be future security problems with Netscape's products. "

    http://www.cs.berkeley.edu/~daw/papers/ddj-netscape.html"

    1. Re:Kurt Roeckx (debian) mail to openssl-dev list by grumbel · · Score: 3, Informative

      i thought that Debian had some kind of policies about testing each package before committing changes in testing/stable branches. This is a common myth, but Debian doesn't do any explicit testing, they pack things into unstable and then just let them go into testing/stable if no bug reports come in. There is no standard code audit or anything going on.
    2. Re:Kurt Roeckx (debian) mail to openssl-dev list by segedunum · · Score: 1

      This is a common myth, but Debian doesn't do any explicit testing, they pack things into unstable and then just let them go into testing/stable if no bug reports come in. There is no standard code audit or anything going on.
      No they don't, yes they do and no there isn't. This is what has always made me very hesitant of Debian with their willingness to patch large numbers of packages, sometimes without any upstream involvement at all and certainly no upstream committing. Their reasons for doing so are sometimes exceptionally flaky to say the least (backporting whole security patches I can just about understand) and seem to be more based on a Debian developer's opinion of what is 'right'.
  95. Ongoing problem for host keys? by Urban+Garlic · · Score: 2, Interesting

    Doesn't this mean that all the "etch" host keys are vulnerable, too, on an ongoing basis?

    SSH host keys are generated at sshd install time, and that package is included on the netinstall CD-roms, which means every time I re-use my 4.0r1 netinstall CD to set up a new box, I generate a new set of vulnerable host keys before I get to the security-updates step.

    Hopefully, they'll advance the next point release and a 4.0r2 netinstall CD will do better.

    --
    2*3*3*3*3*11*251
    1. Re:Ongoing problem for host keys? by Serious+Callers+Only · · Score: 2, Interesting

      I believe the security update will automatically prompt you to regenerate the host key (it did for me at least on ubuntu), so it shouldn't really be an issue.

      If the host keys are vulnerable on a server, doesn't this just leave you open to a man in the middle attack anyway? That's not as serious as generating keys you use to login with, in which case you need to regenerate those as soon as possible. Is it possible to break into a server just by guessing the host or server keys?

    2. Re:Ongoing problem for host keys? by aok · · Score: 1

      Is it possible to break into a server just by guessing the host or server keys?

      I don't think it would be possible...because then it'd be like guessing a password and then, what's the point of PKI, right? Based on how I think ssh works, the only use of the host key is to identify the server to the connecting client so that the client can confirm that it's not connecting to a fake server. The actual connection is authenticated purely on the client's public and private key pair.

      So you're right in that checking the authorized_keys files is what's really important for most people (especially for the root user).
  96. Passwords may be compromised, too by Krischi · · Score: 4, Informative

    It is even worse than this. Passwords that were used on a server with a weak DSA key may be compromised, as well:

    From http://wiki.debian.org/SSLkeys

    1. Re:Passwords may be compromised, too by embsysdev · · Score: 2, Informative

      Thanks, that was very informative. Also, here is the text from a Gutsy upgrade:

      Vulnerable host keys will be regenerated

          Some of the OpenSSH server host keys on this system were generated with a version of OpenSSL that had a broken random number generator. As a result, these host keys are from a well-known set, are subject to brute-force attacks, and must be regenerated.

          Users of this system should be informed of this change, as they will be prompted about the host key change the next time they log in. Use 'ssh-keygen -l -f HOST_KEY_FILE' after the upgrade has changed to print the fingerprints of the new host keys.
          The affected host keys are: /etc/ssh/ssh_host_rsa_key /etc/ssh/ssh_host_dsa_key

          User keys may also be affected by this problem. The 'ssh-vulnkey' command may be used as a partial test for this. See /usr/share/doc/openssh-server/README.compromised-keys.gz for more details.

  97. Re:It will be fixed by Culture20 · · Score: 1

    Only regenerate if you made your keys post 2006 though. Any made prior to the removal of the random seed would be fine.

  98. Re:It will be fixed by IamTheRealMike · · Score: 4, Insightful

    The problem is that the email is rather misleading, from what I understand. It talks about two places causing the problem even though only one of them actually was making valgrind complain (and you can see, purify already picked up on the problem some time before). The trick is that his patch, not included in the email, removed both calls. Which was busted. So if he'd actually sent a full patch, proposed it for inclusion and had it properly code reviewed, the mistake would probably have been caught.

  99. On the topic of portability by JSBiff · · Score: 1

    I was wondering, as soon as I read the GP, what you do if a system doesn't have /dev/random? And there is the crux of the problem. If you want to write portable code that could potentially be deployed on any OS with a compiler/runtime for your language, you are going to have to either include a random number generator of some sort with your code, or use one provided by the standard system libraries for your language, e.g the rand() function in the C library - (but I get the impression that people don't feel the C rand() function is sufficiently random).

          Now, you might do a test, to see if /dev/random exists, and use it, else use the other random source you fall back on. But, at that point, either your random number generator is strong enough, or it isn't. Assuming you ship a sufficiently strong random number generator with your software, why even bother with some non-portable system dependent feature like /dev/random?

          And, I bet the questions I ask provide the answer to the original GP's question - why not use /dev/random? Because it's not portable.

    1. Re:On the topic of portability by Just+Some+Guy · · Score: 1

      Assuming you ship a sufficiently strong random number generator with your software, why even bother with some non-portable system dependent feature like /dev/random?

      The one thing that comes to mind there is a hardware entropy source. /dev/random might have access to it whereas a userspace program might not. In that case, the portable version might be "good enough", but the native version might be even better. Agreed on the rest of what you said, though.

      --
      Dewey, what part of this looks like authorities should be involved?
    2. Re:On the topic of portability by argent · · Score: 1

      The one thing that comes to mind there is a hardware entropy source.

      Like, oh, building a FreeBSD system with 'rand_irqs' set in /etc/rc.conf?

      Looks like turning that on triggered some problems with OpenSSL support in PHP for some people, a few years back.

      Oh, the irony.

    3. Re:On the topic of portability by Chandon+Seldon · · Score: 1

      I was wondering, as soon as I read the GP, what you do if a system doesn't have /dev/random?

      What relevant modern operating system doesn't support /dev/random these days? I know Solaris didn't used to, but it seems wildly unlikely that they haven't fixed that yet.

      --
      -- The act of censorship is always worse than whatever is being censored. Always.
    4. Re:On the topic of portability by Anonymous Coward · · Score: 0

      The C rand() function isn't random AT ALL. It is, by design, entirely deterministic.

      For cryptographic systems, you need a source of entropy, which is what /dev/random provides, and is completely different to a pseudo-random number generator such as rand().

  100. I guess I'd better change my private key... by corifornia2 · · Score: 0, Funny

    $ cat ~/.ssh/id_rsa
    -----BEGIN RSA PRIVATE KEY-----
    7
    ------END RSA PRIVATE KEY------


    Yipes.

  101. Re:It will be fixed by Anonymous Coward · · Score: 0

    At least on Ubuntu the security update automatically identifies vulernable keys and regenerates them. So you just have to update your system to fix it.

  102. Re:It will be fixed by 2short · · Score: 1

    My point is, the question isn't "Is someone able to develop a workable exploit?", but rather "Was someone able to develop a workable exploit?" And the answer is: we don't know.

  103. *bang* *bang* *bang* by multi+io · · Score: 1

    (you're hearing my head repeatedly hitting the tabletop)

  104. Re:It will be fixed by eean · · Score: 3, Informative

    Ben Laurie of OpenSSL/Apache puts it into some context:
    http://www.links.org/?p=327#comment-176642

    Obviously some of the OpenSSL devs probably should've been like "zOMG, SITUATION FUBAR", but it wasn't a formal code review being requested, more of a "hey, what do you think of this and this?" and the patch was never submitted to upstream.

  105. Re:It will be fixed by Anonymous Coward · · Score: 0

    Add:

              How many new certificates will have to be re-purchased from folks who bought them from Thawte or some other certificate supplier. This is going to get real expensive for some large hosts who use a debian based OS to host lots of client company websites.

    Let's see, ~$100/certificate if you host 100 company websites, that's ~$10,000 it's going to cost you just in cash, before you factor in the time spent upgrading, ordering/installing certs, check to see if you or your ssl sessions have been compromised...

    This is going to end up being an expensive screwup.

  106. Re:It will be fixed by noahm · · Score: 1, Interesting

    Imagine if Microsoft reserved the right to modify any software for Windows in any way it saw fit! Yet that's exactly what Debian (and Fedora and Mandrake and Ubuntu) said to me - they reserve the right to make any modifications they like to the software they ship, and if upstream don't like it, tough luck.

    Though, as has been pointed out elsewhere, the Debian package maintainer did raise this issue with the openssl developers, and was basically told "go ahead, it's OK."

  107. Some important information by xtronics · · Score: 3, Informative

    You will want to download this tool to check each system:

    http://security.debian.org/project/extra/dowkd/dowkd.pl.gz

    To use it:

    $ perl dowkd.pl user

    $ perl dowkd.pl host localhost

    See http://lists.debian.org/debian-security-announce/2008/msg00152.html

    Why isn't such a scan isn't part of the package update? http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=481106

    1. Re:Some important information by xtronics · · Score: 2, Informative

      To change-out server keys:

      Had to change out all the other machines.

      if you

      $ cd /etc/ssh
      $ rm ssh_host*
      $ wajig reconfigure openssh-server

      changing user keys - become user and ssh-keygen

      You may have to fiddle with knownhosts and authorized_hosts as documented many places..

  108. 262148 possible keypairs? by multi+io · · Score: 5, Informative
    reading the weak key detector script...

    ...it looks like the affected Debian OpenSSHs can generate only 262148 (or something) distinct keypairs. Can this be true? If it is, this is fucking serious.

    1. Re:262148 possible keypairs? by merreborn · · Score: 0, Redundant
      From the same script:

      Note that the blacklist by dowkd may be incomplete; it is only intended as a quick check.
      With a statement as vague as that, there could be several orders of magnitude more potential keys.

      260,000 would be bad though. At one test per second, that's just over 3 days. Of course, if you blacklist hosts after a certain number of failed authorization attempts, you can greatly increase the difficulty of exhausting the keyspace for a potential cracker.
    2. Re:262148 possible keypairs? by multi+io · · Score: 3, Informative

      From the same script:

      Note that the blacklist by dowkd may be incomplete; it is only intended as a quick check. With a statement as vague as that, there could be several orders of magnitude more potential keys. I have an affected system here, and when I use its ssh-keygen to generate a few hundred keys, the script reports them all as "weak"[1], i.e. they are all in that set of 262,000. Looks like the script is at least quite good at what it does, and/or if there are more potential keys, they are rarely generated? When I do the same on a Fedora box here, none of them are reported, as expected.

      260,000 would be bad though. At one test per second, that's just over 3 days. Of course, if you blacklist hosts after a certain number of failed authorization attempts, you can greatly increase the difficulty of exhausting the keyspace for a potential cracker.

      ...unless the attacker can obtain the public key directly, which he should be able to do frequently (it's called "public key" for a reason). For example, you can query a host for its public host (SSH) key without a problem. So, unless I'm missing something, you could just obtain that key and match it locally against those 262,000 keys (takes a minute at most, if you have all those keys) in order to find out the private key.

      [1]
      $ for i in `seq 1 500`; do ssh-keygen -N '' -t rsa -f key$i; done
      $ ./dowkd.pl file key*.pub | grep 'weak key' | wc -l
      500
      $

  109. Re:It will be fixed by Quattro+Vezina · · Score: 1

    No kidding. I've used Gentoo for years; when I got a new computer a few months ago, I was considering switching to something else, perhaps something Debian-based, out of a combination of wanting to try something different and the fact that I use Debian at work.

    I ended up sticking with Gentoo. Why? It has by far and above the most complete package repository out there. Most other distros are spineless and leave out things like libdvdcss, lame, win32codecs, and mad. Gentoo, on the other hand, has everything.

    --
    I support the Center for Consumer Freedom
  110. Re:It will be fixed by X0563511 · · Score: 1

    Not everyone is a cryptography expert. What needed to be done is someone to specifically state: "We shouldn't do this. Here's why:"

    What appeared to have happened was a bunch of technical jabber completely skipping the security aspects, except for the one you quoted - which you must admit looks quite harmless and irrelevant - unless you understand fully what it means.

    The ideal solution was that the maintainer(s) of the OpenSSL packages should have been watching for that kind of thing - after all, random patch submitters are not wrong in assuming the maintainer is a subject-matter-expert.

    I don't fault the patch submitter. If you just plain don't know, theres nothing to really hold against you when there is supposed to be someone checking what you submit. I point fingers at the maintainer(s), but humans are only humans and mistakes happen. The important part is that it IS recoverable (pain-in-the-ass though it is) and, hopefully, it won't happen again.

    --
    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...
  111. Re:It will be fixed by marcosdumay · · Score: 1

    Great... just when I had mostly convinced the PHBs in management that yes, open source software was trustworthy, and that yes, good developers write Linux...

    I'm not trolling, but maybe open source isn't ready for the enterprise.

    'Cause Windows never have remote exploiting bugs, right? Yeah, not trolling.

    If some coder did this at a company at least I'm pretty confident they'd get their ass fired...

    Ok, you are really not trolling. You are for a +5 Funny. Sorry, now I understand.

  112. Re:It will be fixed by Kidbro · · Score: 1

    You have got to be kidding?
    I have never even heard of someone getting fired over a bug, and I run into a lot more problematic ones monthly. Are you seriously suggesting that people are getting fired over things like this? Care to drop a couple of links on us to back that theory up?

    As a sibling poster mentioned, most vendors of proprietary software would probably shut up about a thing like this, and let the next "upgrade" silently fix the problem (leaving weak keys intact).

  113. Re:It will be fixed by KutuluWare · · Score: 2, Informative

    I think you misread his statement. He didn't say your "machine" was compromised. He said that the underlying authentication mechanism was compromised, which is quite different. If I were to leave my car doors unlocked, the engine running, and the alarm disabled, then the security system on my car would be compromised; but until someone came along to actually hop in and drive away with it, the car itself would still be working properly.

    Similarly, the fact that there is a problem with the OpenSSH package means that the security mechanism that is guarding access to your system is no longer as secure as it was previously thought -- that makes it compromised. The individual systems may or may not have been compromised themselves by way of the compromised security mechanism, but continuing to use OpenSSL knowing it (the key gen algorithm, specifically) is less secure than it should be is just asking for trouble.

  114. Re:It will be fixed by Free+the+Cowards · · Score: 1

    Most users do not generate nor use ssh/ssl keys or certificates. Say what? Every time you purchase something from Amazon you're "using" an SSL certificate, and if Amazon's SSL cert was generated on one of the affected distros then your credit card and order information could be completely compromised.
    --
    If you mod me Overrated, you are admitting that you have no penis.
  115. Re:It will be fixed by grumbel · · Score: 1

    As a distro maintainer I can tell you that upstream providers generally do not care about distro-specific patches. This was not a distro specific patch. It was messing around with code because it triggered a warning in valgrind and this code happens to be deep down in OpenSSL. If it would be some random path in a Makefile I would agree, upstream doesn't care about that, but messing around with the code itself, especially in a security relevant package, should never happen without upstream.
  116. Re:It will be fixed by Anonymous Coward · · Score: 1, Informative

    It shouldn't need fixing in the first place.

    Debian people screwed up. This leaves a huge distaste in my mouth for Debian (and Ubuntu). Volunteers not maintaining the free product that you've decided to trust your security with properly? Get over it.
  117. Re:It will be fixed by Sancho · · Score: 1

    Imagine if Microsoft reserved the right to modify any software for Windows in any way it saw fit! Yet that's exactly what Debian (and Fedora and Mandrake and Ubuntu) said to me - they reserve the right to make any modifications they like to the software they ship, and if upstream don't like it, tough luck. Well, the GPL basically allows this.

    Though there are concerns with naming conventions. Mozilla seemingly foresaw this problem and demanded that non-official releases be named differently to avoid confusion in the event that the package maintainers introduce bugs. This is why we have Iceweasel on Debian instead of Firefox.
  118. Anonymous Coward by Anonymous Coward · · Score: 0

    I has been using Slakware the last couple of years ...
    So Sebastian Droge has been choking on a bucket of "cookies" on my box since then ?

  119. Re:It will be fixed by IamTheRealMike · · Score: 4, Insightful

    No, he posted a question openssl-dev, which is a mailing list for people writing software that uses OpenSSL. This OpenSSL developer doesn't read it and that's similar with most open source project - developers often don't read mailing lists for end users.

    What's more, that mail doesn't contain a patch. It contains a misleading question with two lines posted in isolation. An actual patch, submitted for an actual code review, would almost certainly have revealed the problem via context.

    You don't change crypto code of all things based on an idle question on a mailing list populated mostly by users. What's next, changing the kernel scheduler based on a conversation in #kernel-newbies?

  120. DEBIAN PEOPLE DID NOT SCREW UP! by Sir_Real · · Score: 1

    It shouldn't need fixing in the first place.

    Debian people screwed up. This leaves a huge distaste in my mouth for Debian (and Ubuntu). The huge distaste in your mouth is probably the CROW you should be chewing on since the Debian people did NOT SCREW THIS UP. This was the fault of the maintainer.
  121. Re:It will be fixed by IamTheRealMike · · Score: 2, Insightful

    Right, that's why Debian renames Firefox. I remember them not being very happy about being forced to do that at the time. But seriously, are all open source projects supposed to use trademarks to force distributors hands? It seems like a bad precedent.

  122. OpenSSL guy is lame by ThePhilips · · Score: 1

    I wonder since when content of stack became "random" as to serve a seed.

    In all my years of system and application developer, I'd say picking something random from stack as good as picking some constant - because all code paths thru program would leave 1-2 unique stack states. No entropy there for you.

    Even address of stack contains more entropy that its content - since most OSs now randomize stack base address.

    Once in a while, I have to call the OpenSSL guy an incompetent and give kudos to Debian guys removing another piece of cruft from code.

    --
    All hope abandon ye who enter here.
    1. Re:OpenSSL guy is lame by vrmlguy · · Score: 1

      The problem is, OpenSSL needed a buffer in which to XOR several sources of randomness. OpenSSL didn't bother initializing the buffer, because doing so just eats CPU cycles, and a possibly random buffer is marginally better than a non-random one. However, the patch removed *all* of the randomness except for the PID, leaving the user with one of just 262148 (or so) distinct keypairs.

      --
      Nothing for 6-digit uids?
    2. Re:OpenSSL guy is lame by Anonymous Coward · · Score: 0

      No, it wasn't that OpenSSL didn't bother. The job of "ssleay_rand_bytes(buf, ...)" is to mix in whatever entropy is present in the caller-supplied buf.

      That was 100% broken by Debian. OpenSSL has zero fault here.

  123. Re:It will be fixed by Sir_Real · · Score: 2, Informative

    No, but it shouldn't have been changed in the first place. Debian needs to stick their ego up their ass sometimes and just let the people who wrote the software do the coding vs. sticking their own code in in places they don't fully understand. WTF? This bug is the result of a Debian guy saying "Hey, this doesn't look right, can you fix it?" The PACKAGE MAINTAINER (Not the DEBIAN GUY) "fixed" it for Debian (though for obvious reasons that fix won't propogate any further) and got us here. Speaking of "don't fully understand..." Would you maybe read .... prior to ....

    ah fuck it
    this is slashdot
  124. Re:It will be fixed by Sancho · · Score: 1

    Good or bad, the point is that there are legitimate concerns with packaging up binaries from a modified source tree. A lot of people blasted Mozilla for their actions--I wonder what these people think now that there's an example of this sort of thing.

    The only way it could be better (for Mozilla) is if people blamed OpenSSL for the problem--which someone did a little lower in the comments, but I don't think that it's the general consensus.

  125. Re:It will be fixed by noahm · · Score: 4, Informative

    No, he posted a question openssl-dev, which is a mailing list for people writing software that uses OpenSSL

    Incorrect, no matter what Ben claims. According to http://www.openssl.org/support/, openssl-dev is for the developers of openssl itself. To quote the list description: Discussions on development of the OpenSSL library. Not for application development questions!

    So yes, perhaps Kurt could have been more explicit in his description of what he was trying to do, but he was definitely using the appropriate address to reach the developers.

    noah

  126. Re:It will be fixed by IamTheRealMike · · Score: 1

    I stand corrected. That's a pretty odd mistake for Ben to make.

    Still, I remain pissed off - I think I narrowly avoided this problem (my Debian is old enough that it predates the patch) but this is still the latest example of a series of problems that Debian has introduced into software its packaged (including software I've worked on).

  127. Re:It will be fixed by IamTheRealMike · · Score: 1

    Well, not necessarily. The most serious Debian packaging bug I've investigated myself was when they decided that the regedit utility was not an important part of Wine and separated it into an optional (not installed by default) wine-utils package. Simple change to the package definitions.

    Except that regedit is not optional. It's often invoked by installers, which expect it to be there. You can't install Windows without regedit, so these installers typically never check if it worked or not. They just assume it did, and the programs then assume the registry keys exist (because if you installed the software, they must exist) and crashed when they didn't. It took a long time to figure this one out, and even longer to get them to fix it.

  128. Re:It will be fixed by icebike · · Score: 1

    Imagine if Microsoft reserved the right to modify any software for Windows in any way it saw fit! Yet that's exactly what Debian (and Fedora and Mandrake and Ubuntu) said to me - they reserve the right to make any modifications they like to the software they ship, and if upstream don't like it, tough luck.

    First, you should realize that Microsoft DOES modify software that they distribute with windows. Even third party packages the bundle with windows under license.

    Second, you should read and try to understand the GPL. Distros are perfectly within their right to modify packages. Some do a good job of this, and some don't.

    You need only review the history of Debian to realize that users are always at risk of another personality spat hozing their distro of choice. Its happened time and time again. The place is infested with swollen heads, sycophants, and drama queens.

    This is why you should CHOOSE a distro based on integrity and quality, as well as history.

    Introducing security flaws for the convenience of packagers is unconscionable.

    --
    Sig Battery depleted. Reverting to safe mode.
  129. WRONG by Anonymous Coward · · Score: 0

    If you're a casual desktop user who uses public key authentication, and you've ever run ssh-keygen on an affected client, you need to consider the resulting key compromised.

  130. Re:It will be fixed by fwarren · · Score: 1
    Yes, but joe sixpack Ubuntu/Debian user does not need to do anything. He did not make any certificates. He has nothing to fix or patch on his end.

    Now Amazon may have some work to do...

    --
    vi + /etc over regedit any day of the week.
  131. Re:It will be fixed by MikeyO · · Score: 1

    also the README in the source code in quesiton says, "Development is coordinated on the openssl-dev mailing list (see http://www.openssl.org/ for information on subscribing)."

  132. Re:It will be fixed by noahm · · Score: 1
    I completely agree that it was a horrible decision on Kurt's part. No matter what, you don't go mucking in the random number generator code of a crypto library unless you're really sure you know what you're doing. IMO Kurt also screwed up by committing the fix to the public Debian openssl svn repository before it was publicly announced. Debian, Ubuntu, and others were still trying to assess the impact of the problem at that point, and weren't ready to publish it. I was surprised by this, as I've dealt with Kurt in the past regarding embargoed security issues and found him to be very responsible and thorough.

    noah

  133. Re:It will be fixed by ewhac · · Score: 1

    I guess the real question is how many compromised keys are out there? Most users do not generate nor use ssh/ssl keys or certificates.

    Every Debian-based distro generates SSH host keys upon installation, and turns on sshd by default. So every naively-installed Debian installation out there with a weak key is potentially vulnerable.

    A stop-gap solution is to turn off sshd, until you can get the keys regenerated.

    Schwab

  134. Re:It will be fixed by fwarren · · Score: 1
    My point still stands. Is someone able to develop a workable exploit?

    The possible answers are a) they already have b) someone will do it or c) no one is able to and the point is moot.

    Yes, we don't know if (a) has happened, we don't know if (b) will happen. So there is no way to guarantee that (c) is the case and we are all safe.

    So we have to act like it has been compromised and change all of our affected keys/certs...and leave the paranoid to comb though things looking for proof it has already happened.

    --
    vi + /etc over regedit any day of the week.
  135. Re:It will be fixed by IamTheRealMike · · Score: 1

    Right, I agree, but I said "right to modify any software for Windows in any way they saw fit", not just any software they distribute. Debian has always been clear that the only supported way to get software onto their system is via their repositories, and that they reserve the right to patch software in their repositories as they see fit. It'd be sorta like Windows only accepting software from the Microsoft Download service, and Microsoft insisting on being able to modify the code of, say, Skype.

  136. Re:Question by Anonymous Coward · · Score: 0

    No. It was supposed to discover them.

    And it has done.

  137. Once again, shoddy code leads to errors by metamatic · · Score: 2, Insightful

    But the implementor made a mistake, and also commented out another similar usage, in a different function, ssleay_rand_add. This was a huge mistake, as the purpose of ssleay_rand_add is to add randomness into the random state.

    Given that the code is so shoddily written that neither of the functions has a comment to say what it's supposed to do, I think I can forgive him for that.

    --
    GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
    1. Re:Once again, shoddy code leads to errors by segedunum · · Score: 1

      Given that the code is so shoddily written that neither of the functions has a comment to say what it's supposed to do, I think I can forgive him for that.
      I can't. This is just fucking amateur hour. There is no reason whatsoever for that patch.

      If he really needed to do it then why didn't he ask, and get the opinion of, uh, I don't know, ummmmmmmmm......the upstream developers first?! Making your own patches on someone else's software, in isolation, that few if any people will review is a seriously stupid idea. I don't care how shoddily the code is written, or if there is an entire novel written before it.
    2. Re:Once again, shoddy code leads to errors by Anonymous Coward · · Score: 0

      If he really needed to do it then why didn't he ask, and get the opinion of, uh, I don't know, ummmmmmmmm......the upstream developers first?! He did:

      http://marc.info/?l=openssl-dev&m=114651085826293&w=2
    3. Re:Once again, shoddy code leads to errors by Anonymous Coward · · Score: 1, Informative

      You mean besides the comment explaining how the code would break in a similar code checker, and the configuration #define offered to allow the code to be removed so that you could use code checkers on it?

      Yes, truly horrible.

      The code explained what was going on perfectly. The Debian maintainers were just not paying attention.

    4. Re:Once again, shoddy code leads to errors by Anonymous Coward · · Score: 0

      static void ssleay_rand_seed(const void *buf, int num);
      static void ssleay_rand_add(const void *buf, int num, double add_entropy);

      Anyone for whom the purpose of these functions is not clear has, IMHO, no place "fixing" them to run under valgrind.

    5. Re:Once again, shoddy code leads to errors by makomk · · Score: 1

      I think they assumed it'd be obvious from the names. It's fairly common in open source, for better or worse.

    6. Re:Once again, shoddy code leads to errors by metamatic · · Score: 1

      I was talking about the OpenSSH code.

      --
      GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
    7. Re:Once again, shoddy code leads to errors by Anonymous Coward · · Score: 0

      Those ARE the functions that Debian mangled. Check the patch.

      They incorrectly commented out a line in both of those functions. One of the lines could be safely removed - which was indicated by a comment explaining how it fails in code checkers, and a #ifndef surrounding it to allow it to be removed by a configure option.

      The other line couldn't be safely removed, since it was essentially an assignment.

      Basically, they commented out the line that actually sets the seed, because it looked similar to a line that set to uninitialized memory. In pseudo code:

      int foo; /* Generates warning since foo is uninitialized */
      #ifndef USING_CODE_CHECKER /*
      Commented out by Debian
      seed = foo;
      */
      #endif

      And then elsewhere:

      void set_seed(int foo) { /*
      Commented out by Debian
      seed = foo;
      */
      }

      Vastly simplified, of course, but you get the idea. Formatting mangled by Slashdot.

    8. Re:Once again, shoddy code leads to errors by Anonymous Coward · · Score: 0

      He might have, uh, I don't know, ummmmmmmmmm... gotten the opinion of the upstream developers first?

      http://marc.info/?l=openssl-dev&m=114651085826293&w=2

    9. Re:Once again, shoddy code leads to errors by segedunum · · Score: 1

      He might have, uh, I don't know, ummmmmmmmmm... gotten the opinion of the upstream developers first?
      No he didn't. Read the thread and understand how he doesn't understand what he's changing here. He was even told about PURIFY, and there is no reason to be making any patch like this outside of upstream development regardless of who's opinion he sought.
  138. If I May Be So Bold as to Suggest... by ewhac · · Score: 1
    I think, in the long run, this screwup may turn out to be a good thing.

    Things that you don't think about tend to fall apart behind your back. SSH/SSL is a best-of-breed cryptographic and authentication solution. It's so good, most of us didn't need to think about it.

    Even excellent tools need maintenance now and then. And part of the maintenance overhead for crypto and authentication is to change your keys every so often.

    So everyone has to suffer a Flag Day all at the same time, update their software and change out their keys. But I think the result will be more secure hosts and a more secure network, even for machines and networks which didn't "need" the change. Which, IMHO, is a good thing.

    Schwab

  139. Amateur Hour From Debian Again by segedunum · · Score: 0, Flamebait

    Seriously, I'm glad I don't put up with this shit from Debian. The place for code development is upstream. If you have a patch, get it upstream and get the approval of the people who actually develop the software so you can understand why Valgrind is complaining the way it is and why it has been left in. Backporting security fixes because of Debian's stupid development cycle I can just about understand (and even that's a problem as upstream moves on to new versions), but hacking on something downstream that few people will see is one reason why I just don't feel too much trust for Debian - and they do it far more than they should usually because of their own silly ideas about what is 'right'. There's just no reason for that patch at all.

    I have quite a few OpenVPN keys generated for a wide variety of purposes, and if I'd been using Debian's OpenSSL then I'd be really pissed. There's just no reason for this, and no reason for anyone outside of upstream to commit a patch like that - and there it would have been caught pretty much instantly before a release was even made, or even better, dismissed as the crap that it is.

    All that crap you hear from certain people about Debian being 'rock solid' and 'stable' is just that. Crap.

  140. That's because many eyes often aren't by Sycraft-fu · · Score: 1

    What I mean is there's an implicit assumption on the part of some OSS advocates that because the source is open, and thus viewable by anyone, that a large number of experts do choose to look at it and audit it. Well, that is usually not the case actually. People just happily use the software as is and never think to check and see if there are any problems with it, even if they have the technical expertise to do so.

    That's the downside to the free, open nature of OSS is that while it ALLOWS anyone to look at it, it doesn't REQUIRE any one to. So maybe you have something that a bunch of experts are interested in and it is heavily audited. However you also maybe have something that nobody but the original programmer ever bothered to look at. Also the openness means that you can have something like what happened here: An original version that is audited but a derivative that isn't.

  141. Re:It will be fixed by icebike · · Score: 1

    Not at all the same thing. I think your comparison is somewhat flawed.

    Microsoft used to distribute HyperTerminal by Hilgraeve. The Microsoft version was obviously a hack, but you could upgrade to the full version by going direct to the developer, and it integrated smoothly with windows.

    Similarly, there are non-debian controlled repositories for Debian. (The fact that Debian does not reach out and control (support) those 3rd party repositories is clearly a Good Thing(tm).) They don't prevent you from using third party repositories.

    All distros do the same thing. OpenSuse cripples mp3 capabilities (for legal reasons they say), but they provide links on their site pointing to 3rd party repositories that provide un-crippled versions of the same package.

    As for this concept of "the only supported way", I have to take issue of that as well. Have you ever heard of anyone getting "support" from Debian? Ubuntu maybe, but Debian?

    I don't want to appear to be defending Debian for this bone headed decision, just their right to be bone-headed. ;-)

    --
    Sig Battery depleted. Reverting to safe mode.
  142. OpenSSL wasn't counting on uninitialized memory by Anonymous Coward · · Score: 0

    For heaven's sake people, OpenSSL wasn't counting on uninitialized memory as a big source of randomness.

    It appears that some specific _application_ was passing an uninitialized buffer to OpenSSL. This made valgrind complain when _that_application_ was run. The Debian solution was to basically just patch OpenSSL to comment-out the function call about which valgrind was complaining. Of course, this same line of code was used for adding just about all entropy to the PRNG.

    Yeah, I know.

  143. The light dawns... and it's a muzzle flash... by argent · · Score: 1

    They didn't depend on it: They needed a buffer to do some XORing to, and there was no need to initialize it. So they didn't initialize. That choice offered a potentially minor increase in entropy, and saved the admittedly minor computational cost of initializing the memory.

    Ah, the light dawns. All that faffing about the "benefit" of using the uninitialised data was a smoke screen. The problem is that they saw an opportunity for a minor optimization that made the code a lot less clear, and didn't explain why they were doing it. They didn't even put in a "you're not expected to understand this" line.

    They screwed up by writing dodgy code, and the Debian blokes screwed up by commenting out the code instead of initializing buf[]. They loaded the gun, and Debian shot themselves in the foot with it. Both sides should be embarrassed, not self-righteous.

    1. Re:The light dawns... and it's a muzzle flash... by ergo98 · · Score: 1

      They screwed up by writing dodgy code

      I once worked with a moron who insisted upon nulling every object in a language where it was not only unnecessary, it was actually detrimental. Yet he stomped his feet and proclaimed that he was doing something that was somehow righteous because he could satisfy his illogical, poorly derived "always null objects" rule.

      They screwed up by writing dodgy code

      There was nothing, whatsoever, dodgy about their code. At all. Not the slightest bit. Initializing the memory used for this sort of XOR buffer is absolutely the perfect example of a cargo-cult type mentality -- somethings it's good to initialize memory, therefore it always must be good.

      It's pretty clear that OpenSSH code isn't for tourists, and they have no obligation to coddle a tourist along through every line (I would say it would be counterproductive because it would provide enough information to be even more dangerous. Here someone made such a massive screw up to satisfy a cargo cult dictum in one of the most security sensitive pieces of code...imagine if he had guideposts along the way...
    2. Re:The light dawns... and it's a muzzle flash... by argent · · Score: 1

      I once worked with a moron who insisted upon nulling every object in a language where it was not only unnecessary, it was actually detrimental.

      What, you mean that wasn't "C" code? Damn, I must be slipping.

      There was nothing, whatsoever, dodgy about their code.

      It did something that was counter to normal coding conventions without documenting it.

      It's pretty clear that OpenSSH code isn't for tourists, and they have no obligation to coddle a tourist along through every line

      "My code is too clever to be properly documented."

      I've worked with a number of developers who had attitudes like that. One had two pages of tricky code for which the only documentation was a reference to a page in a textbook. When I looked it up, and compared the comments in the code he'd copied with the code he submitted, it turned out that the bug I was looking for would have been avoided if he'd just copied the comments over... AND he's the one who committed the bug.

      NOBODY is so clever that they don't need to document their code.

      If nothing else, the stranger who needs the comments may well be themselves in five years.

      imagine if he had guideposts along the way...

      Well, for one thing, he probably wouldn't have screwed up... or at least when he submitted the change it wouldn't have been OK-ed by someone from the OpenSSH team, as this one apparently was.

    3. Re:The light dawns... and it's a muzzle flash... by Anonymous Coward · · Score: 0

      man, don't defend this guy. He is undefensible

      look at the original ( now infamous ) patch: it didn't compile because Kurt put nested comments !

      http://svn.debian.org/viewsvn/pkg-openssl/openssl/trunk/rand/md_rand.c?rev=141&r1=140&r2=141

      http://svn.debian.org/viewsvn/pkg-openssl/openssl/trunk/crypto/rand/md_rand.c?rev=173&r1=167&r2=173

      ( complete changelog of md_rand.c here )

      This guy, Kurt Roeckx, seems really a tourist.

      Besides that, if you are changing code that have to do with RNG , the least you can do is to make some test to assure that RN Generation still works

      This guy just committed without total lack of responsibility. Very bad for Debian reputation, and it is a shame that debian doesn't have a policies about coding rigorous testing and audits in such sensitive packages like this ( we are not talking about a fancy MP3 player here )

          --ombzzz

    4. Re:The light dawns... and it's a muzzle flash... by argent · · Score: 1

      man, don't defend this guy. He is undefensible

      I'm not defending the guy who shot himself in the foot... the discussion on the mailing list about not putting in a protective #ifdef because they didn't want to compile it twice to get it past the checker makes it clear that they were deliberately aiming at their feet when they pulled the trigger... I'm attacking the guy who loaded the gun.

      There's nothing wrong with writing code that does something unusual, so long as you document it.

      Been there, not done that, got to stand up at a code review and wear the dunce hat.

      Like I said about four messages back, there's plenty of guilt to go round.

    5. Re:The light dawns... and it's a muzzle flash... by Free+the+Cowards · · Score: 1

      "My code is too clever to be properly documented." Oh please. I've never seen any OpenSSL code before in my life until I looked at the diffs for this bug, and I found the code to be perfectly clear. Hashing newly received random data with the existing contents of a buffer is a completely standard cryptographic idiom.

      NOBODY is so clever that they don't need to document their code. There's no point in documenting obvious behavior.

      Well, for one thing, he probably wouldn't have screwed up... or at least when he submitted the change it wouldn't have been OK-ed by someone from the OpenSSH team, as this one apparently was. The guy who made this change never adequately explained what changes he made to the OpenSSH team. He said he was going to take out the uninitialized data access, which would have been just fine, and they took him at his word. Unfortunately he completely destroyed the behavior of this seeding function instead. If he had actually shown them diffs, or even said exactly how he planned to make his changes, they never would have gone for it.

      Think of it as nulling out object references. I say, this is unsafe, it's not nulled. You say, I don't care, it's not important so go ahead and fix it. Then you fix it by nulling out the object reference after it's assigned, but you never tell me about that little detail. That's exactly what happened here.

      --
      If you mod me Overrated, you are admitting that you have no penis.
  144. Re:It will be fixed by mpeg4codec · · Score: 1

    you also need to regenerate any certificates made with OpenSSL since 2005
    Not 2005, it's 2006. I'm not sure what versions of Debian it affects, but it definitely does not affect Ubuntu prior to (and including ) 6.06 LTS. Still terrible, but if you generated your keys in 2005 or most of 2006, you should be good.
  145. headline:Linux has deep security flaw for years! by Anonymous Coward · · Score: 0

    How about the /. zealots figure out how to blame MS for their F-up...

    Call me a troll, but the bashers just got a slap in the face, and are trying desperately to downplay the security problem that OPEN SOURCE should have caught .
    Sorry, busy laughing at the zealots.

  146. To update the host keys on servers by vrillusions · · Score: 2, Informative

    Since they didn't mention how to do this in the security advisory, or give you a warning message when you apply the update that you should regen your keys here's how to regenerate the host keys. Either log in as root or put sudo before each of these (this should work remotely, I didn't have problems but YMMV)

    rm -f /etc/ssh/ssh_host_dsa_key
    rm -f /etc/ssh/ssh_host_rsa_key
    ssh-keygen -b 1024 -N '' -f /etc/ssh/ssh_host_dsa_key -t dsa
    ssh-keygen -b 2048 -N '' -f /etc/ssh/ssh_host_rsa_key -t rsa
    /etc/init.d/ssh restart

    You'll then be asked about the key changing next time you log in.

    I just spent all day updating servers. Doesn't sound so bad till you realize all these servers also had client keys used for remote backups that had to be recreated and verified, etc.

    1. Re:To update the host keys on servers by totally+bogus+dude · · Score: 1

      The configuration scripts for the openssh-server package regenerates the keys if they've been removed as well, which makes it slightly quicker:

      rm -f /etc/ssh/ssh_host_*
      dpkg-reconfigure openssh-server

      This also restarts sshd at the end. Note that you can do this on remote systems, as restarting (or even stopping) sshd does not interrupt existing sessions.

      And don't forget to clean up your ~/.ssh/authorized_keys if you have any compromised keys in there -- that's where the real threat lies!

  147. Re:It will be fixed by Anonymous Coward · · Score: 0

    It looks to me like the upstream maintainer thought he would be "taking it out" by putting it in a #ifndef PURIFY block like some of their other code. I don't think it occurred to upstream that anyone would be so silly as to remove it entirely for normal builds!

  148. Re:It will be fixed by mollymoo · · Score: 1

    You still have to distribute those new keys manually. An update on my server isn't going to install the new key on my laptop.

    --
    Chernobyl 'not a wildlife haven' - BBC News
  149. Re:It will be fixed by caluml · · Score: 1

    A stop-gap solution is to turn off sshd, until you can get the keys regenerated. Or if Debian SSHd is compiled with tcpwrappers:
    echo sshd: ALL >> /etc/hosts.deny
    echo sshd: your.home.ip.address >> /etc/hosts.allow
  150. Re:It will be fixed by SiliconEntity · · Score: 3, Informative

    According to http://www.openssl.org/support/, openssl-dev is for the developers of openssl itself. To quote the list description: Discussions on development of the OpenSSL library. Not for application development questions!
    Right, and further, one of the participants in the discussion was Ulf Moeller, who is one of the main crypto developers in OpenSSL. Unfortunately nobody apparently bothered to check whether the two lines proposed for removal were both involved in this questionable behavior of folding uninitialized data into the random state. Actually, only one of them was being used that way, the other was adding very important data to the random state. The OpenSSL people never caught the fact that the proposed change to the two lines was going to kill the security of the system, even though they had all the information available to do so.

  151. Re:It will be fixed by dotancohen · · Score: 1

    That you, dear?

    --
    It is dangerous to be right when the government is wrong.
  152. No wonder this bug exists.... by Anonymous Coward · · Score: 0

    ...when your dev team looks like this: http://www.flickr.com/photos/53246655@N00/581894457/

  153. Re:It will be fixed by Anonymous Coward · · Score: 0

    lol

    Seriously, Sell it and leave the country for a more men friendly one (if they exist. DO THEY!????????).

  154. Re:It will be fixed by CrazyKen · · Score: 1

    Have you ever heard of anyone getting "support" from Debian? Yes. When you submit a bug report, the package maintainer is supporting you, whether it's a bug or a user error. It's not the same type of "hand-holding" support that most people think of, but it's a form of support. When you have a problem with a Debian binary package, the first place you hit up is bugs.debian.org, since the source could be modified and the bug in question may be related to that modified code.
  155. Quick Study of openssl random generator by rkwasny · · Score: 1

    Hi, I made a quick study of openssl random generator http://mag.entropy.be/blog/ - it looks really bad, debian implementation generated only about ~200k random numbers.

  156. Thank you! by XanC · · Score: 1

    This should have been in the advisory. Under the circumstances I don't want to assume that I know what I'm doing.

  157. Correction by XanC · · Score: 1

    Fortunately, you renew for several years AND the last time you renewed was not while this bug was affecting Debian! With your method you'd be really screwed if it were.

    1. Re:Correction by Qzukk · · Score: 1

      True that, though I don't think that I've ever done business with a CA that didn't allow for screwing up a key/cert at least once (though you might have to beg real hard), and I've used several.

      Thawte claims to be the only one to have free reissues for the lifetime of the certificate: http://www.thawte.com/reissue/

      Of course, Comodo says it has unlimited reissues as well... http://www.instantssl.com/ssl-certificate-products/ssl.html

      --
      If I have been able to see further than others, it is because I bought a pair of binoculars.
  158. Re:It will be fixed by CrazyKen · · Score: 1

    How do you figure this is the result of the "debian way"? This is the result of a user error, and it just so happens that he's making this mistake on a package that will be redistributed to thousands of users amongst various redistributions of Debian, and Debian itself. The "Debian way" you're referring to is a set of guidelines on how they operate, which by no means does it force him to make modifications to source code -- the option is simply there for him to do so, and that's based on FOSS and the GPL.

  159. Re:It will be fixed by Anonymous Coward · · Score: 0

    This problem isn't something you can just update your system to fix. This means the basis for all remote authentication on your Debian/Ubuntu machines is compromised until you go and fix it manually.

    I would like to hear a less grandstanding article that explains just how easy it is to guess a key. This article is a little on the grandstanding side.

    Say I generate a key, then lets see you guess it...try. Maybe be the first.

    This isn't to say it should not be fixed, I am sure it will be very shortly.

  160. Re:It will be fixed by Anonymous Coward · · Score: 0

    I guess the real question is how many compromised keys are out there?


    Most users do not generate nor use ssh/ssl keys or certificates.

    Ever type the characters "https:" before?

    There's a good chance you're calling OpenSSL under the hood, and relying on the correctness of its RNG.
  161. Don't forget the authorized_keys files by halsathome · · Score: 2, Informative

    Regenerating keys is fine, but the important step is clearing out the authorized_keys file that contains the old keys :-). At the same time take the opportunity to clear out the keys belonging to that long-gone co-worker.

    If you try logging in with a new key where an old one is expected, you will get an error and remove the old one from authorized_keys. When the client is never in use however, the hole might stay in there for a long time ...

  162. Re:It will be fixed by dotancohen · · Score: 1

    No, she's great, and carrying our second bundle of joy. I exercise every opportunity to joke about her, though. Any woman who lets me run Ubuntu (or any other linux distro) at home is great. I've even got her brainwashed to the point where she's recruiting her girlfriends to Firefox from IE.

    --
    It is dangerous to be right when the government is wrong.
  163. Re:headline:Linux has deep security flaw for years by BSDetector · · Score: 0

    Here!!! Here!!!

  164. I hope nobody has run a CA on a debian box by MarcoAtWork · · Score: 1

    ... for the past couple of years, or a webhosting firm (generating ssl certs), etc. etc.

    I really can't believe somebody would be mucking with the OpenSSL code at all: it's a crypto rng, if you haven't written it or don't understand it fully it's definitely one of those things to LEAVE ALONE.

    --
    -- the cake is a lie
  165. hm?? by Anonymous Coward · · Score: 0

    hey,

    are you guys rly sure, thats insecure? look:

    --- openssl-0.9.7e.orig/crypto/rand/rand_unix.c 2003-12-27 16:01:52.000000000 +0000
    +++ openssl-0.9.7e/crypto/rand/rand_unix.c 2006-04-19 15:42:32.000000000 +0100
    @@ -160,6 +160,9 @@
                    const char **egdsocket = NULL;
      #endif

    + /* Keep valgrind happy */
    + memset(tmpbuf, 0, sizeof tmpbuf);
    +
      #ifdef DEVRANDOM /* Use a random entropy pool device. Linux, FreeBSD and OpenBSD
                      * have this. Use /dev/urandom if you can as /dev/random may block

    that's the patch, up there.
    he added zeroing the tmpbuf. ok.
    but if you look into the code, next each and every byte of tmpbuf is overwriten with values read fro /dev/urandom and /dev/random - as its stated in the comment.

    so - if it's overwriten, before the buffer is used for anything - whats the big deal?

  166. I have an eCommerce site by an.echte.trilingue · · Score: 3, Interesting

    I am going to hijack this thread because I have an eCommerce site hosted on Debian and this made me nervous.

    According to the reps at Thawte, if you are using a third party ssl cert (thawte, verisign, etc), this does not affect you. According to them, this is only dangerous for people who have generated their own SSL certs for their sites from the ground up (probably a minority, I would guess). If anybody has any information to the contrary, please let me know.

    --
    weirdest thing I ever saw: scientology advertising on slashdot.
    1. Re:I have an eCommerce site by wirelessbuzzers · · Score: 1

      According to the reps at Thawte, if you are using a third party ssl cert (thawte, verisign, etc), this does not affect you. That sounds unlikely to me. The usual process to get a cert is to generate a public/private key pair and create a certificate signing request from the public key. The authority then signs the CSR and returns it to you. But you still generated the private key, so if you did it on Debian, you're still vulnerable. Maybe in some cases it's generated by Firefox, though... any idea if Firefox is vulnerable to this (i.e. does it link OpenSSL)?
      --
      I hereby place the above post in the public domain.
    2. Re:I have an eCommerce site by jareds · · Score: 1

      According to the reps at Thawte, if you are using a third party ssl cert (thawte, verisign, etc), this does not affect you.

      I have to emphasize what the other guy said. THIS IS COMPLETELY WRONG! "The reps at Thawte" are apparently unqualified to represent their employer. YOU MUST REGENERATE YOUR KEY, AND GET THE NEW KEY SIGNED. Thawte did not generate a key for you, they signed a key. Unless you know specifically that you generated the key using a good openssl, you are in danger.

    3. Re:I have an eCommerce site by Mysteray · · Score: 3, Interesting

      https/ssl/tls/ssh etc use the certificates to agree on a conventional "session key" every time you connect. Session keys are typically chosen with strong random numbers... but if either the client or server is using the OpenSSL from Debian Etch, there's nearly no randomness in it.

      Even if your certs are fine, individual transactions are likely vulnerable.

      If someone has taken packet captures, they will likely be able to decrypt them retro-actively.

    4. Re:I have an eCommerce site by Anonymous Coward · · Score: 0

      Typically, you would generate a certificate signing request and a private key on your own system, then submit the request to the CA for signing. It is the private key which will be weak in this scenario, and the security of the certificate depends on this key.

      If you generated your key on an affected system, then yes, you have a problem.

  167. Ubuntu Dapper 6.06 LTS fine, too by zzatz · · Score: 2, Informative

    As with Debian Sarge, Dapper uses a version that predates the dangerous patch.

  168. Re:It will be fixed by BooRolla · · Score: 5, Funny

    Don't go bragging. A lot of people know the key to rooting your wife's box.

  169. Comment! by Bitsy+Boffin · · Score: 1

    muppet who did something they shouldn't

    In defense of said muppet. This has got to be a case of poor code commentation causing a maintenance problem.

    The muppet was responding to a warning put out by an analysis tool (Valgrind) that some uninitialized memory was being read from, any programmer will tell you that's not a fantastic idea in general but it happens that in this case it was not only ok, but necessary.

    But the muppet came along and "fixed" the problem.

    Now this can only mean that there was inadequate code commenting (or, that the muppet didn't read it, in which case I retract my defense, but not the reasoning) around this unusual piece of code. If a piece if code is doing something decidedly strange, they there NEEDS to be a comment regarding it, preferably informing the reader of what is happening, or at least saying here be dragons or similar.

    All it needed was: /* Reading some uninitialized memory to get a randomization seed. */

    --
    NZ Electronics Enthusiasts: Check out my Trade Me Listings
    1. Re:Comment! by jareds · · Score: 1

      That's not how it went down. There was a place that used unitialized memory:
      #ifndef PURIFY
      MD_Update(&m,buf,j); /* purify complains */
      #endif

      This neither hurt nor realistically helped much, and it was totally harmless for the Debian coder to remove it. As you can see, the OpenSSL code already had it under an ifdef in case you don't want to use it due to a memory checking tool. It was entirely unnecessary to warn about removing the code or defining PURIFY, since doing so is perfectly safe.

      The problem is that the Debian coder also removed the line:
      MD_Update(&m,buf,j);
      This was in a completely different function, where the variable buf was different and was initialized, and indeed was providing valuable entropy (from /dev/random on Linux, for example). It lacked the ifdef and comment about purify.

      We can't possibly expect the OpenSSL coders to comment every line of code that shouldn't be removed, but rather they should put code that can safely be omitted and which someone might want to omit under an ifdef, as they did here. MD_Update is called a bunch in that file. It would indeed be fairly ridiculous to have the comment, /* just because we're reading uninitialized memory here, and it's safe to omit this call to MD_Update by defining PURIFY, doesn't mean you can safely comment out MD_Update calls at whim, even if they use a variable with the same name as here */, which is apparently what it would have taken to stop this guy.

      See the diff.

  170. Mod that question up by Chuck+Chunder · · Score: 1

    I'd like a definitive answer too. SSH keys might be important to a lot of people but as they are usually within an organisation revocation can be managed. I'm not sure that is the case with keys that are used publically.

    Personally if the problem is with not particularly random (ie easily recreatable) keys then I don't see how the fact the key is signed by a third party makes any difference whatsoever.

    If someone can regenerate your key then they can use that regenerated key with your certificate (which is publicly available from your webserver).

    In fact even if you regenerate a new key/certificate, if someone has already captured your certificate then they can do this unless the users browser somehow finds out that your old certificate has been revoked.

    --
    Boffoonery - downloadable Comedy Benefit for Bletchley Park
  171. Re:It will be fixed by dissy · · Score: 2, Insightful

    I'm not trolling, but maybe open source isn't ready for the enterprise. Well, if you want 'enterprise' you should be using real enterprise software, like a solution from IBM, Sun Microsystems, or RedHat Linux.
    These companys will sell you a contract that DOES give your business recourse when something goes wrong.

    Most businesses don't need enterprise software though, so they stick with linux, bsd, windows, and mac os.

    Great... just when I had mostly convinced the PHBs in management that yes, open source software was trustworthy, and that yes, good developers write Linux, and snip Also it's worth pointing out, this one bug has zero to do with linux or opensource. OpenSSL IS secure. One guy broke the package and introduced this problem.
    It is still a bad problem, and there are alot of debian users, but just compared to all the linux distros out there, it is still only a percentage and under 100% (by Far under 100)

    What you are saying is basically that because I personally can download an opensource program, change (aka break) it, and give it to someone, that opensource in whole is broken, untrustworthy, and bad.

    Clearly that is just stupid.

    I suppose if you don't trust openssl anymore, for a problem that effects only debian users, compared to MS's bugs that give admin access to anyone on the internet from win NT4 up to Vista SP1, then that is your call. (I am curious how you might justify that to your PHB though)
    http://www.microsoft.com/technet/security/bulletin/MS08-001.mspx

    Thats akin to saying "I no longer trust the guy at the store since he shorted me $0.03 in change, so i'm gunna just trust the crackwhore at the corner to by the same stuff from."

  172. "Funny haha" vs "funny sheesh" by argent · · Score: 1

    Hashing newly received random data with the existing contents of a buffer is a completely standard cryptographic idiom.

    That's not the cleverly stupid bit. But I've already pointed that out.

    You say, I don't care, it's not important so go ahead and fix it.

    You're pointing at the wrong bloke: I didn't say "fix it", I said "document it".

    If you take a gun and aim it at your foot and pull the trigger, and it goes off, I'll give you a Darwin award (albeit with a nervous laugh). But if the guy who loaded the gun doesn't at least feel bad about leaving a loaded gun around, well, he's taking the Darwin awards too seriously. This kind of thing isn't "funny haha", it's "funny sheesh" (as Daffy Duck says, or is that Sylvester?).

    1. Re:"Funny haha" vs "funny sheesh" by Free+the+Cowards · · Score: 1

      You say, I don't care, it's not important so go ahead and fix it.

      You're pointing at the wrong bloke: I didn't say "fix it", I said "document it". I was trying to explain what happened by putting you in the place of the OpenSSL developers. The Debian maintainer proposed a completely benign fix, which they approved. He then completely botched the fix, totally destroying the security of his branch, and never told those OpenSSL developers about the changes he had made. There is simply no way to pin this on the OpenSSL developers.
      --
      If you mod me Overrated, you are admitting that you have no penis.
  173. Re:It will be fixed by makomk · · Score: 1

    Looks like the person asking the question didn't provide enough context. Commenting out the second "MD_Update(&m,buf,j);" is perfectly safe; commenting out the first one is dangerous, but unless you look at the surrounding context this isn't obvious. (If you do look at the context it's in, it's fairly clear that removing it is a very risky idea and potentially affects seeding of the RNG from sources other than uninitialised buffers.)

    The OpenSSL developers are right to say that not using uninitialised data as an entropy source is safe, but didn't spot the implications of the suggested code removal. Some people did suggest building with -DPURIFY, though (which does the right thing).

  174. Tor also affected by Anonymous Coward · · Score: 0

    It appears that the Tor network is also compromised by this bug:

    http://archives.seul.org/or/announce/May-2008/msg00000.html

    IMPACT:
        A local attacker or malicious directory cache may be able to trick
        a client running 0.2.0.x into believing a false directory consensus, thus
        (e.g.) causing the client to create a path wholly owned by the attacker.

        Further, relay identity keys or hidden service secret keys that were
        generated on most versions of Debian, Ubuntu, or other Debian-derived OS
        are also weak (regardless of your Tor version):
            http://lists.debian.org/debian-security-announce/2008/msg00152.html

    Given that Tor is relied on in some pretty scary places (China, etc.), I wonder if anyone will get killed because of this.

  175. OpenSSL guy is blowing smoke. by argent · · Score: 1

    That's what I thought originally, but the whole business about the randomness of the stack frame is a red herring. The randomness in the stack frame isn't being used for anything, it's just that there's no reason to care what was in the buffer, so it didn't matter that it wasn't initialized.

    I think that is a silly optimization, but it didn't hurt. What hurt was not documenting it, leaving a big old tiger trap with an illusionary bug as bait for a careless bug-hunter to fall into.

    The waffling about the minor improvement in randomness from the stack frame is just blowing smoke to distract attention from the fact that they didn't write "this is not a bug" on the bait they accidentally left by the hole. It's "oops" all around this time.

  176. Pay no attention to the weasel behind the curtain by argent · · Score: 1

    I was trying to explain what happened by putting you in the place of the OpenSSL developers.

    I'm not nearly obdurate enough to write security software. You gotta be a hard boy for that stuff, so I can't wear those shoes no matter what.

    OK, so the code didn't confuse them, and the bloke waffling about the minor advantage of using the stack frome for extra randomness was deliberately blowing smoke, that's fine, that was a side issue anyway. The main issue is that you put a note up saying "OH HAI, I'M NOT A BUG!" next to code that might look like a bug (especially when you've already to #ifdef it out to get it to pass a bug checker).

    I've seen way too much of this cleverly stupid stuff over the past 30 years, I've even done some of it back in the day when I was younger and less familiar with the traps that lay in wait for the stupidly clever. And I wouldn't have even commented about it except that this fella decided to explain how the original code was clever enough to put a tail on and call it a weasel. It ain't. That's all.

  177. Debian project by Anonymous Coward · · Score: 0

    Please explain how the Debian package mantainer is 'not the Debian guy'.

  178. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  179. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  180. The human kind of idiot by Chuck+Chunder · · Score: 2, Insightful

    Frankly the guy probably doesn't need ragging on (in fact people should be checking he's ok).

    A small coding mistake has had rather nasty and rather public consequences.

    What does bear scrutiny is the process. In such a critical package should it really come down to just one guy? On such a critical package should Ubuntu not have their own man double checking everything rather than just accepting changes from Debian.

    You can't make people infallible, but you improve the system to better mitigate such fallibility.

    --
    Boffoonery - downloadable Comedy Benefit for Bletchley Park
  181. Re:It will be fixed by CrazyKen · · Score: 1

    I don't know why people are tagging this "Informative" when it's obviously a joke. Stupid /.'ers

  182. Re:It will be fixed by Kjella · · Score: 1

    Well, what makes the difference is the security team, Microsoft don't go around patching other people's software. I read a bit of the discussion, and it ended mostly like this:

    Firefox has a trademark and they won't let anyone use it to stop scumware builds, particularly on Windows that doesn't use repositories.
    Debian has a security team that refuses to be prevented from making security patches, otherwise they'd get very little done.

    Compromises were tried like the security team uploading patches to firefox for validation, but as a matter of policy Debian wouldn't commit to waiting for those. Firefox couldn't accept temporary hotfixes during a security crisis, the requirements on code approval were absolute. Firefox was looking into giving them some sort of trademark license, but since it'd only apply to Debian they couldn't take it under the DFSG #8. Obviously granting a free-for-all license would nullify the whole point of the trademark and was out of the question. And since the issue had been raised and trademarks must be defended, Firefox had no other choice than insisting that Debian stop using it.

    I think it would be a terrible result if every upstream package trademarked themselves to prevent downstream patches. Imagine the Linux(TM) Apache(TM) MySql(TM) PHP(TM) stack running Gnome(TM) and KDE(TM) with applications like Firefox(TM) and OpenOffice(TM) all like that, being a distro would be almost meaningless since they'd all be exactly the same and bound on hands and feet. Distros aren't in general trying to be idiotic, and you can point to issues like this to see why it's a really bad idea. Still I think it would be much saner to continue letting downstream make patches under the GPL and leave trademarks out of it. In a free market, distros that make stupid decisions downstream should be taken care of by natural selection.

    --
    Live today, because you never know what tomorrow brings
  183. Re:It will be fixed by Anonymous Coward · · Score: 0

    And the guy who says "go ahead" is listes on http://www.openssl.org/about/ as a member of the The current OpenSSL development team

  184. Re:It will be fixed by Anonymous Coward · · Score: 0

    At no point should Kurt have committed this change, openssl-dev advised or not. In the bug report he gave 3 options for resolution, picked one seemingly by his own findings, and committed. For this action to even occur to a core package is an indication of a serious management lapse within Debian. Why is OpenSSL in the hands of someone who doesn't handle crypto or core packages? And whose changes seem to have no oversight? This is absurd.

  185. Re:It will be fixed by DrJimbo · · Score: 1

    If you read all the comments following this rant, you will discover that the person who created the offending patch tried to check it with the OpenSSL devs by posting the patch to the openssl-dev mailing list.

    Unfortunately that list is not for OpenSSL devs, instead it is for users of OpenSSL. Therefore only other clueless users saw the patch. To reach the OpenSSL devs one needed to use the openssl-team mailing list instead of openssl-dev.

    IMO, this problem was due to a communication problem and it is hard to blame just one person for that. If I had to place blame, I would say the fault was with the poorly chosen names for the OpenSSL mailing lists.

    --
    We don't see the world as it is, we see it as we are.
    -- Anais Nin
  186. Re:It will be fixed by Chuck+Chunder · · Score: 1

    but it definitely does not affect Ubuntu prior to (and including ) 6.06 LTS.

    And praise be for that. When I looked at Slashdot this morning I thought was going to have a very crappy day today.

    I administer at least 8 multi-year wildcard certificates.

    If we hadn't gone with the LTS a lot of my time (and thousands of dollars) would have been wasted.
    --
    Boffoonery - downloadable Comedy Benefit for Bletchley Park
  187. Re:Smart, smart, very smart by Anonymous Coward · · Score: 0

    Well done. That is why I love you, NSA guys.

    P.S. Search for the new one already in place...

  188. Re:It will be fixed by Anonymous Coward · · Score: 0

    So what? We sell proprietary software (I'm a tester), and I know some of my coders have put in back doors that they haven't told the bosses about.

    "This back door will be removed before release, yes?"
    'Sure...'

    yeah, right.

  189. Lynx uses OpenSSL by robo_mojo · · Score: 1

    The Lynx browser uses OpenSSL!! So you text-only browsing folks would be toast if you didn't pay attention.

    Although as was already mentioned, most other browsers do not use OpenSSL. But, that doesn't mean the issue isn't important to casual webbrowser users, though!

    Had your favorite browser used OpenSSL (and as a casual user, you wouldn't know), your HTTPS communications could have been compromized. So it is vitally important to be concerned about things like this even if you aren't a SSH user or generate your own CA's or keys for any reason. Dismissing the problem for casual users because they don't actively generate keys would be wrong.

    And there's always the risk of getting MITM'd when talking to someone using a weak key, so you'd want to make sure you don't talk to people with weak keys (the code should take care of this too, but it might not always be possible to detect, so you should ask your bank or whoever if their keys might be bad).

    In the end it is the casual users who get bitten the worst by things like these, simply because they aren't aware that a problem might affect them.

  190. You missed the obvious candidate by Chuck+Chunder · · Score: 1

    Verisign

    Considering how much they charge for certificates it's not hard to imagine them making millions out of people buying new certificates.

    --
    Boffoonery - downloadable Comedy Benefit for Bletchley Park
    1. Re:You missed the obvious candidate by Antique+Geekmeister · · Score: 1

      What? Verisign sells SSL keys, not SSH keys. That's a very different market: SSH keys are not signed by a central authority and ideally are generated by the user.

    2. Re:You missed the obvious candidate by Antique+Geekmeister · · Score: 1

      Please allow me to correct myself you're quite right about the SSL keys, I was focusing on the SSH keys.

  191. Steady on!!! by syousef · · Score: 1

    In this case there was an added muppet who did something they shouldn't have ...
    OSS is great but it required great developers

    Steady on. This guy just made a coding mistake. Even the best coders do that from time to time.

    How would you feel about people who know nothing about you going on about what a muppet you are for FOSS work you did, probably for free, at who knows what time of day and under who knows what circumstances. Way to encourage people to contribute.

    This guy probably owes the community an apology of the "whoops, truely sorry, feel sheepish" variety, but doesn't deserve to be called a muppet or a bad developer.

    Do you really wonder why Linux hasn't taken off if this is the respect that can be expected from the community?

    given that it has take well over a year to get the advisory out it shows that the many eyes piece didn't work here, mainly because the eyes were looking at the original source not the botched packaging job.

    Many eyes increases your chances, it doesn't give you an iron-clad guarantee.

    --
    These posts express my own personal views, not those of my employer
  192. Re:It will be fixed by robo_mojo · · Score: 1

    whooooosh

  193. Re:It will be fixed by robo_mojo · · Score: 1

    Some CA's allow users to have their certs re-issued for free a limited number of times.

  194. Re:The big question is.. or there is no question? by Anonymous Coward · · Score: 0

    Had you tested randomness of the memory? That kind of randomnes stinks for a mile. Sorry to say it but it seams that no crypto people can do opensource (or do not want to).
    Whem we are about seed sources - may be someone with the academic background could 'backfire' some students to do randomness studies that could be later published under 'open' licence? I remember analysis of the DRAM memories I have done years aga and it was clear that that can not be a seed source (even preprocesed). Also state of the memory in the live system could be hardly treated as random. Only 'true' sources of randomness would be well processed human interraction and to some degree traffic on the net. So why memory was used? Was there a call to make it to some degree less random? Or just there are no people / time& money for the analysis etc.
    Worth thinking about when planing a new open source project...

  195. Re:It will be fixed by Anonymous Coward · · Score: 0

    If some coder did this at a company at least I'm pretty confident they'd get their ass fired, but with open source it's basically "whoops, my bad." Hahahahahahahaha. What are you smoking man? The odds are astronomically higher that nobody would even notice this sort of mistake. The chance of someone being fired is so minute it makes spontaneous combustion sound likely.

    Why do people have this myth that just because a company is 'for profit' and 'propietary' that they somehow have a magical and perfect development process? Some guy showing up 9-5 for a pay check is going to rigoursly hand test every line of code in whatever product they release?
  196. Imagine if Microsoft had done this by Anonymous Coward · · Score: 0

    I think the tagging would have been a lot less gracious

  197. Re:It will be fixed by AigariusDebian · · Score: 4, Informative

    I cann't claim to 100% understand the situation but after glancing trough the logs of the discussions and of the patches the conclusion I came to was this - OpenSSL used supposed randomness of the uninitialized memory as an added source of entropy (interesting hack, but not an example of good coding as such). Valgring caught that problem and the Debian maintainer during a cleanup fixed it. Making such a fix can be considered a preventive step against possible attack vectors by poisoning the uninitialized memory. He took it up to upstream, they did not raise red flags, but did not quite merge the âclean upâ(TM) patch either. It fell through the cracks.

    The problem is that in the same file, in another function all other sources of entropy were being merged into the pool of randomness using exactly the same code line as the one code line flagged by Valgrind. The maintainer assumed that the second code line has a similar function to the first and commented that one as well. AFAIK that also did not show up in the emails to the upstream list.

    So we have:

            * Upstream using clever hacks that rely on uninitialized memory having some randomness to it
            * Upstream using same code and same variable names to describe different things
            * Upstream having no comments in the code explaining the two things above
            * Maintainer slightly over-generalizing a change
            * A bug slipping trough the cracks in the review processes
            * Another Debian Developer discovering the bug and recognizing its significance despite all of the above
            * Debian project coming out and admitting all of the above and scrambling to get fixes out to its users ASAP

    I am impressed by the swift action of the people involved in fixing this. And while I think everyone can find some lesson be learned here, I think this is another good example of free software in action. And I hope that in the aftermath of this we will find ways to prevent this from happening in the future without stifling our progress.

    http://www.aigarius.com/blog/2008/05/14/too-similar-to-be-different/

  198. apt-get upgrade does NOT FIX PROBLEM by Anonymous Coward · · Score: 0

    apt-get upgrade doesn't even fix the real problem...

    Why? Who knows--the debian people are even more stubborn idiots than the BSD community, and don't even spit out appropriate warnings. Oh, they'll restart my sshd--that's great. Is it a problem that my crypto-libs were weak--sure. A bigger problem is that all of my ssh sessions were *STILL* insecure even after the patch because the debian people couldn't be bothered put in a three line prompt to regenerate the crippled things.

    "rm /etc/ssh/ssh_host_*" and regenerate them "dpkg-reconfigure openssh-server" --piece of cake...

    Oh--they have it on the wiki, but their damned "security fix" doesn't even fix the ssh service.

  199. Re:It will be fixed by Archangel+Michael · · Score: 2, Informative

    Why stop with just compiling source?

    Why not read every line, of every piece of code you compile, to make sure it wasn't tampered with?

    Why not write your own code, code you review yourself and compile and maintain for your own use?

    Unless you write, review, compile every piece of software source yourself, you have to trust someone to do at least one of them. At that point, you trust someone to do it for you, and you're already where your compaint lies. Its just that you don't realize it yet.

    Compiling code you've never looked at is just as risky as trusting that someone to write the code for you. In fact, I suspect that the Debian Source would have compiled with the same problem, had you compiled it yourself.

    So no, compiling from source (Debian) wouldn't have solved this problem, unless you could realize and fix the changes from the Debian Source and the Master Source yourself. But you didn't, someone else did.

    Your point is kind of moot, isn't it?

    --
    Agent K: A *person* is smart. People are dumb, stupid, panicky animals, and you know it.
  200. Ubuntu update running on my Dell this minute... by grikdog · · Score: 1

    Ubuntu has released an OpenSSL fix already, it seems.

    --
    ``Tension, apprehension & dissension have begun!'' - Duffy Wyg&, in Alfred Bester's _The Demolished Man_
  201. Re:It will be fixed by Anonymous Coward · · Score: 0


    The difference in consequences doesn't really mean anything though; if it happened at a private company, then it still happened. So the advantage to a company buying their software would be... what, exactly?

  202. Re:It will be fixed by appelza · · Score: 1

    Don't get me wrong, I'm not attacking Debian at all. I'm saying that the poster I replied to is infact wrong by saying 'any other distro' in this case as the bug is caused by a Developer who changed the package so it conforms to the guidelines, and made a mistake.

  203. Re:It will be fixed by Anonymous Coward · · Score: 0

    The Debian guy talks about debugging, then asks about removing the lines. I can't tell from the context there if the OpenSSL guys thought he was asking about a build for debugging only. After all, they didn't remove the lines from their code, and one of the guys replies one of the lines was already commented (when building for debug, with -DPURIFY).

  204. Re:It will be fixed by syousef · · Score: 1

    If some coder did this at a company at least I'm pretty confident they'd get their ass fired

    How does firing a coder who made a mistake fix your company's problem after the fact? People make such mistakes despite such incentives. What's more the practice of firing someone for making a single coding mistake is stupid. If you want that level of security you need lots of peer review.

    All this would do is make someone feel good that someone got the boot for it. Your keys are still compromised.

    --
    These posts express my own personal views, not those of my employer
  205. Proof of concept code/data by Anonymous Coward · · Score: 0

    sample bash script + 64k of rsa+dsa default keys, on amd64 target

    http://hysteria.cz/sd/debilian/

  206. ubuntu updates also regenerates keys??? by Paul68 · · Score: 1

    around 7.30 CET DST the ssh server keys were regenerated on our Ubuntu 7.10 boxes, which we noticed because the ssh client complained.

    While it is good that this has increased security our first reaction was to wonder if we had been hacked.

    One wonders, is there a good way to recover from a security gaff like this?

  207. Re:It will be fixed by Anonymous Coward · · Score: 0

    this is exactly what he did. And upsteam agreed it was a good idea

    http://marc.info/?l=openssl-dev&m=114652287210110&w=2

    Ronny

  208. Re:It will be fixed by jimicus · · Score: 1

    Well, if you want 'enterprise' you should be using real enterprise software, like a solution from IBM, Sun Microsystems, or RedHat Linux.
    These companys will sell you a contract that DOES give your business recourse when something goes wrong. Read such a contract. It almost always boils down to "best efforts".

    If you were exploited by a 0-day bug in code that was in OpenSSL at source (rather than any patches your distro maintainer had added), everyone else was also vulnerable but you happened to be the unlucky one who was exploited, I suspect the contract wouldn't be terribly useful.

    This is why you don't rely on one thing as your sole source of security. In this case, you'd probably want to configure SSH to deny root logins, set up something like DenyHosts to thwart bruteforce attempts and maybe run some sort of intrusion detection system - preferably connected directly to a firewall so detected intrusion attempts can be automatically blocked.
  209. Re:It will be fixed by jimicus · · Score: 1

    Every Debian-based distro generates SSH host keys upon installation, and turns on sshd by default.

    Except for Debian. The standard install (with none of the optional extra packages) does not include OpenSSH.
  210. Re:It will be fixed by Jellybob · · Score: 1

    I don't know about a full blown certificate agency, but where I'm working it shouldn't be too much work, since we use CF Engine to distribute certificates out to our servers from a central repository.

    It would still be nice if we didn't have to fix problems caused by some idiot with no understanding of crypto though.

  211. Re:It will be fixed by Jellybob · · Score: 1

    If my CA issued me with an insecure certificate, then I'd expect them to be reissuing for free whatever there usual policy is.

    Sure as hell I wouldn't be paying for the priviledge of having a known problem fixed - especially since it doesn't actually cost them anything more then a process or two to regenerate a certificate.

  212. Re:It will be fixed by jareds · · Score: 1

    * Upstream using clever hacks that rely on uninitialized memory having some randomness to it

    It was unimportant and could be commented out at whim without breaking anything.

    * Upstream using same code and same variable names to describe different things

    The code was MD_Update(&m,buf,j);. If you look at variable names like "m", "buf", and "j" and conclude that every distinct use of those names describes the same thing, you need your head examined.

    * Upstream having no comments in the code explaining the two things above

    Regarding the first thing, it was under an ifdef and at least had an overly terse comment noting why. Regarding the second, I'd hate to have to wade through drivel explaining that calling MD_Update with different buffers does different things. That would just drown out code and useful comments.

    I'm not an OpenSSL developer, the code is poorly commented, etc., but it's obvious that it's poorly commented and it's obvious that "buf" does not necessarily mean the same thing each time it's a paramater name, regardless of whether more descriptive names are better.

  213. Re:It will be fixed by lpontiac · · Score: 1

    I don't believe such machines would be remotely vulnerably to a direct assault, but a weak host key would make logins to that machine vulnerable to a MITM attack.

  214. Re:The big question is.. or there is no question? by Goaway · · Score: 1

    Please read the other replies in this thread. I am getting tired of answering this.

  215. Re:It will be fixed by locofungus · · Score: 1

    How a cascade of small failings lead to a major disaster.

    OpenSSL leave in an "uninitialized memory read" because it "doesn't matter and might help". This is a bug. It does matter. The fact that all compilers will deal with this bug in a way that is OK is not sufficient in security critical code. Once you reach this point _anything_ can happen. If the compiler decides to flag this memory as read only and never modify it again then that is allowed. I can't imagine why a compiler or system would do something like this but it's allowed to. The OpenSSL code is non-portable and fragile.

    And many people will be using this library in places where the memory is guaranteed to be initialized a particular way. Either this doesn't matter (in which case it doesn't matter if the uninitialized memory is initialized to a known state at the start) or it does matter in which case OpenSSL is broken on platforms where this memory is not random.

    Debian spots this uninitialized read and tries to fix it. The proposed update is passed upstream but the email is ambiguous as to what exactly is required.

    OpenSSL team do not jump on this. If the email went to the wrong address then the right address should have been provided (and the email forwarded as a courtesy). If this was an update to sensitive, critical code (which it was) then someone should have said "hold on there, this is sensitive code and introducing bugs here is really serious. We need a precise patch, we need time to evaluate the patch, we need time to work out how to fix the underlying uninitialized memory bug."

    I haven't looked but has the underlying bug in OpenSSL been fixed even now? We've got an "undefined behaviour" bug in what we now know to be a critical path in OpenSSL. IMO Debian are doing the correct thing in fixing this bug if upstream hasn't fixed it.

    Have Debian logged a bug with upstream? (Unfortunately, I suspect if they did this now it would "go political" - but I hope I'm wrong)

    At the end of the day lots of people got things wrong. I feel particularly sorry for the Debian developer who appears to have done everything he reasonably could but still got caught out.

    YMMV.

    Tim.

    --
    God said, "div D = rho, div B = 0, curl E = -@B/@t, curl H = J + @D/@t," and there was light.
  216. 16 bits of entropy are guessable by Mathinker · · Score: 1

    The bad version could only generate 2^16 unique keys for each length of key. The only source of entropy for those keys was the process ID.

    1. Re:16 bits of entropy are guessable by spazdor · · Score: 1

      So a rainbow file of 64k keys is all it takes? ...EEK.

      --
      DRM: Terminator crops for your mind!
  217. Re:It will be fixed by Jellybob · · Score: 1

    I stand corrected - it was indeed 2006 looking at the advisory again.

  218. Re:It will be fixed by Anonymous Coward · · Score: 0

    Don't go bragging. A lot of people know the key to rooting your wife's box. best call evar.
  219. What does this mean? by Anonymous Coward · · Score: 0

    I know SSL has something to do with https, but that's about it.

    The thing is, I was considering trying out Ubuntu (always used Windows) and I know you can download a fix for this key thing, but:
    - Are there any keys generated on install?
    - How would you regenerate any keys?
    - Where are these keys anyway??

    Basically, how does this affect a fresh Ubuntu install?

  220. Re:It will be fixed by eean · · Score: 1

    While not a security argument, I would say that the main argument against the patch was that you shouldn't change runtime behavior just to make debugging easier. Which I think is a good idea, especially for downstream. If they had followed this idea, the patch would never have been committed.

  221. Re:You stupid god damned open sourcers by Anonymous Coward · · Score: 0

    At least in the Open Source world someone caught it. If this happened at Microsoft it would probably *never* be found. NO ONE would be held accountable. If you think you don't have holes in your Windows boxes, ask youself why there is "Patch Tuesday".

    Fuck you, you gutless, cowardly troll!

  222. Tor Hidden Servers .onion MITM attacks by Anonymous Coward · · Score: 0

    Maybe this explains why so many popular Tor Hidden Server .onion sites went down so quickly. Read torproject.org and the related announcement + the Tor Blog for more info. If you run a tor server, please read! If you're just a tor user, please read!

  223. Small but crucial distinction. by Grendel+Drago · · Score: 1

    The problem isn't with people generating their own certificates, but rather with people generating their own keys. Certain kinds of hosting generate your key for you, but you shouldn't really be using them. (And you'd have to know if they were using a compromised version of OpenSSL.)

    It's easy enough to test for this; you should have a private key for your SSL cert. Run "openssl-vulnkey commercial.key" (or whatever your key's filename is) on a patched machine in order to test it. The one that my organization is using, for instance, comes up compromised.

    (Coming up not-compromised wouldn't have meant that the key was definitely in the clear, but coming up compromised means that you definitely need to replace it. Enjoy paying for your incredibly expensive bits yet again.)

    --
    Laws do not persuade just because they threaten. --Seneca
  224. Debian "Moles" What Prevents Them? by Anonymous Coward · · Score: 0

    I'm not placing blame on anyone, but let us consider for a moment:

    How long would it take a member of a rogue organization, a company such as Microsoft, or an intelligence agency to land a spot into such a role as a code monkey at Debian.org, under the guise of a pro-FOSS person? You do know all three examples above are quite savvy when it comes to infiltration, mafias, corporations, and intelligence agencies do this all of the time. So let us suppose this is what happened here, and considering the wide range of impact with this issue, I believe this is exactly what may have happened.

    What checks and balances are in place to weed out potential moles? Any? And would you really know what to look for even if such a policy is in place? Perhaps this question is worthy of an "Ask Slashdot" submission?

    1. Re:Debian "Moles" What Prevents Them? by Mysteray · · Score: 1

      I doubt that a malicious mole would have invited this exchange. But perhaps that makes it all-the-more brilliant, hmm?

      Seriously, if one wanted to compromise the Debian codebase, there'd be far subtler places to do it. The fact that this gaping hole went undetected for two years suggests that there's probably little need to insert new ones.

  225. Check those CA contracts... by sunbird · · Score: 2, Interesting
    Look on your CA website for the contract that governs your CA. It should have a clause on revocations. For example, this is the .pdf for ipsCA's contract (.pdf, only in Spanish) and it clearly provides that if there's a problem with the certificate that makes it untrustworthy, you get a new one for free.

    This is page 45-46, which talks about the reasons why a certificate may be revoked:

    Los Certificados deberán ser revocados cuando concurra alguna de las circunstancias siguientes:
    *snip*
    Por cualquier causa que razonablemente induzca a creer que el servicio de certificación haya sido comprometido hasta el punto que se ponga en duda la fiabilidad del Certificado.

    Rough translation: The certificate may be revoked when ... there's something that makes you reasonably believe that the certificate has been compromised to the point that it is not reliable.

    And then on page 47 it says:

    La revocación del Certificado por causa no imputable al Suscriptor originará la emisión de un nuevo Certificado a favor del Suscriptor por el plazo equivalente al restante para concluir el período originario de validez del Certificado revocado.

    Rough translation: If the revocation of the certificate is not the fault of the subscriber (that's you), then you get a new certificate with the same validity period as the old one.

    Obviously, you have to check with the contract governing your CA, but you might find something similar, so check with your CA before paying for new certs.

  226. Wrong... by Andor666 · · Score: 1

    Very, very wrong...

    Also on the client side you generate certificates, i.e. if you generated certificates for doing password-less login to a machine...

  227. We do. by Grendel+Drago · · Score: 1

    OpenSSL used a variety of sources of randomness all mushed together, including /dev/random and whatever else the developers could think of. One of these methods of randomness was looking into uninitialized memory space. Because a debugging tool (valgrind) about that, the Debian guy commented it out (with an okay from the upstream mailing list). However, he made a rather ham-handed mistake and removed all sources of entropy (with the exception of the current process ID, which counts only enough to hide this bug rather than make it crushingly obvious) rather than just the one.

    So, now it's time to buy stock in Verisign, in Thawte, in whoever's going to be scoring a huge windfall off of this.

    --
    Laws do not persuade just because they threaten. --Seneca
  228. Even bigger than you think. by Grendel+Drago · · Score: 1

    The SSL key my workplace uses to secure our websites is vulnerable. Now, of course we're getting it revoked and replaced with a non-vulnerable one, but that doesn't stop the problem. How many web clients actually check CRLs? Given that CRLs are a terribly stupid idea and nobody uses them anyway, how many web clients actually check the embedded OCSP URLs in certs that support them? (It's under Preferences/Advanced/Encryption/Verification in Firefox 2, and it's disabled by default.)

    An as-yet-undetermined set of SSL websites are vulnerable (until their certs expire) to being hijacked and masqueraded-as--with that shiny yellow bar at the top, no less. And if there are any root CA keys out there that are vulnerable to being guessed? This problem is going to be with us for years.

    --
    Laws do not persuade just because they threaten. --Seneca
  229. That's not a security hole. by Grendel+Drago · · Score: 1

    A patched machine will reject logins using blacklisted keys. Of course, this means that when you ssh into one of them and update the packages, you'd better have your new, fixed keys installed, or else you'll be locked out of your server.

    I suppose you'd better hope you don't have security updates automatically installing themselves.

    --
    Laws do not persuade just because they threaten. --Seneca
    1. Re:That's not a security hole. by halsathome · · Score: 1

      An authorized_hosts file with a weak key anywhere in your organization will have been a hole letting people in, compromising even the non-weak keys on that account. So the authorized_hosts file on the NEXT machine over, even though it looks good, may now be a hole letting the baddies in.

  230. Not exactly. by Grendel+Drago · · Score: 1

    The CA has to add your cert to their CRL and make that list widely available until the cert expires. They also may have to run an OCSP responder to let users know that it's been revoked. (The fact that pretty much nobody actually uses these mechanisms doesn't change anything.)

    Additionally, it's almost certain that this isn't the CA's fault; people generally generate their own RSA keys, then send a CSR to the CA to get them signed. It's not the CA's fault if the original key was bad, and there's nothing they could have done about it at the time in any case.

    --
    Laws do not persuade just because they threaten. --Seneca
  231. Keys are generated, yes. by Grendel+Drago · · Score: 1

    Your system, when an SSH server (the package on Debian or Ubuntu is called "openssh-server") is installed, it generates host keys (that is, secret keys that identify your computer uniquely). This update will regenerate the keys for you, though you can do it manually (as root: "rm /etc/ssh/ssh_host*; dpkg-reconfigure openssh-server") if you need to for some reason. Note that regenerating your keys will not fix anything unless you install the update first, because the generated keys will still be weak.

    If you or anyone else logs into your machine via SSH, they'll get a warning about the host keys having changed. If you log into anyone else's machine via SSH, you'll need to make yourself new keys (by running ssh-keygen) and send everyone your new public key.

    If you run an SSL website with an affected key, you'll have to get the certificate revoked by the issuing CA, and get a new key signed to make a new cert.

    There's a list of applications which may be using weak keys at the Debian wiki. If you're not running any kind of server, it's likely that you're only going to need to replace your SSH keys, as described previously.

    Those who administer servers are in for a significantly bumpier ride.

    --
    Laws do not persuade just because they threaten. --Seneca
  232. Thawte is wrong by CoolQ · · Score: 1

    Generating a certificate involves generating a public and private key pair. You provide the public key to the CA (e.g. Thawte) and they give you a certificate which says that the corresponding private key is to be trusted. What matters is where the public/private key pair were generated. If you did that on a vulnerable Debian/Ubuntu machine, your certificate absolutely is vulnerable. The vulnerable act is the generation of the keys, not the signing of the certificate.

    --Quentin

  233. Re:It will be fixed by spuk · · Score: 1

    If the compiler decides to flag this memory as read only and never modify it again then that is allowed. I can't imagine why a compiler or system would do something like this but it's allowed to. That's interesting, but care to point to the reference/spec stating it?
    --

    "Video bona proboque; deteriora sequor." -- Ovid
  234. Re:It will be fixed by Mysteray · · Score: 1

    How a cascade of small failings lead to a major disaster. OpenSSL leave in an "uninitialized memory read" because it "doesn't matter and might help".

    I think you're putting words in their mouth. The OpenSSL developers didn't lazily "leave it in" and dismiss legitimate concerns by saying "it doesn't matter". They wrote it that way intentionally.

    This is a bug.

    No, it's not a bug. In C, if someone you passes you a buffer of a stated minimum size, there's nothing wrong with you reading from it. There's no such thing as "write only" memory.

    Sure, 99.5% of the time, mediocre C code reading such memory indicates an error. Most programs are not in the business of accumulating entropy. Tools like Valgrind pick up on that to warn about it, and as useful as they are, they're no "gold standard" of program correctness.

    However, accumulating entropy for random number generation is an entirely valid use of such a technique. The OpenSSL developers knew exactly what they were doing, and this happen to be one of those 0.5% function which legitimately reads allocated-but-uninitialized memory.

    The Debian developer appears to have been robotically following "policy" and changed code without fully understanding its consequences.

    It does matter. The fact that all compilers will deal with this bug in a way that is OK is not sufficient in security critical code.

    The security-critical code behaved correctly before the "fix".

    Once you reach this point _anything_ can happen. If the compiler decides to flag this memory as read only and never modify it again then that is allowed. I can't imagine why a compiler or system would do something like this but it's allowed to. The OpenSSL code is non-portable and fragile.

    I know OpenSSL to be a portable program by virtue of the fact that it has been ported to many platforms.

    Perhaps it is a bit fragile, but considering how much effort has gone into providing so many algorithms with hand-tuned assembly for multiple processor architectures, I'm willing to overlook it a bit. And every common platform except those from Microsoft (and perhaps now Debian), I can expect that someone else has done a reasonable job of packaging it for me.

    And many people will be using this library in places where the memory is guaranteed to be initialized a particular way. Either this doesn't matter (in which case it doesn't matter if the uninitialized memory is initialized to a known state at the start) or it does matter in which case OpenSSL is broken on platforms where this memory is not random.

    It's not your false dichotomy of "does/doesn't matter". Entropy is accumulated when it is available, and is not decreased when it is not. Since there's not a source of perfect entropy available, we need to take what we can get, whenever we can get it.

    Debian spots this uninitialized read and tries to fix it.

    It's not a bug, and shouldn't be "fixed".

    The proposed update is passed upstream but the email is ambiguous as to what exactly is required. OpenSSL team do not jump on this.

    That exchange looks like a beautiful example of miscommunication. I don't think it ever occurred to the OpenSSL developers that the Debian guy was thinking about commenting out all entropy mix-in for the production release!

    If the email went to the wrong address then the right address should have been provided (and the email forwarded as a courtesy). If this was an update to sensitive, critical code (which it was) then someone should have said "hold on there, this is sensitive code and introducing bugs here is really serious. We need a precise patch, we need time to evaluate the patch, we need time to work out how to fix the underlying uninitialized memory bug." I haven't looked but has the underlying bug in OpenSSL been fixed even now? We've got an "undefined behavio

  235. MOD PARENT DOWN by jareds · · Score: 2, Informative

    This is dangerously misleading! Blocking IPs after a reasonable number of failures stops only one particular attack against SSH. It prevents someone from logging into a user account that has a compromised-Debian-generated SSH public key by brute force, trying all possible compromised-Debian key pairs. There are a number of other attacks.

    The most serious involve the SSH host key. The public host key is given to anyone who attempts to connect to the machine, whether they succuessfully authenticate or not. This must be the case -- giving out the public key is part of establishing an encrypted connection, and you must have encryption before you send your password or something. An attacker can connect ONCE to your server and, from the public host key, lookup the corresponding private key offline in microseconds. They can then decrypt any SSH communications they can sniff where that server is the server. You have little more security than telnet. They can perform a man-in-the-middle attack on the server. Even if a user is carefully using public-key authentication with something other than a compromised-Debian-generated key rather than password authentication, if they connect to a server with a compromised-Debian-generated host key, they might be connecting to a MITM attacker who can then perform any action on the server as said user.

    Public-key authentication is still seriously vulnerable even if you limit the number of attempts. Normally, I can generate a key pair on machine A and set up machines B and C to allow me to log in with that public key, and a root attacker on machine B or C will not be able to access the other machine with my identity. If machine A is a compromised-Debian machine, this no longer holds. Anyone with access to the public key can immediately obtain the private key and impersonate me. Moreover, I normally wouldn't take the same precautions with my public key as my private key, but with a compromised-Debian-generated key pair they are practically equivalent. In general, there is no basis to rely on the public key being secret, which you implicitly recommend doing.

    Any rational and informed person will immediately regenerate all key pairs generated with a compromised-Debian machine, and remove such public keys from any authorized_keys files in which they appear. They would also do well to consider the Ubuntu strategy of rejecting known weak public keys for public-key authentication.

  236. We just smiled and waved .......... by psycho+sparky · · Score: 1

    Sittin' there on that sack of seeds!

  237. Please leave the source code alone... by koffie · · Score: 1
    Congratulations, you hit the nail exactly on the head saying:


    "Having distributors randomly change source code as they package it is fundamentally broken."

    This is one of the reasons I switched to BSD, where such things tend not to happen.

    1. Re:Please leave the source code alone... by Anonymous Coward · · Score: 0

      Do you have any clue how the ports system works. Hint: it patches localy.

  238. Re:It will be fixed by locofungus · · Score: 1

    In the old ANSI C standard (sorry I don't have the new one on my desk) it's in section A.6.2

    Undefined behavior:

    The behavior in the following circumstances is undefined:

      * The value of an uninitialized object that has automatic storage
          duration is used before a value is assigned ($3.5.7).

    Tim.

    --
    God said, "div D = rho, div B = 0, curl E = -@B/@t, curl H = J + @D/@t," and there was light.
  239. Re:It will be fixed by locofungus · · Score: 1

    No, it's not a bug. In C, if someone you passes you a buffer of a stated minimum size, there's nothing wrong with you reading from it. There's no such thing as "write only" memory.

    Reading uninitialized memory invokes undefined behavior. Once you do that the compiler is allowed to do anything.

    * Undefined behavior --- behavior, upon use of a nonportable or
          erroneous program construct, of erroneous data, or of
          indeterminately-valued objects, for which the Standard imposes no
          requirements. Permissible undefined behavior ranges from ignoring the
          situation completely with unpredictable results, to behaving during
          translation or program execution in a documented manner characteristic
          of the environment (with or without the issuance of a diagnostic
          message), to terminating a translation or execution (with the issuance
          of a diagnostic message).

    Emphasis mine.

    Tim.

    --
    God said, "div D = rho, div B = 0, curl E = -@B/@t, curl H = J + @D/@t," and there was light.
  240. Re:It will be fixed by RiotingPacifist · · Score: 1

    Your point is kind of moot, isn't it? No my point is that your taking something people are giving your for free, then complaining that its not good enough, well go do it yourself.

    --
    IranAir Flight 655 never forget!
  241. Once it's patched, SSH denies blacklisted keys. by Grendel+Drago · · Score: 1

    The blacklist is active by default, at least on Ubuntu. Add a blacklisted key to an authorized_keys file and try to log in using it. auth.log on the server will have a line like the following:

    May 15 08:47:40 ns1 sshd[2989]: Public key 27:26:b8:52:d2:8e:7a:18:3f:8e:81:87:6b:7e:87:e9 blacklisted (see ssh-vulnkey(1))

    and the client will read Permission denied (publickey).

    Keys do need to be regenerated, but a patched system is not vulnerable to SSH key guessing, no matter what the authorized_hosts file contains. Bad keys will simply stop working. Any SSH remote-login vulnerability is fixed as soon as you dist-upgrade your packages, installing openssh-blacklist.

    (Okay, certain keys which have options on them weren't detected by the first version of the ssh-vulnkey tool, but now they are.)

    --
    Laws do not persuade just because they threaten. --Seneca
  242. Re:It will be fixed by Mysteray · · Score: 1

    Sure, the ANSI/ISO C standard does not prohibit Valgrind from terminating your process, or gcc from issuing code that reformats your hard drive. However, there's no law that says no programs can be written which do things not explicitly endorsed by that particular document. In reality, systems programming occasionally needs to use platform-specific functionality that comes from the the C language standard does not define. By your definition of "bug" one could not write an multithreaded application, OS kernel, debugger, or use a memory-mapped file.

  243. Re:It will be fixed by spuk · · Score: 1

    Nice, thanks.

    But the buffer passed to those functions is not necessarily in automatic storage, in that function the compiler can't treat it as undefined behavior. At least that is how I see it.

    --

    "Video bona proboque; deteriora sequor." -- Ovid
  244. Sabotage by Anonymous Coward · · Score: 0


    Microsoft implant?

    Why else would anyone be this stupid/clever?
    These changes had NOTHING to do with the packaging of the software.
    Read this again: The changes made had NOTHING TO DO with the proper packaging of the software.
    But it slipped by.
    Is anyone out there getting this?
    Microsoft has pwned every openssl "protected" box there is - for the past *two years*.

    Every Debian box is pwned, Ubuntu is entirely pwned.

    OSS? NICE TRY

  245. Re:It will be fixed by locofungus · · Score: 1

    It doesn't have to be the compiler.

    Imagine a new type of flash ram that can be in a low power, read only state or a high power read/write state per cell.

    It also has the property that the low or high power state is initially selected based on the first access. Once the low or high power state is chosen it can only be changed again by going though a complicated procedure.

    The compiler/system is allowed to assume that if it returns a block of memory from malloc etc that the first access will be a write. If you do make a read first then you will switch the memory into it's low power, read only state.

    Or say the memory is paged. The first write operation causes a new page to be allocated from the swap file but if you start with a read then that causes the paging mecanism to always return 0xFF for that memory.

    I'm not saying these are likely setups, but the C standard allows them.

    Tim.

    --
    God said, "div D = rho, div B = 0, curl E = -@B/@t, curl H = J + @D/@t," and there was light.
  246. Re:It will be fixed by cygonik · · Score: 1

    ..it's not the uninitialized buffers that are the issue. It's that the call to use info from the system entropy pool was *also* commented out, accidentally, in the process.

    Here's the basic flow as it was, with *EVERYTHING* else snipped out:

    Original:
    ----------
    Add the following to Our_Randomness:
          Lots of highly random info using system algorithms designed for the sheer purpose of being random
          Some rather random information from some rather random location in memory, causing a warning to issue forth from some compilation utilities
          A tiny amount of randomness from the kind-of-random process ID
    Generate Key, using Our_Randomness.
    ----------

    Debian seems to have intended to change this to:
    ----------
    Add the following to Our_Randomness:
          Lots of highly random info using system algorithms designed for the sheer purpose of being random
          A tiny amount of randomness from the kind-of-random process ID.
    Generate Key, using Our_Randomness.
    ----------

    That would have been fine.
    But instead, it was accidentally changed to:
    ----------
    Add the following to Our_Randomness:
          A tiny amount of randomness from the kind-of-random process ID.
    Generate Key, using Our_Randomness.
    ----------

    Notice the missing usage of "Lots of highly random info using system algorithms designed for the sheer purpose of being random".

    --
    I am not an atomic playboy.
  247. Re:It will be fixed by eean · · Score: 1

    Ah yep since I wrote the comment you replied to I read all this.

    I think the point made by one of the comments on the bug report saying something like "let's not change stuff just to make it debug easier" is a valid point, and what happened demonstrates why. I think this is also an issue and that this POV was ignored shows a problem with Debian's patching policy in general.

  248. Mod down the idiot parent post please by Anonymous Coward · · Score: 0

    Look there were two steps.

    1) Mix in randomness from strong random sources.
    2) Mix in 'randomness' from uninitialized memory.

    Because (1) exists (2) was at worst harmless and at best somewhat helpful. Clever hack.

    (2) caused an error to display in Valgrind. This was long known and a FAQ issue on the OpenSSL list. In fact, it was so well known that there was alread a handy #ifdef around it so you could easily turn it off with a -Dpurify flag to the compiler if you were doing valgrind testing.

    Unfortunately the person who decided to remove it (after being told by the OpenSSL devs to use the purify define) also removed the like which accomplished (1).

  249. this can ruin the party for some (or it can't) by MaoTse · · Score: 1

    I find all this rather unsuprising.

    Quality of some debian packages is really, really low - obviously fanatical adherence to the "bazaar" development model does not
    always pay off ...

    What's annoying is sheer arogance of lame folks.
    C'mon people. This is unix - not windows ;-)

  250. Re:It will be fixed by cygonik · · Score: 1

    Bah. Posted in response to wrong comment after copy/login/paste. My mistake.

    --
    I am not an atomic playboy.
  251. compromised by weierstrass · · Score: 1

    The weakness cuts the cost of brute-forcing down to minutes. There are only 65536 possible values for keys that are generated using this piece of code, and some of that space can be cut down using a little bit of knowledge (the 16 bit seed is the pid of the process, so it's not uniformly distributed. Pretty much anything that is worth the hassle of using ssh/SSL for is worth 20 minutes of an attacker's computing time (effective cost ~0).

    --
    my password really is 'stinkypants'
  252. What about data already recorded? by Anonymous Coward · · Score: 0

    Ok, so I'm a tad confused. If I've understood this correctly, then, even though I've upgraded my packages and regenerated all my ssl certificates and ssh keys, it's possible that some random hacker who arbitrarily recorded traffic, say, a year ago, of an ssh conversation between me and a machine that, at the time, had a compromised host key, is going to be able, at their leisure, to read all the passwords I typed in over that session?

    That's a bit scary.