backtop


Print E-mail del.icio.us 101 comment(s) - last by bigdawg1988.. on Jun 8 at 10:49 PM

It is incredible just how big the effects of the newly discovered error in open source key generation is

For all the criticism of Microsoft and its security flaws, the software giant has made an impressive turnaround.  While Vista has been derided for a variety of reasons, most would agree that it’s much more secure than Windows XP.  Recently, a hacker conference showed just how vulnerable systems running Mac OS X are, due to their slow rate of patches.  The Mac machine was hijacked within 10 minutes, while the Linux and Windows boxes survived the day.

Now an even worse security flaw has been found in some of the basic code used by a wide variety of Linux security programs.  The error originated back in May 2006 when workers on the open-source security project committed a grave and unrealized error. 

A simple programming error reduced the entropy in the generated program keys created by the OpenSSL library.  Why does this matter?  The OpenSSL library's key generation and other routines are used by the SSH remote access program, the IPsec Virtual Private Network (VPN), the Apache Web server, secure email clients, programs that offer secure internet portals and more.

Just two lines of code created crippling security holes in four different open source operating systems, 25 application programs, and millions of internet-attached computer systems.  The vulnerability was publicly discovered for the first time May 13, after having left the door open nearly two years.  A patch has been distributed, but that can do nothing to repair the damage that has occurred to compromise systems.  Worse yet, it appears that through the installation of compromised keys on other systems, numerous systems not even running the code have likely been compromised.

To understand the error fully, a basic discussion on cryptography is essential.  On a network anyone can peek at traffic, which is bad news for anyone sharing personal information.  However, by using keys, information can be encrypted and then decrypted on the other side by a friendly computer with the proper key.  As a "secure key" is typically 128 bits, which is 2128 or about 3.4*1038, the possibility of breaking the key by merely by a brute force attack is out of the realm of modern computing power.  A brute force attack simply involves guessing every single number, but to try to do this on a number of this size would take many years.

However, the system falls apart if the computer can only make a small set of keys, despite the large key size.  To a normal user the key looks fine, it’s the right size, and the data is being encrypted as it’s sent out.  However, to the malicious user they can now use brute force attacks to guess the key and monitor your activity, opening the door to surveillance and exploitation.  This is exactly what has resulted based on the newly discovered error.

The error reduced the number of keys that Linux can generate from 2128 to approximately 215.  The error was not caught until now because the keys were still 128 bits and to the human eye looked random.  If the system had consistently produced one key, this problem would have been caught, but instead it produced a variety of keys, but a much smaller variety.  The number of keys the system can generate varies with processor architecture, the size of the key, and the type of the key, but all keys using the flawed code will be greatly reduced in their number of possibilities.

Now that the floodgates are opened, a hacker HD Moore of the Metasploit project has released "toys" to help malicious users crack the poor defenseless Linux and Ubuntu boxes.  Moore's website provides lists of precalculated keys based on the bug, to allow malicious users to easily identify vulnerable systems.

Fixing the key problem is not as simple as fixing a buffer overflow vulnerability, another typical security flaw.  As the keys generated our actual files, merely patching the system will not change these files.  Every single key will need to be replaced in a difficult and time consuming process.  Further keys need to be certified and distributed, which takes more time and is error prone.

Debian, the Linux variant used largely by security professionals, and Ubuntu, the variant most commonly used by home users are both affected.  Furthermore, Windows servers may be compromised as well if they are using keys generated on Linux systems. 

Ironically the bug originated from an automated tool known as Valgrind which is supposed to reduce programming bugs which lead to security vulnerabilities.  It found that a block memory was not being properly initialized, meaning that it would contain random information.  The automated tool politely inserted code to clean up the block of memory making it all zeros.  The only problem was that the system was intentionally using the block's unknown to get randomness to generate the keys.  The library also gets randomness from mouse movements, keystroke timings, network packet arrival timings, and even microvariations in hard drive speed.

The Valgrind code caused errors, so the programmers simply commented out all the code, including the other methods of generating randomness on accident.  Only the code which utilized the process ID, an integer ranging from 0 to 32,767, remained to provide randomness.  It turns out the "fix" turned grievous error was not the work of the OpenSSL programmers themselves, but of the Debian team, known for their security expertise. 

OpenSSL developer Ben Laurie raged, "Never fix a bug you don't understand!  Had Debian [sent the bug to us] in this case, we (the OpenSSL Team) would have fallen about laughing, and once we had got our breath back, told them what a terrible idea this was. But no, it seems that every vendor wants to 'add value' by getting in between the user of the software and its author."

One developer more alarmingly points out that the vulnerability has showed a perhaps fatal flaw in the state of the open source industry and in the computer security in general.  One programmer can make a major change which can be blindly accepted by other developers with little understanding of the implications.  This reckons back to controversial statements made by Steve Gibson, a highly respected security consultant, when a major bug was found in Windows.  Gibson suggested that rather than dumb error, it was an intentional attempt to create an open back door.  While hopefully the Linux vulnerability was not maliciously created, the possibility of such a development remains.

