It’s Secure

Security is a tough nut to crack, both with respect to making something secure and judging something to be secure. I’m going to call Ubuntu secure, and I suspect that there’s going to be a lot of disagreement here. Nonetheless, allow me to explain why I consider Ubuntu secure.

Let’s first throw out the idea that any desktop OS can be perfectly secure. The weakest component in any system is the user – if they can install software, they can install malware. So while Ubuntu would be extremely secure if the user could not install any software, it would not be very useful to be that way. Ubuntu is just as capable as any other desktop OS out there when it comes to catching malware if the user is dedicated enough. The dancing pigs problem is not solved here.

Nevertheless, Ubuntu is more secure than other OSes (and let’s be frank, we’re talking about Windows) for two reasons. The first is for practical reasons, and the second is for technical reasons.

To completely butcher a metaphor here: if your operating system has vulnerabilities and no one is exploiting them, is it really vulnerable? The logical answer to that is “yes” and yet that’s not quite how things work. Or more simply put: when’s the last time you’ve seen a malware outbreak ravaging the Ubuntu (or any desktop Linux distro) community?

Apple often gets nailed for this logic, and yet I have a hard time disagreeing with it. If no one is trying to break into your computer, then right now, at this moment, it’s secure. The Ubuntu and Mac OS X user bases are so tiny compared to that of Windows that attacking anything but Windows makes very little sense from an attacker’s perspective.

It’s true that they’re soft targets – few machines run anti-virus software and there’s no other malware to fend off – but that does not seem to be driving any kind of significant malware creation for either platform. This goes particularly for Mac OS X, where security researchers have been warning about the complacent nature this creates, but other than a few proof of concept trojan horses, the only time anyone seems to be making a real effort to break into a Mac is to win one.

So I am going to call Ubuntu, with its smaller-yet user base and lack of active threats, practically secure. No one is trying to break into Ubuntu machines, and there’s a number of years’ worth of history with the similar Mac OS X that says it’s not going to change. There just aren’t any credible threats to be worried about right now.

With that said, there are plenty of good technical reasons too for why Ubuntu is secure; while it may be practically secure, it would also be difficult to break into the OS even if you wanted to. Probably the most noteworthy aspect here is that Ubuntu does not ship with any outward facing services or daemons, which means there is nothing listening that can be compromised for facilitating a fully automated remote code execution attack. Windows has historically been compromised many times through these attacks, most recently in October of 2008. Firewalls are intended to prevent these kinds of issues, but there is always someone out there that manages to be completely exposed to the internet anyhow, hence not having any outward facing services in the first place is an excellent design decision.

Less enthusing about Ubuntu’s design choices however is that in part because of the lack of services to expose, the OS does not ship with an enabled firewall. The Linux kernel does have built-in firewall functionality through iptables, but out of the box Ubuntu lets everything in and out. This is similar to how Mac OS X ships, and significantly different from how Windows Vista ships, which blocks all incoming connections by default. Worse yet, Ubuntu doesn’t ship with a GUI to control the firewall either (something Mac OS X does), which necessitates pulling down a 3rd party package or configuring it via CLI.

Operating System Inbound Outbound
Windows Vista All applications blocked, applications can request an open port All applications allowed, complex GUI to allow blocking them
Ubuntu 8.04 All applications allowed, no GUI to change this All applications allowed, no GUI to change this
Mac OS X 10.5 All applications allowed, simple GUI to allow blocking them All applications allowed, no GUI to change this

Now to be fair, even if Ubuntu had shipped with a GUI tool for configuring its firewall I likely would have set it up exactly the same as how I leave Mac OS X set up – all incoming connections allowed – nevertheless I find myself scratching my head. Host-based firewalls aren’t the solution to all that ails computer security, but they’re also good ideas. I would rather see Ubuntu ship like Vista does, with an active firewall blocking incoming connections.

Backwards compatibility, or rather the lack thereof, is also a technical security benefit for Ubuntu. Unlike Windows, which attempts to provide security and still support old software that pre-dates modern security in Windows, Ubuntu does not have any such legacy software to deal with. Since Linux has supported the traditional *nix security model from the get-go, properly built legacy software should not expect free reign of the system when running and hence be a modern vulnerability. This is more an artifact of previous design than a feature, but it bears mentioning as a pillar of total security.

Moving on, there is an interesting element of Ubuntu’s design being more secure, but I hesitate to call it intentional. Earlier I mentioned how an OS that doesn’t let a user install software isn’t very useful, but Ubuntu falls under this umbrella somewhat. Because the OS is based heavily around a package manager and signed packages, it’s not well-geared towards installing software outside of the package manager. Depending on how it’s packaged, many downloaded applications need to be manually assigned an executable flag before they can be run, significantly impairing the ability for a user to blindly click on anything that runs. It’s genuinely hard to run non-packaged software on Ubuntu, and in this case that’s a security benefit – it’s that much harder to coerce a user to run malware, even if the dancing pigs problem isn’t solved.

Rounding out the security underpinnings of Ubuntu, we have the more traditional mechanisms. No-eXecute bit support helps to prevent buffer overflow attacks, and Address Space Layout Randomization makes targeting specific memory addresses harder. The traditional *nix sudo security mechanism keeps software running with user privileges unless specifically authenticated to take on full root abilities, making it functionally similar to UAC on Vista (or rather, the other way around). Finally, Ubuntu comes with the AppArmor and SELinux security policy features that enable further locking down the OS, although these are generally overkill for home use.

There’s one last issue I’d like to touch on when it comes to technical security measures, and that’s the nature of open source software. There is a well-reasoned argument that open source software is more secure because it allows for anyone to check the source code for security vulnerabilities and to fix them. Conversely, being able to see the source code means that such vulnerabilities cannot be completely obscured from public view.

