By fnordianslipPosted Tuesday 13th May 2008 19:48 GMT
Nuff said.
Doesn't affect OpenSSL upstream or other vendors #
By mark coxPosted Tuesday 13th May 2008 20:00 GMT
"Another has suggested the bug resides within OpenSSL itself and dates from May 2006,"
This is not true, this issue does not affect upstream OpenSSL or any vendors that are not derived from Debian.
First explanation is correct - Debian screwed up #
By Anonymous CowardPosted Tuesday 13th May 2008 20:38 GMT
The first of the two explanations is the correct one, Debian maintainers fixed a warning issued by the memory debugger Valgrind by commenting out the code instead of finding the route cause. Needless to say this was incredibly stupid of them. The code concerned allocated memory to the pool used when deriving the random number, commenting it out meant that the number of possible variations was reduced by a significant factor.
According to Ben Laurie of OpenSSL, the Debian maintainers never mentioned what they were doing to anyone at OpenSSL nor did they forward on the "fix". As a result no-one who actually knew the code was able to point out the mistake they were making.
Debian should revoke the permissions of the packager responsible and ensure that only qualified people are given such critical jobs. As Ben Laurie also notes, distributions should not be patching issues in their own copies without also sending patches upstream where they can be reviewed by people who know the code.
It was bad it's been fixed and lessons must be learnt #
By Adam TrickettPosted Tuesday 13th May 2008 21:31 GMT
It's clearly a stupid mistake by someone in Debian and if they had followed procedures it should have been picked up a long time ago. However the error has now been detected and patched, and people know what to do to correct their systems.
I've already upgraded all my exposed systems and most of my non-exposed systems.
All software has bugs, even open source secure tools from a reputable security concious Linux distro. People using Debian or Mac OS X etc should not get smug and think just because Windows gets most of the attention of the bad people that their system is invulnerable, even though Unix/Linux systems are better designed and built NOTHING IS PERFECT!
At least unlike some vendors who post vague warnings and patches months after the event, with Linux and Debian, nothing is held back...
By Anonymous CowardPosted Tuesday 13th May 2008 22:24 GMT
Adam,
"I've already upgraded all my exposed systems and most of my non-exposed systems."
Upgrading fixes the bug, but not the effects. You should also re-generate your keying material. SSH host keys. SSH user keys. SSL webserver/mailserver keys/certificates. OpenVPN keys. DNSSEC keys. (yeah, right :-) And what with all the key churn and the amount of fingerprint verification that usually happens, isn't this a great time for some MITM games too. (Might be a useful time to start publishing SSHFP DNS records and enable checking in your clients).
The vulnerability notice includes a URL to a scanner which detects keys with weak keying material, including for remote SSH systems. The astute reader will notice that this doesn't just help identify problematic keys on your own networks...
By Anonymous CowardPosted Tuesday 13th May 2008 22:49 GMT
Uninitialised ram space is a lousy source of entropy anyway. It's far too predictable. So simply omitting stirring this buffer's-worth into the pot shouldn't have made any major difference.
If you look at the source, the next thing it goes and does is fills it with stuff from /dev/urandom or /dev/random. It even has a comment about trying for up to 10ms per file. So the uninitialised data is really only a last resort fallback in case there wasn't enough entropy in the system pool. And also no entropy-gathering daemon running.
Conceivably this could only be a problem because there's some other, as yet unacknowledged, problem with the kernel's entropy pool? That's a bit AFDBish, I guess.
By Anonymous CowardPosted Tuesday 13th May 2008 23:11 GMT
Actually OpenSSL people were asked about this on their mailing list...
"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?"
This kind of problem happens a lot with Debian. The packagers alter software in order to make it fit some arbitrary "standards" which Debian invented, and they introduce new bugs. This case stands out because it's a security bug, but it's actually an extremely common event. What's worse is that it's been going on for a very long time.
I first installed Debian in 1996, and the exact same kinds of problems were occurring back then. Applications which were packaged by Debian would have all kinds of mysterious bugs in them, and when I removed the Debian-built application and installed the application from the original (not Debian) source code, the bugs went away. When reported the bugs I was told that it was my own fault by some Debian people, but then it turned out that other Debian users could reproduce the exact same bugs I'd described in the Debian packages.
I don't know the details of this OpenSSL bug, but in my opinion Debian would be well advised to make absolutely minimal or even no changes to source code and configurations of software.
The media wants sensations. This is one of those times. Consider a headline "A cryptographic service has a flaw!". It implies that the flaw is serious enough to consider newsworthy, but never mentions the exploitability of the said flaw; which in this case is practically non-existant.
By Richard KettlewellPosted Wednesday 14th May 2008 07:50 GMT
The bug report reference is correct, but the patch in it is not the problematic change (read the patch in the context of the code it changes if you're unsure about this). The Debian maintainer ignored it and made their own change elsewhere.
It's also not in fact true that OpenSSL upstream were not consulted about it; indeed it seems Kurt got a go-ahead (http://marc.info/?l=openssl-dev&m=114652287210110&w=2) in a response from a member of the OpenSSL development team.
By amanfromMarsPosted Wednesday 14th May 2008 08:29 GMT
"The media wants sensations. This is one of those times. Consider a headline "A cryptographic service has a flaw!". It implies that the flaw is serious enough to consider newsworthy, but never mentions the exploitability of the said flaw; which in this case is practically non-existant." ..... By Gleb Posted Wednesday 14th May 2008 03:08 GMT
Which in this case, Gleb, is you crying wolf. And whether that is a question or a statement is dependent upon and relative to what you know about the Securing Code with Permissible NEUKlearer Links.
By Anonymous CowardPosted Wednesday 14th May 2008 08:43 GMT
I wasn't sure about the exploitability of this bug and it would be good if the The Reg could find out. I'm no crypto-expert, but it seems to me that the bug reduced the number of keys to somewhere around 250,000, in which case I would have thought the encryption would be trivially compromised. Whether I care or not is a different story. My neighbours are luddites, my ISP is lazy and I trust most of the internet gateways in-between. That said, I'm sure someone does care.
I think this bug is probably worth the media circus.
By CharliePosted Wednesday 14th May 2008 11:29 GMT
The keys are not only breakable by experienced crypto-analyst types. This bug has caused identical private SSH keys to be generated on totally unconnected hosts. As a result, logging into a remote server with my key a few days ago, I was logged in as somebody entirely different, who happened to have an identical private key, giving me access to their source code repo.
By Jon KalePosted Wednesday 14th May 2008 13:49 GMT
But, but... many eyes make all bugs shallow... ESR told me, so it must be true.
Meanwhile "At least unlike some vendors who post vague warnings and patches months after the event, with Linux and Debian, nothing is held back..."
Um... this was in the source tree for *two* *fucking* *years* - or 24 months after the event, in old money. And when it was finally patched in the public sources, it then took Debian five days to announce it to their customers. Ever wonder how many boxes you could compromise in five days given a clear run? Or do you simply assume that only the Good Guys read CVS commit logs?
@Thought It Was Here/regarding #363516 from "Something doesn't add up" OP #
By Anonymous CowardPosted Wednesday 14th May 2008 13:50 GMT
Yes, that's a whole world of different! The 363516 patch was the way they should have done it, but the effect of doing it down here in the lower layers is that they just discarded all the bytes that RAND_poll so carefully read out from /dev/urandom and passed to them! It discards /all/ the entropy, from any source, kernel daemon and all! D'oh and double d'oh!
;-) Technically, of course, this could be fixed by a one-line follow-up patch:
By Anonymous CowardPosted Wednesday 14th May 2008 13:55 GMT
...sensational is when someone writes a worm that'll guess the keys, root your box, and start using it to relay "Ch33p v14gr4" spam to several hundred million of you best friends.
Spent many hours making new keys yesterday. Not pleased!
By Ian McNeePosted Wednesday 14th May 2008 17:07 GMT
Umm...I use Umbongo...so I don't have several million best friends. At least they don't e-mail me much. Can you tell me where I can get so many best friends?
But on a more serious note, not being as much of a Linux geek as I'd like to be, what are the implications for desktop flavours of Debian/Ubuntu? I mean we're all using OpenSSL when we're ordering our pr0n and v!@gR4 are we not?
By QuirkafleegPosted Wednesday 14th May 2008 22:13 GMT
… because people have been mass-generating bad keys ‒ some with the intention of providing blacklists, and some being blackhats ‒ and these are in circulation.
By Richard KettlewellPosted Thursday 15th May 2008 10:42 GMT
Ironically, the diff posted above (with #ifdef PURIFY) is the harmless half of change 141. It was the change to ssleay_rand_add() that was a disaster, not the change to ssleay_rand_bytes(), which is harmless.
Comments on: Debian fixes serious crypto bug
Headline #
By Anonymous Coward Posted Tuesday 13th May 2008 18:44 GMT
Epic FAIL #
By fnordianslip Posted Tuesday 13th May 2008 19:48 GMT
Doesn't affect OpenSSL upstream or other vendors #
By mark cox Posted Tuesday 13th May 2008 20:00 GMT
First explanation is correct - Debian screwed up #
By Anonymous Coward Posted Tuesday 13th May 2008 20:38 GMT
It was bad it's been fixed and lessons must be learnt #
By Adam Trickett Posted Tuesday 13th May 2008 21:31 GMT
Patching is just the start #
By Anonymous Coward Posted Tuesday 13th May 2008 22:24 GMT
Something doesn't add up. #
By Anonymous Coward Posted Tuesday 13th May 2008 22:49 GMT
Code review #
By Anonymous Coward Posted Tuesday 13th May 2008 23:11 GMT
This happens all the time #
By BKB Posted Wednesday 14th May 2008 01:07 GMT
Crying wolf #
By Gleb Posted Wednesday 14th May 2008 03:08 GMT
regarding #363516 #
By Richard Kettlewell Posted Wednesday 14th May 2008 07:50 GMT
Enriched Trigger Information Processing #
By amanfromMars Posted Wednesday 14th May 2008 08:29 GMT
At least #
By James Dunmore Posted Wednesday 14th May 2008 08:40 GMT
@Gleb - crying wolf #
By Anonymous Coward Posted Wednesday 14th May 2008 08:43 GMT
Re: Code Review #
By Anonymous Coward Posted Wednesday 14th May 2008 10:01 GMT
@Anonymous Coward #
By Adam Trickett Posted Wednesday 14th May 2008 10:03 GMT
Thought It Was Here: #
By Jamie Kitson Posted Wednesday 14th May 2008 10:06 GMT
Accidental hacking! #
By Charlie Posted Wednesday 14th May 2008 11:29 GMT
<nelsonmuntz>Hah hah!</nelsonmuntz> #
By Jon Kale Posted Wednesday 14th May 2008 13:49 GMT
@Thought It Was Here/regarding #363516 from "Something doesn't add up" OP #
By Anonymous Coward Posted Wednesday 14th May 2008 13:50 GMT
Not sensational.... #
By Anonymous Coward Posted Wednesday 14th May 2008 13:55 GMT
Obvious contact addresses #
By Quirkafleeg Posted Wednesday 14th May 2008 14:52 GMT
Re: Not sensational.... #
By Ian McNee Posted Wednesday 14th May 2008 17:07 GMT
Consequences: bad keys everywhere else too… #
By Quirkafleeg Posted Wednesday 14th May 2008 22:13 GMT
Pick a number, any number... #
By Anonymous Coward Posted Thursday 15th May 2008 00:41 GMT
register comment form insists on a title #
By Richard Kettlewell Posted Thursday 15th May 2008 10:42 GMT
A bit late but still hillarious #
By Pierre Posted Friday 16th May 2008 04:20 GMT
@pierre #
By Anonymous Coward Posted Friday 16th May 2008 10:49 GMT