[personal profile] mjg59
It's fairly straightforward to boot a UEFI Secure Boot system using something like Shim or the Linux Foundation's loader, and for distributions using either the LF loader or the generic version of Shim that's pretty much all you need to care about. The physically-present end user has had to explicitly install new keys or hashes, and that means that you no longer need to care about Microsoft's security policies or (assuming there's no exploitable flaws in the bootloader itself) fear any kind of revocation.

But what about if you're a distribution that cares about booting without the user having to install keys? There's several reasons to want that (convenience for naive users, ability to netboot, that kind of thing), but it has the downside that your system can now be used as an attack vector against other operating systems. Do you care about that? It depends how you weigh the risks. First, someone would have to use your system to attack another. Second, Microsoft would have to care enough to revoke your signature. The first hasn't happened yet, so we have no real idea how likely the second is. However, it doesn't seem awfully unlikely that Microsoft would be willing to revoke a distribution signature if that distribution were being used to attack Windows.

How do you avoid that scenario? There's various bits of security work you need to do, but one of them is to require that all your kernel modules be signed. That's easy for the modules in the distribution, since you just sign them all before shipping them. But how about third party modules? There's three main options here:

  1. Don't support third party modules on Secure Boot systems
  2. Have the distribution sign the modules
  3. Have the vendor sign the modules

The first option is easy, but not likely to please users. Or hardware vendors. Not ideal.

The second option is irritating for a bunch of reasons, and a pretty significant one is license-related. If you sign a module, does that mean you're endorsing it in some way? Does signing the nvidia driver mean that you think there's no license concerns? Even ignoring that, how do you decide whose drivers to sign? We can probably assume that companies like AMD and nvidia are fairly reputable, but how about Honest John's Driver Emporium? Verifying someone's identity is astonishingly expensive to do a good job of yourself, and not hugely cheaper if you farm it out to a third party. It's also irritating for the driver vendor, who needs a separate signature for every distribution they support. So, while possible, this isn't an attractive solution.

The third option pushes the responsibility out to other people, and it's always nice to get other people to do work instead of you. The problem then is deciding whose keys you trust. You can push that off to the user, but it's not the friendliest solution. The alternative is to trust any keys that are signed with a trusted key. But what is a trusted key? Having the distribution sign keys just pushes us back to option (2) - you need to verify everyone's identity, and they need a separate signing key for every distribution they support. In an ideal world, there'd be a key that we already trust and which is owned by someone willing to sign things with it.

The good news is that such a key exists. The bad news is that it's owned by Microsoft.

The recent discussion on LKML was about a patchset that allowed the kernel to install new keys if they were inside a PE/COFF binary signed by a trusted key. It's worth emphasising that this patchset doesn't change the set of keys that the kernel trusts - the kernel trusts keys that are installed in your system firmware, so if your system firmware trusts the Microsoft key then your kernel already trusts the Microsoft key. The reasoning here is pretty straightforward. If your firmware trusts things signed by Microsoft, and if a bad person can get things signed by Microsoft, the bad person can already give you a package containing a backdoored bootloader. Letting them sign kernel modules doesn't alter the power they already have over your system. Microsoft will sign PE/COFF binaries, so a vendor would just have to sign up with Microsoft, pay $99 to Symantec to get their ID verified, wrap their key in a PE/COFF binary and then get it signed by Microsoft. The kernel would see that this object was signed by a trusted key and extract and install the key.

Linus is, to put it mildly, unenthusiastic about this idea. It adds some extra complexity to the kernel in the form of a binary parser that would only be used to load keys from userspace, and the kernel already has an interface for that in the form of X509 certificates. The problem we have is that Microsoft won't sign X509 certificates, and there's no way to turn a PE/COFF signature into an X509 signature. Someone would have to re-sign the keys, which starts getting us back to option (2). One way around this would be to have an automated service that accepts PE/COFF objects, verifies that they're signed by Microsoft, extracts the key, re-signs it with a new private key and spits out an X509 certificate. That avoids having to add any new code to the kernel, but it means that there would have to be someone to run that service and it means that their public key would have to be trusted by the kernel by default.

Who would that third party be? The logical choice might be the Linux Foundation, but since we have members of the Linux Foundation Technical Advisory Board saying that they think module signing is unnecessary and that there's no real risk of revocation, it doesn't seem likely that they'll be enthusiastic. A distribution could do it, but there'd be arguments about putting one distribution in a more privileged position than others. So far, nobody's stood up to do this.

A possible outcome is that the distributions who care about signed modules will all just carry this patchset anyway, and the ones who don't won't. That's probably going to be interpreted by many as giving too much responsibility to Microsoft, but it's worth emphasising that these patches change nothing in that respect - if your firmware trusts Microsoft, you already trust Microsoft. If your firmware doesn't trust Microsoft, these patches will not cause your kernel to trust Microsoft. If you've set up your own chain of trust instead, anything signed by Microsoft will be rejected.

What's next? It wouldn't surprise me too much if nothing happens until someone demonstrates how to use a signed Linux system to attack Windows. Microsoft's response to that will probably determine whether anyone ends up caring.

Re: Wow, what a lot of dissembling!

Date: 2013-02-28 04:44 pm (UTC)
From: (Anonymous)
I have no idea how you ever got that idea, but for the record, I, Greg Kroah-Hartman, do NOT have a low opinion of Matthew's technical skills at all. And I really doubt that Ted or Linus do either.

We are merely disagreeing about how something should be implemented, or in my case, how "far" we need to take the "secure" kernel options.

That does not mean I think less of Matthew at all, in any way, shape or form. I have only the highest regard for him, and consider him a friend. He is a valuable asset to Linux and he has done wonderful work for the kernel, and for Linux overall for a very long time.

Sam, if you ever have a question about what my opinion is, please ask before ever writing something that can turn out (like now) to be so totally wrong.

greg k-h

Re: Wow, what a lot of dissembling!

Date: 2013-02-28 08:12 pm (UTC)
From: (Anonymous)
He's not ever done that and isn't going to start now. He just uses ITWire as a bully platform to relentlessly harangue people he doesn't like for whatever reason. It's got even less to do with journalism than Phoronix.

Re: Wow, what a lot of dissembling!

Date: 2013-02-28 10:49 pm (UTC)
From: (Anonymous)
Greg, I am free to draw my own impressions from your posts on that mailing list thread and that is what I have done.

Sam Varghese

Re: Wow, what a lot of dissembling!

Date: 2013-02-28 10:58 pm (UTC)
From: (Anonymous)
So you have even less respect for reality than SJVN? That's impressive.

Re: Wow, what a lot of dissembling!

Date: 2013-02-28 11:02 pm (UTC)
From: (Anonymous)
Amazing. Never let facts stop you from slandering about people you dislike for some reason, eh?

Let's recap -
Greg: I disagree with Matthew.
Sam: GREG THINKS MATTHEW'S A GODAWFUL CODER
Greg: That's not what I think at all, I think he's a great coder.
Sam: You're wrong and I don't care.

IOW, you're a flat-out liar. If you had any sense of shame, I'd say you should be deeply ashamed of yourself, but we're a few years past that point.

Re: Wow, what a lot of dissembling!

Date: 2013-03-01 03:29 am (UTC)
From: (Anonymous)
If someone puts material out in public, then others are free to draw their own conclusions from that material. That's in a democracy.

The kind of thinking you are advocating takes place in countries like North Korea - the dear leader speaks and everybody _has_ to interpret it as he wanted it interpreted.

Re: Wow, what a lot of dissembling!

Date: 2013-03-01 04:03 pm (UTC)
From: (Anonymous)
Hey, there's this new thing on the internet, maybe you've heard of it? http://en.wikipedia.org/wiki/Godwin's_law

Reputation

Date: 2013-03-02 12:13 pm (UTC)
From: [identity profile] akuckartz.myopenid.com
Sam, are you aware that you are destructing your reputation with some of the comments posted here?

Re: Reputation

Date: 2013-03-02 01:41 pm (UTC)
From: (Anonymous)
You can't fall off the floor.

Profile

Matthew Garrett

About Matthew

Power management, mobile and firmware developer on Linux. Security developer at Nebula. Member of the Linux Foundation Technical Advisory Board. Ex-biologist. @mjg59 on Twitter. Content here should not be interpreted as the opinion of my employer.

Page Summary

Expand Cut Tags

No cut tags