Russell Coker: Secure Boot and Protecting Against Root
There has been a lot of discussion recently about the recent Microsoft ideas regarding secure boot, in case you have missed it Michael Casadevall has written a good summary of the issue [1].
Recently I ve seen a couple of people advocate the concept of secure boot with the stated idea that root should be unable to damage the system, as Microsoft Software is something that doesn t matter to me I ll restrict my comments to how this might work on Linux.
Restricting the root account is something that is technically possible, for much of the past 9 years I have been running SE Linux Play Machines which have UID 0 (root) restricted by SE Linux such that they can t damage the system [2] there are other ways of achieving similar goals. But having an account with UID 0 that can t change anything on the system doesn t really match what most people think of as root , I just do it as a way of demonstrating that SE Linux controls all access such that cracking a daemon which runs as root won t result in immediately controlling the entire system.
As an aside my Play Machine is not online at the moment, I hope to have it running again soon.
Root Can t Damage the System
One specific claim was that root should be unable to damage the system. While a secure boot system can theoretically result in a boot to single user mode without any compromise that doesn t apply to fully operational systems. For a file owned by root to be replaced the system security has to be compromised in some way. The same compromise will usually work every time until the bug is fixed and the software is upgraded. So the process of cracking root that might be used to install hostile files can also be used at runtime to exploit running processes via ptrace and do other bad stuff.
Even if the attacker is forced to compromise the system at every boot this isn t a great win for the case of servers with months of uptime or for the case of workstations that have confidential data that can be rapidly copied over the Internet. There are also many workstations that are live on the Internet for months nowadays.
Also the general claim doesn t really make sense on it s own. root usually means the account that is used for configuring the system. If a system can be configured then the account which is used to configure it will be able to do unwanted things. It is theoretically possible to run workstations without external root access (EG have them automatically update to the latest security fixes). Such a workstation configuration MIGHT be able to survive a compromise by having a reboot trigger an automatic update. But a workstation that is used in such a manner could be just re-imaged as it would probably be used in an environment where data-less operation makes sense.
An Android phone could be considered as an example of a Linux system for which the root user can t damage the system if you consider root to mean person accessing the GUI configuration system . But then it wouldn t be difficult to create a configuration program for a regular Linux system that allows the user to change some parts of the system configuration while making others unavailable. Besides there are many ways in which the Android configuration GUI permits the user to make the system mostly unusable (EG by disabling data access) or extremely expensive to operate (EG by forcing data roaming). So I don t think that Android is a good example of root being prevented from doing damage.
Signing All Files
Another idea that I saw advocated was to have the secure boot concept extended to all files. So you have a boot loader that loads a signed kernel which then loads only signed executables and then every interpreter (Perl, Python, etc) will also check for signatures on files that they run. This would be tricky with interpreters that are designed to run from standard input (most notably /bin/sh but also many other interpreters).
Doing this would require changing many programs, I guess you would even have to change mount to check the signature on /etc/fstab etc. This would be an unreasonably large amount of work.
Another possibility would be to change the kernel such that it checks file signatures and has restrictions on system calls such as open() and the exec() family of calls. In concept it would be possible to extend SE Linux or any other access control system to include access checks on which files need to be signed (some types such as etc_t and bin_t would need to be signed but others such as var_t wouldn t).
Of course this would mean that no sysadmin work could be performed locally as all file changes would have to come from the signing system. I can imagine all sorts of theoretically interesting but practically useless ways of implementing this such as having the signing system disconnected from the Internet with USB flash devices used for one-way file transfer because you can t have the signing system available to the same attacks as the host system.
The requirement to sign all files would reduce the use of such a system to a tiny fraction of the user-base. Which would then raise the question of why anyone would spend the effort on that task when there are so many other ways of improving security that involve less work and can be used by more people.
Encrypted Root Filesystem
One real benefit of a secure boot system is for systems using encrypted filesystems. It would be good to know that a hostile party hasn t replaced the kernel and initrd when you are asked for the password to unlock the root filesystem. This would be good for the case where a laptop is left in a hotel room or other place where a hostile party could access it.
Another way of addressing the same problem is to boot from a USB device so that you can keep a small USB boot device with you when it s inconvenient to carry a large laptop (which works for me). Of course it s theoretically possible for the system BIOS to be replaced with something that trojans the boot process (EG runs the kernel in a virtual machine). But I expect that if someone who is capable of doing that gets access to my laptop then I m going to lose anyway.
Conclusion
The secure boot concept does seem to have some useful potential when the aim is to reboot the system and have it automatically apply security fixes in the early stages of the boot process. This could be used for Netbooks and phones. Of course such a process would have to reset some configuration settings to safe defaults, this means replacing files in /etc and some configuration files in the user s home directory. So such a reboot and upgrade procedure would either leave the possibility that files in /etc were still compromised or it would remove some configuration work and thus give the user an incentive to avoid applying the patch.
Any system that tries to extend signature checks all the way would either be vulnerable to valid but hostile changes to system configuration (such as authenticating to a server run by a hostile party) or have extreme ease of use issues due to signing everything.
Also a secure boot will only protect a vulnerable system between the time it is rebooted and the time it returns to full operation after the reboot. If the security flaw hasn t been fixed (which could be due to a 0-day exploit or an exploit for which the patch hasn t been applied) then the system could be cracked again.
I don t think that a secure boot process offers real benefits to many users.
Release 0.9.9 of
So, I intended to be completely away from my computer during my vacations, but hey. I have been interested in this new extension Apple added to the C language a little while ago which introduces the equivalent of closures to C. Today I spent a few minutes looking into it and writing a few tests with the help of clang.
Here s something I came up with, to use a block as the callback for a GIO asynchronous call:
PostgreSQL's libpq5 package got its symbols file somewhere around version 8.4,
so the symbols in there were all marked with version "8.4~" or greater. As I'm
working on
The great thing about git and other distributed version control systems is
that once you clone (or fork) a repository, you have all the data. You
don't have to trust that Github will preserve it; everyone who develops
the project is a backup.
Github carries this principle quite far amoung the features they provide.
But not all the way. Today I have surveyed their features, and where the
data for each is stored.
It took me a while to find this, so I'm just blogging it so other people
will be able to find it.
I wanted to send a
Summary: It is important that we (the Debian community that relies on OpenPGP through
GNU Privacy Guard) stop using short key IDs. There is no vulnerability in OpenPGP and GPG.
However, using short key IDs (like 0x70096AD1) is
fundementally insecure; it is easy to generate collisions for short key IDs.
We should always use 64-bit (or longer) key IDs, like: 0x37E1C17570096AD1
or 0xEC4B033C70096AD1.
TL;DR: This now gives two results: gpg --recv-key 70096AD1
Over the Christmas period I've not been doing too much.
December was a month that started out pretty well, in the first 10 days I had five models/friends/random-folk come to pose for me. (I have a few folk lined up for mid-January, but things tailed off quickly this month due to people having little free time).
I spent a while mulling over what I was doing with images, as I've recently been doing a fair number of more NSFW images - In December
2012 will be the year where we release wheezy. So, it's time to start
fighting for one of my pet projects: bringing as many languages to 100%
completeness for debconf templates translation.
The reference for this is
Do you believe that there will come a major inflation in the next months or years? If not, you can stop reading this article. Otherwise lets think what would be the right thing to do now.
I used to recommend the GNOME desktop for simple users for two main
advantages over Windows:


