From: "Luis R. Rodriguez" <mcgrof@suse.com>
To: David Howells <dhowells@redhat.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
mcgrof@gmail.com, ksummit-discuss@lists.linuxfoundation.org,
jkkm@jkkm.org
Subject: Re: [Ksummit-discuss] [TECH TOPIC] Firmware signing
Date: Tue, 28 Jul 2015 21:34:41 +0200 [thread overview]
Message-ID: <20150728193441.GF30479@wotan.suse.de> (raw)
In-Reply-To: <31492.1438110696@warthog.procyon.org.uk>
On Tue, Jul 28, 2015 at 08:11:36PM +0100, David Howells wrote:
> James Bottomley <James.Bottomley@HansenPartnership.com> wrote:
> > If we start signing
> > stuff we're not sure should be trusted that explodes the whole model.
> > Therefore, you need to establish two things
> >
> > 1. What is it that we actually trust? (I think it's the
> > transmission path from the firmware supplier, but you haven't
> > said)
This is the only thing this can help with now, *and* since it comes from there
that it respects obviously linux-firmware license requirements ;)
> I acknowledge this is a tricky point. Currently, we don't have signatures
> from vendors that we can use. What we have is blobs either grabbed from
> websites, extracted from Windows installations or provided by the vendor
> directly. Basically, we cannot trust *anything* we have at the moment.
At least on the 802.11 world I did experience tons of direct vendor involvement
in submitting firmware upstream directly. So this varies by subsystem. I suspect
Nvidia won't participate for their latest GPUs... But fuck 'em anyway right?
> > 2. If we can't validate 1, what do we do
>
> We need a fallback option. Possibly one that can be enabled/disabled from the
> kernel command line that allows firmware blobs with signatures set by the
> linux-firmware maintainer indicating this is, to our best knowledge, a valid
> blob. However, that does raise the issue of how you rescind that indication.
As with module signing I think CONFIG_FIRMWARE_SIG_FORCE=y should only be used
for FW for folks who know who can vet all firmware and want this, the
permissive option you describe I think would be for folks who do not enable
CONFIG_FIRMWARE_SIG_FORCE. There's more to this though, as I'll describe
below.
> > For 2. I think you need to leave stuff you can't validate 1. for
> > unsigned and let system policy decide. Signing is implying a trust you
> > don't have and thus corrupting the trust model.
>
> That's a fair point.
>
> I guess what you want is:
>
> (1) A driver can provide a key in some fashion (exact mechanism TBD), then we
> only permit firmware signed by that key.
>
> (2) If driver provides a key but the firmware doesn't have an associated
> signature, we reject it.
The second set of patches that I have enable this as this criteria is exactly
what I wanted to enable to replace CRDA in userspace. It would also make it
separate from FW signing, so although CONFIG_FIRMWARE_SIG_FORCE=n a driver
can still have a Kconfig option for its own use which may let folks require
or not signing for its driver.
> (3) A driver can provide a hash of the firmware content and only that exact
> firmware blob is permitted (or possibly a list of alternative hashes).
The firmware API keeps being abused, my second set of patches make the
firmware API extensible to enable such features if we really want them.
The way to think about it is we'd expose an API to let users use
sysdata_file_request() or sysdata_file_request_async() and on it they'd
pass a const struc sysdata_file_desc (descriptor) which provides all the
requirements. Interally then the kernel sees if it can match it and if so
it tosses the system data file (I call it this now as its not just firmware
we'd be using this for) to the caller.
All sysdata_file_request*() API users would need an OID registered too
so that a key can only be used for that purpose.
> (4) If a driver doesn't provide a key, we always accept the firmware.
>
> Which means that someone can use firmware for a driver that falls into
> category (4) as an attack mechanism. Ideally, I'd like to close (4)
> entirely. We could instead:
>
> (4) If the firmware is signed by the linux-firmware key, we log a warning but
> accept the firmware.
>
> (5) We reject the firmware.
The way I have it now if usres use sysdata_file_request*() APIs then only
the criteria there must be met but if we wanted to piggy back off support
for Kyle's key we can easily do that with a flag, but by default I didn't
support this. ie, if you wanted to trust Kyle's key you'd just use the
old firmware_request() APIs with CONFIG_FIRMWARE_SIG=y, but we can change
this of course.
Luis
next prev parent reply other threads:[~2015-07-28 19:34 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-28 13:36 David Howells
2015-07-28 14:23 ` David Woodhouse
2015-07-28 16:55 ` Luis R. Rodriguez
2015-07-28 15:10 ` James Bottomley
2015-07-28 15:22 ` Andy Lutomirski
2015-07-28 15:31 ` James Bottomley
2015-07-28 16:05 ` Andy Lutomirski
2015-07-28 16:10 ` James Bottomley
2015-07-28 16:15 ` David Woodhouse
2015-07-28 16:35 ` Andy Lutomirski
2015-07-28 16:44 ` David Howells
2015-07-28 17:03 ` Andy Lutomirski
2015-07-28 19:19 ` David Woodhouse
2015-07-28 19:31 ` Andy Lutomirski
2015-07-28 19:43 ` David Woodhouse
2015-07-28 22:03 ` James Bottomley
2015-08-11 20:24 ` David Howells
2015-08-11 21:56 ` Andy Lutomirski
2015-08-11 22:03 ` Luis R. Rodriguez
2015-08-12 18:22 ` David Howells
2015-08-12 18:45 ` David Woodhouse
2015-08-12 19:09 ` Andy Lutomirski
2015-08-12 19:15 ` James Bottomley
2015-08-12 19:25 ` Andy Lutomirski
2015-08-12 19:43 ` James Bottomley
2015-08-12 19:45 ` Andy Lutomirski
2015-08-12 19:59 ` James Bottomley
2015-08-13 7:03 ` Jan Kara
2015-08-13 14:01 ` James Bottomley
2015-08-12 22:46 ` David Howells
2015-08-12 22:51 ` Andy Lutomirski
2015-08-12 19:06 ` Andy Lutomirski
2015-08-12 22:39 ` David Howells
2015-08-12 22:45 ` Andy Lutomirski
2015-08-12 22:45 ` David Howells
2015-08-12 22:47 ` Andy Lutomirski
2015-07-28 16:18 ` David Howells
2015-07-28 16:42 ` James Bottomley
2015-07-28 17:05 ` Andy Lutomirski
2015-07-28 17:09 ` James Bottomley
2015-07-28 17:10 ` Andy Lutomirski
2015-07-29 2:00 ` James Morris
2015-07-28 16:58 ` Josh Boyer
2015-07-28 15:12 ` David Woodhouse
2015-07-28 18:47 ` Peter Jones
2015-07-28 19:14 ` David Howells
2015-07-28 19:52 ` Peter Jones
2015-07-28 16:17 ` David Howells
2015-07-28 16:59 ` James Bottomley
2015-07-28 19:11 ` David Howells
2015-07-28 19:34 ` Luis R. Rodriguez [this message]
2015-07-28 21:53 ` James Bottomley
2015-07-28 22:39 ` David Howells
2015-07-28 22:44 ` Andy Lutomirski
2015-07-29 8:39 ` David Woodhouse
2015-07-28 18:36 ` josh
2015-07-28 18:44 ` James Bottomley
2015-07-28 18:54 ` josh
2015-07-28 19:06 ` Luis R. Rodriguez
2015-07-28 21:38 ` Greg KH
2015-07-28 23:59 ` josh
2015-07-29 0:17 ` Greg KH
2015-07-29 9:37 ` David Woodhouse
2015-07-29 15:00 ` James Bottomley
2015-07-29 15:35 ` David Woodhouse
2015-07-29 16:38 ` James Bottomley
2015-07-29 17:32 ` David Woodhouse
2015-07-29 23:39 ` James Bottomley
2015-07-30 8:08 ` David Woodhouse
2015-07-30 13:48 ` James Bottomley
2015-07-30 14:21 ` Heiko Stübner
2015-07-30 14:30 ` James Bottomley
2015-07-30 15:01 ` David Woodhouse
2015-07-30 16:17 ` James Bottomley
2015-07-30 19:17 ` David Woodhouse
2015-07-31 14:41 ` Theodore Ts'o
2015-07-31 16:14 ` Tim Bird
2015-07-31 17:25 ` David Woodhouse
2015-07-30 16:24 ` Tim Bird
2015-07-29 16:35 ` Josh Triplett
2015-07-29 8:29 ` David Woodhouse
2015-07-29 11:57 ` Mark Brown
2015-07-29 12:02 ` David Woodhouse
2015-07-29 12:24 ` Mark Brown
2015-07-28 19:23 ` David Woodhouse
2015-07-28 19:19 ` David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150728193441.GF30479@wotan.suse.de \
--to=mcgrof@suse.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=dhowells@redhat.com \
--cc=jkkm@jkkm.org \
--cc=ksummit-discuss@lists.linuxfoundation.org \
--cc=mcgrof@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox