Debian Bug Screws us All

This morning, I spotted this nasty tidbit on Slashdot: Debian Bug Leaves Private SSL/SSH Keys Guessable

It turns out a maintainer of the OpenSSL package on Debian removed the "seeding" of the random number generator that is used to generate, among other things, SSH keys. For those unfamiliar with random number generators, they work by generating a sequence of pseudo-random numbers based on some initial seed. The default value most programmers use when seeding their random number generators is simply the time, because it changes quickly and ensures a great deal of variability in what the generated random sequence of numbers will look like. If you seed your random number generator with the same number every time, you'll end up with the same sequence of numbers being generated over and over again - It won't be random at all!

What this means to Debian users is that your SSH keys are not random, and they're much easier to crack/guess because of this. Because Ubuntu is based on Debian, and the OpenSSL packages are relatively untouched by the Ubuntu maintainers, this bug also affects all Ubuntu users.

Both Debian and Ubuntu have released security updates which fix the problem and ensure that any future keys that are generated have the expected level of security. However, keys that have already been generated need to be expired and replaced.

Fortunately, the Ubuntu update that you will receive through update-manager takes care of this for you. For a desktop user, this is sufficient. For system administrators who might use SSH keys widely, it's a massive pain in the ass.

There's much more to this story though - A Slashdot user dug up the original Debian bug report that lead to the "fix" that removed the seeding. The OpenSSL developers used uninitialized memory to seed their random number generator, which caused a warning in Valgrind that someone playing with the code noticed. Valgrind is a tool to help find memory leaks and memory corruption (ie. programmers' mistakes). However, the original code wasn't erroneous at all - The programmer that wrote that code must have asserted that uninitialized memory has more "randomness" than the time, which may or may not have been a good assumption. Regardless, it's clear that the real mistake was "fixing" this code without fully understanding the consequences, and the Debian package maintainers (and the developer that submitted the patch) are at fault.

What happened here is a nightmare scenario for an open source software developer like myself. When my development team makes a release, we do some distribution packaging ourselves, but we also count on other people to make packages for other distributions. If any of those package maintainers modify our software in any way, we can no longer guarantee the quality of our software. If this sounds familiar, you might remember that this is exactly why Mozilla wanted Debian to stop using the Firefox name back in 2006. Mozilla wanted to ensure that all of their users got "Firefox", not "Firefox plus Joe Blow's crappy tweaks", and I completely agree with them. As more open source projects grow and become professionally run, I can see this becoming a more common issue in the future.

Finally, there is the question of whether or not the OpenSSL vulnerability was introduced intentionally. To give the poor guy the benefit of the doubt, I think it was an honest mistake. He fixed something that he thought was broken, and it turns out he was wrong - an understandable, human mistake. The uploader that approved his change probably should have caught the mistake, but again, he too was also only human. Is it possible that this was intentional? Sure. Is it possible that this could be used as a blueprint for future open source sabotage? Absolutely.

Are we any less likely to see security flaws introduced like this again? Absolutely not. It's the process through which packages are maintained and updated that is broken here.

The solution? Discuss.


Disclaimer: Don't go on a witch-hunt for the Debian guys who made mistakes here. Stuff like this happens, and if it were you or I in their shoes, we may have made the exact same mistake. I stress once again that it's the process of distribution package management that is flawed, not the people involved.

Blogger Captcha Cracked?

I just 50+ emails from Blogger saying new comments were posted on my blog:



Up until now, the spam situation with Blogger was decent. I'd only ever had the odd spam comment come through and I had been able delete them all. With this massive barrage though, I don't have the patience to go through and delete them all, especially knowing that it can happen again.

For now, I'll just hope that blogger deletes the spammer's account and all of the comments he posted.

Toy Story, Cave Story, .... Ubuntu Story ?

About once a month, I receive an email solicitation asking me to promote something on my blog. 9/10 times I just ignore it, because they're usually asking me to promote a spam blog. Not cool.



It looks like we did better with this month's email. Rather than a pointless spam blog, it was instead regarding UbuntuStory.com, which seems like a friendly advertisement for Ubuntu by a community member. I'm probably preaching to the choir here, but if you haven't tried Ubuntu yet, I'd check out the site.

Sorry, your first impression from that site will be wrong - Ubuntu won't take you on a wild African adventure, but it can make your computer much less of a pain in the ass to use. :)

