Gentoo Archives: gentoo-user

From: Michael Mol <mikemol@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Lockdown: free/open OS maker pays Microsoft ransom for the right to boot on users' computers
Date: Sun, 03 Jun 2012 01:40:52
Message-Id: CA+czFiBSFZvEFKohW-01Wz+ZbENs21yUQ64QFqnNKHR30KZd+Q@mail.gmail.com
In Reply to: Re: [gentoo-user] Lockdown: free/open OS maker pays Microsoft ransom for the right to boot on users' computers by Florian Philipp
1 On Sat, Jun 2, 2012 at 8:35 PM, Florian Philipp <lists@×××××××××××.net> wrote:
2 > Am 03.06.2012 01:36, schrieb Michael Mol:
3 >> On Sat, Jun 2, 2012 at 6:50 PM, pk <peterk2@××××××××.se> wrote:
4 >>> On 2012-06-02 22:10, Michael Mol wrote:
5 >>
6 >> [snip]
7 >>
8 > [...]
9 >>
10 >> The BIOS will only load a signed bootloader. The signed bootloader
11 >> will only load a signed kernel. The signed kernel will...do whatever
12 >> you tell it to do.
13 >>
14 >
15 > According to Matthew's blog post, Fedora patched Grub2 and the kernel to
16 > avoid loading custom code into them:
17 > - Deactivate grub2 plugins
18 > - Sign all kernel modules and disallow unsigned ones
19 > - Prevent access to PCI through userland
20 > - Sanitize the kernel command line
21
22 Yeah, I read his blog post via lwn.net. I forgot some of the details.
23
24
25 >
26 >>> What does that mean to a source based "distro"?
27 >>
28 >> It's going to make building and installing grub and the kernel
29 >> trickier; you'll have to get them signed. And that's going to be a
30 >> PITA for anyone who does developers.
31 >>
32 >> What it *really* means is that someone who wants to run Linux as a
33 >> hobbyist or developer is going to disable "SecureBoot", and then fall
34 >> back to business as usual.
35 >>
36 >
37 > Yeah, the only way for Gentoo to have secure boot is a) let each user
38 > register with Microsoft, b) provide a binary kernel and boot loader.
39
40 If you have a need to get a secure Gentoo boot, and you don't need to
41 boot Windows 8, then (as I understand it) you can also purge the UEFI
42 BIOS of Microsoft's key and install your own.
43
44 >
45 >>> Also, I would assume a legitimate key would be able to
46 >>> sign pretty much any binary so a key that Fedora uses could be used to
47 >>> sign malware for Windows, which then would be blacklisted by
48 >>> Microsoft...
49 >>
50 >> If Fedora allows their key to sign crap, then their key will get revoked.
51 >>
52 >> What I hope (I don't know) is whether or not the signing system
53 >> involved allows chaining.  i.e., with SSL, I can generate my own key,
54 >> get it signed by a CA, and then bundle the CA's public key and my
55 >> public key when I go on to sign _another_ key.
56 >>
57 >> So, could I generate a key, have Fedora sign it, and then use my key
58 >> to sign my binaries? If my key is used to do malicious things,
59 >> Fedora's off the hook, and it's only my key which gets revoked.
60 >>
61 >
62 > Consider the exact approach Fedora takes: They've only made a certified
63 > stage-1 boot loader. This boot loader then loads grub2 (signed with a
64 > custom Fedora key, nothing chained back to MS) which then loads a
65 > custom-signed kernel. This allows them to avoid authenticating against
66 > MS every time they update grub or the kernel.
67 >
68 > This means if you want to certify with Fedora, you don't need to chain
69 > up to MS as long as you use their stage-1 boot loader. However, if I was
70 > part of Fedora, I wouldn't risk my key by signing other people's stuff.
71 > Mainboard makers won't look twice when they see rootkits with Fedora
72 > boot loaders.
73
74 Yeah, that's not the kind of thing I was thinking about.
75
76 With SSL's PKI, someone like StartSSL has a CA cert.
77
78 I generate my own key, have StartSSL sign my key. My brother generates
79 a key, and I sign his.
80
81 Now my brother takes his key and sends you a signed email.
82
83 Now, you've never heard of me, and the crypto signature attached to
84 that email doesn't mean anything. However, if he bundles my public key
85 along with his public key in that email, then you can see that my
86 public key was signed by someone you _do_ know. Now you have a chain
87 of signatures showing the relationship between that email and the root
88 CA.
89
90 Now here's the interesting part, and what I was alluding to wrt signed
91 binaries and key revocation.
92
93 Let's say _my_ key is leaked. My brother send you an email signed with
94 his key. You look at that key, you see that key hasn't been revoked.
95 You look at the key that signed that key, and you see that _that_ key
96 _has_ been revoked. You can then choose to not trust keys signed by
97 that key.
98
99 Now let's say my _brother's_ key is leaked, and so he revokes it. Any
100 new emails signed with that key can be seen to be invalid. However,
101 _my_ key is still considered valid; I can still sign things with it.
102
103 That's the kind of thing I was thinking about. If you allow key chains
104 to be deep, rather than forcing them to be wide, you can wield
105 blacklists like a scalpel, rather than a bludgeon.
106
107 >
108 >>> and how is malware defined? Anything that would be
109 >>> detrimental to Microsoft?
110 >>
111 >> Dunno. I imagine it comes down to whatever the chief key's owner
112 >> doesn't want running on the same hardware while SecureBoot is enabled.
113 >> Rootkits come to mind.
114 >>
115 >
116 > To quote Matthew:
117 >> If I take a signed Linux bootloader and then use it to boot something
118 >> that looks like an unsigned Linux kernel, I've instead potentially
119 >> just booted a piece of malware. And if that malware can attack
120 >> Windows then the signed Linux bootloader is no longer just a signed
121 >> Linux bootloader, it's a signed Windows malware launcher and that's
122 >> the kind of thing that results in that bootloader being added to the
123 >> list of blacklisted binaries and suddenly your signed Linux
124 >> bootloader isn't even a signed Linux bootloader.
125
126 What kind of signature is the bootloader checking, anyway?
127
128 --
129 :wq

Replies