It’s not a settled debate, nor do I intend to settle it, but it bears mentioning. Looking through the list of updates on a fresh Ubuntu install and the CERT vulnerability list, there are a number of potential vulnerabilities in various programs included with Ubuntu – Firefox for example has been patched for vulnerabilities seven times now. There are enough vulnerabilities that I don’t believe just counting them is a good way to decide if Ubuntu being open source has a significant impact on improving its security. Plus this comes full-circle with the notion of Ubuntu being practically secure (are there more vulnerabilities that people aren’t bothering to look for?), but nevertheless it’s my belief that being open source is a security benefit for Ubuntu here, even if I can’t completely prove it.

Because of the aforementioned ability to see and modify any and every bit of code in Ubuntu and its applications, Ubuntu also gains a security advantage in that it’s possible for users to manually patch flaws immediately (assuming they know how) and that with that ability Ubuntu security updates are pushed out just about as rapidly as humanly possible. This is a significant distinction from Windows and Patch Tuesday, and while Microsoft has a good business reason for doing this (IT admins would rather get all their patches at once, rather than testing new patches constantly) it’s not good technical reasoning. Ubuntu is more secure than Windows through the virtue of patching most vulnerabilities sooner than Windows.

Finally, looking at Ubuntu there are certainly areas for improvement with security. I’ve already touched on the firewall abilities, but sandboxing is the other notable weakness here. Windows has seen a lot of work put into sandboxing Internet Explorer so that machines cannot get hit with drive-by malware downloads, and it has proven to be effective. Both Internet Explorer and Google’s Chrome implement sandboxes using different methods, with similar results. Meanwhile Chrome is not ready for Linux, and Firefox lacks sandboxing abilities. Given the importance of the browser in certain kinds of malware infections, Ubuntu would benefit greatly from having Firefox sandboxed, even if no one is specifically targeting Ubuntu right now.

It’s Free – Libre Ubuntu – Long Term Support
Comments Locked

195 Comments

View All Comments

  • jasperjones - Wednesday, August 26, 2009 - link

    I second most of Fox5's suggestion.

    1.) I've been completely ignorant of software development on Windows over the last few years. Comparison of MS Visual Studio vs Eclipse or vs Netbeans/Sun Studio? How fast are CLI C++ apps on Windows vs. Linux? Perhaps using both GNU and Intel C++ Compiler toolchains on Linux. And possibly MS Visual C++ and Intel Visual C++ on Windows.

    Perhaps less esoteric, 2.) instead of benching SMB/CIFS on Windows vs Samba on *nix, bench something *nix native such as scp/sftp or nfs. Netperf.

    3.) Number-crunching stuff. I guess this is sort of similar to running at least a few synthetic benches. LINPACK or some other test that uses BLAS or LAPACK, tests that use FFTW. Maybe even SPEC (I wouldn't expect any exciting results here, though, or are there?)
  • Eeqmcsq - Wednesday, August 26, 2009 - link

    Are you looking for benchmarks in Windows vs Ubuntu with the same hardware? Or benchmarks in different CPUs/motherboards/etc with the same Ubuntu?
  • Ryan Smith - Wednesday, August 26, 2009 - link

    Cross-platform. There's no problem coming up with Linux-only benchmarks for hardware.
  • Eeqmcsq - Wednesday, August 26, 2009 - link

    I have a question about your benchmarks that involve files, such as copying and zipping. When you run your benchmarks, do you run them multiple times and then get an average? I ask that because I have learned that in Linux, files get cached into memory, so subsequent runs will appear faster. I suspect the same thing happens in Windows. Do you take that into account by clearing cached memory before each run?
  • Ryan Smith - Wednesday, August 26, 2009 - link

    We reboot between runs to avoid cache issues (and in the case of Windows, wait for it to finish filling the SuperFetch cache).
  • fri2219 - Wednesday, August 26, 2009 - link

    I heard Sony is coming out with this thing they call a Walkman.

    You should review that next!
  • StuckMojo - Wednesday, August 26, 2009 - link

    ROFL!
  • Fox5 - Wednesday, August 26, 2009 - link

    The LTS is really for the same types of people that avoid grabbing the latest MS service pack. IE, anyone who's still running Windows XP SP2 with IE6. Do that comparison and see how they compare.

    Ubuntu is little more than a tight integration of many well-tested packages, there's no reason to go with ubuntu's LTS when everything else already goes through it's own extensive testing. Given how quickly open source software advances, I'd say the LTS is probably less stable than the most up to date versions, and certainly far behind on usability.

    You want the equivalent of Ubuntu's LTS in Windows? It most closely matches the progression that the Windows server versions follow.
  • Ryan Smith - Wednesday, August 26, 2009 - link

    To put things in perspective, 8.04 was released shortly after Vista SP1 and XP SP3 were. So Hardy vs. XP SP2 (a 4 year old SP) is a pretty poor comparison.

    You'll see an up to date comparison in part 2 when we look at 9.04.
  • awaken688 - Wednesday, August 26, 2009 - link

    I'm glad you did this article. It really has been something I think about. I'm ready to read your Part II. As others have mentioned, I have a couple of other articles that would be great.

    1) The comparison of the various versions as mentioned. SuSe, Ubuntu 9.04, BSD, etc...

    2) Someone mentioned VirtualBox. I'd love to hear more about this including a detailed setup for the normal user. I'd love to be able to surf while in Linux, but able to play games in Windows and keep them separate for added security.

    Thanks for the article! Hope to see one or both of the ideas mentioned above covered.

Log in

Don't have an account? Sign up now