Ubuntu 8.04 Beta Thoughts

Yesterday, I decided to upgrade to the Ubuntu 8.04 (Hardy Heron) Beta. I've been having problems with internet connection and I thought an upgrade might fix it, but now I'm convinced it's a problem with my LAN segment, not my card. Anyways, among the shiny new goodness:

  • Firefox 3 - Great new GTK look on all the buttons, they don't look like they're from 1993 anymore!
  • Wait, more crazy Firefox 3 goodness - apparently now I can cut and paste images around by right-clicking on them in the Blogger "Compose" mode.
  • Notebooks in Tomboy! If you're a Tomboy Notes user, you won't believe how useful this is. I currently have 78 notes in Tomboy, so being able to organize them is a huge win for me.
Tracker (left) and Tomboy (right)
  • Tracker for indexing, now with a spiffy tray icon. More importantly, when you right-click on the tray icon, you can easily pause the data indexing (for example, if you have an older PC like me and want to fire up a game that pushes your system, like Quake Wars)
  • The new screen resolution and display setup dialog. I've read lots of people evangelizing about this - it's supposed to make setting up a second display easier, such as when you're plugging in a projector. I haven't tested this personally though, and I'll believe it when I see it.

  • Lots of little improvements to Evolution as well. It handles multiple operations nicer now, and seems quite a bit snappier. Big thanks to the Evolution team for their hard work.
  • Other random things that I haven't personally tested: The new gio stuff in Nautilus is supposed to make doing multiple file copies simultaneously "better", and the old VFS mounts have been replaced with a new system. I use SSH mounts through Gnome frequently, so I'm looking forward to playing with the new system.
I'm sure there's lots of other little things I've yet to stumble across, and it'll take about a month for me to notice any little bugs that crop up. So far so good though - it looks like we've got another good Ubuntu release!

HOWTO: Figure out what's using your soundcard in Linux

It's 2008, and while Linux audio is getting better for desktop users, I still occasionally find myself running into a situation where one application is tying up my soundcard. Sometimes I'll try to run jackd through qjackctl and it'll fail because Firefox has a flash video loaded in it or something like that.

Anyways, to figure out what's using your soundcard on Linux, you can run:

sudo fuser -v /dev/dsp*
sudo fuser -v /dev/snd/*

The first command above will list all the OSS applications using your sound hardware, and the latter will tackle ALSA applications.

For example, if I run those commands with nothing running:

gamegod@home:~/$ sudo fuser -v /dev/dsp*
gamegod@home:~/$ sudo fuser -v /dev/snd/*
USER PID ACCESS COMMAND
/dev/snd/controlC0: gamegod 6236 F.... mixer_applet2

The output above is showing me that GNOME's mixer applet is using the "control" interface on my soundcard. This won't interfere with any applications, so you can always safely keep this running.

As another example, if I run Mixxx (software for DJs) before running those commands, I'll see:

gamegod@home:~/$ sudo fuser -v /dev/dsp*
gamegod@home:~/$ sudo fuser -v /dev/snd/*
USER PID ACCESS COMMAND
/dev/snd/controlC0: gamegod 6236 F.... mixer_applet2
/dev/snd/pcmC0D0p: gamegod 12936 F...m mixxx
/dev/snd/seq: gamegod 12936 F.... mixxx

This time the output above is showing me that Mixxx is using my soundcard's audio first ouput interface (pcmC0D0p corresponds to ALSA's hw:0,0), as well as ALSA's MIDI interface.

KDE 4.0 Released!

After having sworn off KDE many years ago, I might just have to give it a second shot - KDE 4.0 was just released, and brings a massive overhaul to the desktop environment. Congratulations to the entire KDE team on making this release happen. A lot of very talented people put a lot of hard work into this.




If you're looking for eye-candy, check out the KDE 4 screenshots on their site. Kickoff and KRunner look well thought-out, and I'm itching to give them a try. They also look like they're better integrated into the desktop environment than their GNOME equivalents (Deskbar and any of those XP/Vista-style system panel clones).

If you want to give it a spin, the source and binary packages for several distros are available on the KDE 4.0.0 info page. Packages for (K)Ubuntu 7.10 are available along with a LiveCD here.

Good stuff.