thanks to my vacations starting I had a bit more time this week for working
on RC bugs. here's the usual list; again: thanks to all the restless
patch providers!
Nice christmas present: I just got message that the paper Loop subgroups of Fr and the image of their stabilizer subgroups in GLr( ) that I extracted from my
"Static program analysis" is a technique whereby a program is
verified for errors without actually running it. Finding bugs manually
with a debugger and one's brain is tedious, so every shortcut that can
help you avoid having to do so is great.
There are some commercial tools available to do such analysis, some
of which are rather expensive; but there are also some open source tools
available to do similar things. One of these is built into
Calypso CalDAV/CardDAV/WebDAV for Android and Evolution
Ever since I bought my first Palm Pilot in 1997, I ve relied upon a
pocket-able device to carry a copy of my calendar and contacts, and for
that same database to be present on my laptop. I went through a long
list of Palm-compatible devices, including both the Palm Treo and Palm
Centro telephones. I even wrote a number of my own
When attacking a process, one interesting target on the heap is the
In the face of 
I've come to realize that I quite like coding in cafes, from time to time,
and it can be very productive for me.
This is strange, since I'm usually very sensitive to noise when I work.
Almost any unpredictable sounds at the office distract me,
which is why I often listen to music.
However, in a cafe, I don't need that, I just automatically block out
everything but my laptop.
At the office, everything that happens around
me might concern or interest me.
In a cafe, nobody says anything that I'm interested in.
Another distraction that cafes lack is the Internet.
Even when there's Internet access,
I tend to turn my laptop's wifi off so that I have a longer battery life.
I might occasionally check mail or IRC, but only for a few minutes at a time.
The rest of the time I crank the widget and write code or take care of
other things from my next actions list.