Like Alice in Wonderland, it is often amazing to see just far down the rabbit hole goes in terms of the breadth of these kinds of problems.  And this problem is clearly illustrative that unless a more comprehensive methodology of security development is adopted, these problems will only persist and multiply with time.



Comments     Threshold


This article is over a month old, voting and posting comments is disabled

Join the open source movement
By gmw1082 on 5/23/2008 11:19:06 AM , Rating: 3
Linux is much safer than windows. It even includes a super secure 128 bit....wait what did you say?...errr...16 bit encryption.




RE: Join the open source movement
By MAIA on 5/23/08, Rating: 0
RE: Join the open source movement
By michal1980 on 5/23/2008 11:54:35 AM , Rating: 4
oh right, now that excuse comes out, for years the linux/unix crowd has been on their high horse about how great open source is...

and bashed windows at every mistake, never have I heard Stuff happens from their mouths


RE: Join the open source movement
By Adul on 5/23/2008 12:22:21 PM , Rating: 3
You do realize this is limited to debian/unbuntu distributions only.


RE: Join the open source movement
By jonmcc33 on 5/23/2008 12:39:48 PM , Rating: 4
Ubuntu, isn't that the most used Linux distro out there? Something like 60% of Linux users using it? That's a huge chunk!


RE: Join the open source movement
By omnicronx on 5/23/2008 12:49:41 PM , Rating: 2
Ubuntu is not widly used as a server OS. In fact I would have to say I would personally never use it as a server OS at all, there are many better distros out there for that purpose. That being said, although this is a big setback, it is no worse off than the countless amount of unprotected users running windows on a workgroup. I would also assume that most people do not even have ssh enabled by default(last time I checked you have to install it manually). All in all, this probably effects a smaller amount of users than one might think, and with automatic updates present on most peoples machines, I would assume that within a month the issue will be almost non existant.


RE: Join the open source movement
By leexgx on 5/23/2008 8:37:13 PM , Rating: 2
but you still need to reset all your keys your self (as the update does not reset all keys on an system)


RE: Join the open source movement
By eion on 5/24/08, Rating: -1
RE: Join the open source movement
By omnicronx on 5/25/2008 2:38:24 AM , Rating: 2
quote:
but you still need to reset all your keys your self (as the update does not reset all keys on an system)
No you don't, not unless you issued those keys on that workstation(which would not normally happen). As I said, chances are your server is not debian based, and since these keys are generated by the server, and not the workstation connected to it, there would not be a problem. Have you ever even issued keys in general? Its not something an end-user would normally do, especially not in a workstation environment.


By bigdawg1988 on 6/8/2008 10:49:07 PM , Rating: 2
Oops, my company uses Ubuntu for their servers!
I wonder if our IT people even know?
No, I will not tell you the company name!


RE: Join the open source movement
By wvh on 5/26/2008 12:39:59 AM , Rating: 2
This bug is really mostly relevant to servers. Most people running Ubuntu do so on desktops. I'm a sys admin for several companies, and I don't know any company that runs Ubuntu on servers (yet). I think Ubuntu is not old enough to have replaced other systems.

Debian, that's another story though...


RE: Join the open source movement
By omnicronx on 5/23/2008 12:42:06 PM , Rating: 1
quote:
You do realize this is limited to debian/unbuntu distributions only.
And we all know how many people use ubuntu as their primary server OS<caugh>

quote:
Systems which are running any of the following releases:

* Ubuntu 7.04 (Feisty)
* Ubuntu 7.10 (Gutsy)
* Ubuntu 8.04 LTS (Hardy)
* Ubuntu “Intrepid Ibex” (development): libssl <= 0.9.8g-8
* Debian 4.0 (etch) (see corresponding Debian security advisory)
.
I am not too worried, as far as I can tell an update was issued (showed up in auto updater) soon after the bug was announced. I am not downplaying the bug, it was a major mistake, but its not going to bring anyone running a linux server to a hault.. Its not like having access to a workstation is going to give you full access to the server.


RE: Join the open source movement
By leexgx on 5/23/08, Rating: 0
RE: Join the open source movement
By Totemic on 5/23/2008 5:23:05 PM , Rating: 3
quote:
You do realize this is limited to debian/unbuntu distributions only.

Actually, the article indicates it affects the keys generated by OpenSSL. Which means ANY OS or application depending on those keys would be vulnerable, not just Debian/Unbuntu.

In fact, the article goes on to mention that even Windows, if it's using a key generated by the flawed library would be vulnerable. I don't think this is an isolated problem.


RE: Join the open source movement
By gss4w on 5/23/2008 7:53:00 PM , Rating: 5
The article is misleading because it does give the impression that it is a flaw in OpenSSL. In fact the flaw was only present in the Debian OpenSSL implementation.

It is true that anyone using compromised keys would be vulnerable. This is why the flaw is such a big deal, you can't just patch the bug in the OS, you also need to reissue the keys.


RE: Join the open source movement
By geddarkstorm on 5/23/08, Rating: 0