linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Cc: dhowells@redhat.com, rusty@rustcorp.com.au,
	ming.lei@canonical.com, seth.forshee@canonical.com,
	kyle@kernel.org, akpm@linux-foundation.org,
	gregkh@linuxfoundation.org, keescook@chromium.org,
	casey@schaufler-ca.com, tiwai@suse.de, mjg59@srcf.ucam.org,
	wireless-regdb@lists.infradead.org,
	linux-wireless@vger.kernel.org, jlee@suse.com,
	linux-kernel@vger.kernel.org,
	"Luis R. Rodriguez" <mcgrof@suse.com>
Subject: Re: [RFC v1 05/12] firmware: add firmware signature checking support
Date: Wed, 06 May 2015 17:57:59 +0100	[thread overview]
Message-ID: <17829.1430931479@warthog.procyon.org.uk> (raw)
In-Reply-To: <1430873070-7290-6-git-send-email-mcgrof@do-not-panic.com>

Luis R. Rodriguez <mcgrof@do-not-panic.com> wrote:

> As with module signing, we do a very simple search for a
> particular string appended to the firmware. There's both a
> config option and a boot parameter which control whether we
> accept or fail with unsigned firmware and firmware that are
> signed with an unknown key.
> 
> If firmware signing is enabled, the kernel will be tainted
> if a firmware is loaded that is unsigned or has a signature
> for which we don't have the key.

I think you need to be careful storing the firmware blobs on disk with
signatures attached for two reasons:

 (1) There may be licensing/copyright issues on these blobs if you alter them.

 (2) Someone might try loading the modified blob without the signature being
     stripped - say someone runs an old kernel or copies the blob to a
     non-Linux system and tries to load it there.

Adding the signature to the blob upon loading might be less problematic, but
it still potentially suffers from (2) above.

If you switch to PKCS#7, you can also embed the blob inside the PKCS#7
message, so essentially the blob is unmodified and can be verified or
extracted by any suitable PKCS#7 tool.  This is more likely to get the
firmware rejected if the kernel isn't expecting it to be signed, I think.

I'm not sure how userspace actually passes the firmware blob to the kernel,
but I do think that if you can, you should pass the signature separately to
the blob.

With kernel modules this doesn't matter since modules are typically tied to a
single kernel version anyway.

David

  parent reply	other threads:[~2015-05-06 16:58 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-06  0:44 [RFC v1 00/12] kernel/firmware/wireless: firmware digital signature checks Luis R. Rodriguez
2015-05-06  0:44 ` [PATCH v1 01/12] kernel/params.c: export param_ops_bool_enable_only Luis R. Rodriguez
2015-05-08 17:56   ` Rusty Russell
2015-05-06  0:44 ` [PATCH v1 02/12] kernel: generalize module signing as system data signing Luis R. Rodriguez
2015-05-07  1:07   ` Rusty Russell
2015-05-06  0:44 ` [PATCH v1 03/12] crypto: qat - address recursive dependency when fw signing is enabled Luis R. Rodriguez
2015-05-06  3:33   ` Herbert Xu
2015-05-07  8:42     ` Paul Bolle
2015-05-07 18:06       ` Paul Bolle
2015-05-07 18:28         ` Luis R. Rodriguez
2015-05-07 20:14           ` Paul Bolle
2015-05-08 21:53             ` Paul Bolle
2015-05-12 16:08               ` Luis R. Rodriguez
2015-05-18 20:01         ` Luis R. Rodriguez
2015-05-18 20:45           ` Paul Bolle
2015-05-19  0:09             ` Luis R. Rodriguez
2015-05-19  8:02               ` Paul Bolle
2015-05-19 15:46                 ` Luis R. Rodriguez
2015-05-19 22:59                   ` Herbert Xu
2015-05-19 23:03                     ` Herbert Xu
2015-05-19 23:05                       ` Luis R. Rodriguez
2015-05-20  2:49                         ` Herbert Xu
2015-05-20  9:00                           ` Paul Bolle
2015-05-20 21:19                             ` Luis R. Rodriguez
2015-05-06  0:44 ` [PATCH v1 04/12] firmware: fix possible use after free on name on asynchronous request Luis R. Rodriguez
2015-05-06  0:44 ` [RFC v1 05/12] firmware: add firmware signature checking support Luis R. Rodriguez
2015-05-06  0:44 ` [RFC v1 06/12] firmware: generalize "firmware" as "system data" helpers Luis R. Rodriguez
2015-05-06  0:44 ` [RFC v1 07/12] firmware: add generic system data helpers with signature support Luis R. Rodriguez
2015-05-06  0:44 ` [RFC v1 08/12] p54spi: use sysdata_file_request() for EEPROM optional system data Luis R. Rodriguez
2015-05-06  0:44 ` [RFC v1 09/12] p54: use sysdata_file_request() and sysdata_file_request_async() Luis R. Rodriguez
2015-05-06  0:44 ` [RFC v1 10/12] ath9k_htc: " Luis R. Rodriguez
2015-05-06  0:44 ` [RFC v1 11/12] iwlwifi: " Luis R. Rodriguez
2015-05-06  7:03   ` Johannes Berg
2015-05-06 16:44     ` Luis R. Rodriguez
2015-05-06  0:44 ` [RFC v1 12/12] cfg80211: request for regulatory system data file Luis R. Rodriguez
2015-05-06 12:08 ` [PATCH v1 02/12] kernel: generalize module signing as system data signing David Howells
2015-05-06 16:57 ` David Howells [this message]
2015-05-06 17:31   ` [RFC v1 05/12] firmware: add firmware signature checking support Luis R. Rodriguez
2015-05-06 17:55 ` [RFC v1 00/12] kernel/firmware/wireless: firmware digital signature checks Luis R. Rodriguez

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=17829.1430931479@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=casey@schaufler-ca.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jlee@suse.com \
    --cc=keescook@chromium.org \
    --cc=kyle@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mcgrof@do-not-panic.com \
    --cc=mcgrof@suse.com \
    --cc=ming.lei@canonical.com \
    --cc=mjg59@srcf.ucam.org \
    --cc=rusty@rustcorp.com.au \
    --cc=seth.forshee@canonical.com \
    --cc=tiwai@suse.de \
    --cc=wireless-regdb@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).