[RFC] Second attempt at kernel secure boot support

Started by Matthew Garrett on Sep 20, 2012 · 167 messages from 24 authors · Last reply Nov 23, 2012

page 3 of 3 · open the first message on its own page

  1. [PATCH V2 01/10] Secure boot: Add new capability
    Related patches
  2. [PATCH V2 04/10] ACPI: Limit access to custom_method
    Related patches
  3. [PATCH V2 07/10] Secure boot: Add a dummy kernel parameter that will switch on Secure Boot mode
    Related patches
  4. [PATCH V2 09/10] acpi: Ignore acpi_rsdp kernel parameter in a secure boot environment
    Related patches
  5. [PATCH V2 08/10] efi: Enable secure boot lockdown automatically when enabled in firmware
    Related patches
  6. [PATCH V2 06/10] Restrict /dev/mem and /dev/kmem in secure boot setups
    Related patches
  7. [PATCH V2 05/10] asus-wmi: Restrict debugfs interface
    Related patches
  8. [PATCH V2 03/10] x86: Lock down IO port access in secure boot environments
    Related patches
  9. [PATCH V2 02/10] PCI: Lock down BAR access in secure boot environments
    Related patches
  10. [PATCH V2 10/10] SELinux: define mapping for new Secure Boot capability
    Related patches
  11. [PATCH V3 07/10] Secure boot: Add a dummy kernel parameter that will switch on Secure Boot mode
    Related patches
  12. [PATCH RFC 1/4] scripts/sign-file: Allow specifying hash algorithm via -a option
    Revisions and related patches
    Revisions (2)
    1. rfc current
    2. v2 [diff against previous]
  13. [PATCH RFC 2/4] scripts/sign-file: Support firmware signing
    Revisions and related patches
    Revisions (2)
    1. rfc current
    2. v2 [diff against previous]
  14. [PATCH RFC 3/4] firmware: Add a signature check
    Revisions and related patches
    Revisions (2)
    1. rfc current
    2. v2 [diff against previous]
  15. [PATCH RFC 4/4] firmware: Install signature files automatically
    Revisions and related patches
    Revisions (2)
    1. rfc current
    2. v2 [diff against previous]
  16. [PATCH RFC v2 4/4] firmware: Install firmware signature files automatically
    Revisions and related patches
    Revisions (2)
    1. rfc
    2. v2 current [diff against previous]
  17. [PATCH RFC v2 2/4] firmware: Add -a option to scripts/sign-file
    Revisions and related patches
    Revisions (2)
    1. rfc
    2. v2 current [diff against previous]
  18. [PATCH RFC v2 1/4] firmware: Add the firmware signing support to scripts/sign-file
    Revisions and related patches
    Revisions (2)
    1. rfc
    2. v2 current [diff against previous]
  19. [PATCH RFC v2 3/4] firmware: Add support for signature checks
    Revisions and related patches
    Revisions (2)
    1. rfc
    2. v2 current [diff against previous]

Re: [PATCH RFC 0/4] Add firmware signature file check

Message details and related content
At Tue, 6 Nov 2012 18:04:36 +0800,
Ming Lei wrote:
On Tue, Nov 6, 2012 at 4:18 PM, Takashi Iwai [off-list ref] wrote:
quoted
Right, and it's intentionally dropped so.  For the non-default fw
path, it can be added via proc dynamically or via kconfig statically.
If the firmware is generated via udev, then it doesn't make sense to
check a static signature file.
kconfig should be better, and proc isn't a good way because it
is a bit late. Also the firmware might be loaded dynamically from other
where(network, ...). So it is better to fall back on user space if the
firmware file isn't found by direct loading even firmware signature
is enabled.
It will even with my patch, when enforce_sig is false.
quoted
A "regression" can't happen in this case because the secure boot is
a completely new stuff :)  For normal boot, sig_enforce is false, so
no behavior change here (well my patch still applies the signature
check for direct fw loading, but it won't regress at least).
Got it, so FIRMWARE_SIG and MODULE_SIG should be enabled only
for secure boot.
The kernels with these kconfigs set can run on normal systems.  In
non-secure boot mode, however, sig_enable option are off, thus the
fallback is still applied.
The regression might still be triggered if falling back on user space is not
supported, see above.
quoted
quoted
Also the default search path in firmware_class.c is from built-in path of
udev, and distributions may customize their firmware path by udev
configure option.
Well, the default paths in kernel can be changed to follow that as
well, no?
quoted
quoted
Honestly speaking, I have a feeling that we should rather go for
getting rid of udev fw loading.  The fw loader code is overly complex
Yes, I have the feeling too, but we need to make sure no regressions
introduced.
Right.  And I guess the exceptional firmware case is better found by
checking udev.  But it's a bit off topic from secure boot.
Not sure, some distributions may not use udev at all.
Hmm, I can't imagine a system without udev but still supporting the
firmware loading with user-space interaction...
Some application
might need the firmware add/remove event.
Then this is already broken with the direct fw loading on 3.7, no?
Some may not store the
firmware in fs.
And these won't satisfy the firmware signing, so we don't need to care
too much.
So now it is difficult to say we can remove firmware loading from user
space. Better to just keep it.
Yeah, I don't mean to drop it now.  But I meant to go for dropping
it.  For example, put a deprecated flag and give a warning for udev fw
loading path so that user notices something to be fixed.
quoted
Obviously no distro releases using 3.7-rc since it's still rc.
But what's your point?
I mean direct loading hasn't been tested completely, so we don't
know which distributions may fallback on user space loading.
The transition to direct fw loading is seamless, so I don't think
you can see which drivers use udev fw loading from the results of
distros...  It might reveal some potential issues of direct fw loading
(like udev-trigger dependency), though.


Takashi

Re: [PATCH RFC 0/4] Add firmware signature file check

Message details and related content
On Tue, Nov 6, 2012 at 6:17 PM, Takashi Iwai [off-list ref] wrote:
At Tue, 6 Nov 2012 18:04:36 +0800,
Ming Lei wrote:
quoted
On Tue, Nov 6, 2012 at 4:18 PM, Takashi Iwai [off-list ref] wrote:
quoted
Right, and it's intentionally dropped so.  For the non-default fw
path, it can be added via proc dynamically or via kconfig statically.
If the firmware is generated via udev, then it doesn't make sense to
check a static signature file.
kconfig should be better, and proc isn't a good way because it
is a bit late. Also the firmware might be loaded dynamically from other
where(network, ...). So it is better to fall back on user space if the
firmware file isn't found by direct loading even firmware signature
is enabled.
It will even with my patch, when enforce_sig is false.
It is true if all firmwares are signed on safe boot. If firmware is allowed
to be loaded from network or other non-fs place in secure distribution,
your patch will break this loading.
quoted
quoted
A "regression" can't happen in this case because the secure boot is
a completely new stuff :)  For normal boot, sig_enforce is false, so
no behavior change here (well my patch still applies the signature
check for direct fw loading, but it won't regress at least).
Got it, so FIRMWARE_SIG and MODULE_SIG should be enabled only
for secure boot.
The kernels with these kconfigs set can run on normal systems.  In
non-secure boot mode, however, sig_enable option are off, thus the
fallback is still applied.
quoted
The regression might still be triggered if falling back on user space is not
supported, see above.
quoted
quoted
Also the default search path in firmware_class.c is from built-in path of
udev, and distributions may customize their firmware path by udev
configure option.
Well, the default paths in kernel can be changed to follow that as
well, no?
quoted
quoted
Honestly speaking, I have a feeling that we should rather go for
getting rid of udev fw loading.  The fw loader code is overly complex
Yes, I have the feeling too, but we need to make sure no regressions
introduced.
Right.  And I guess the exceptional firmware case is better found by
checking udev.  But it's a bit off topic from secure boot.
Not sure, some distributions may not use udev at all.
Hmm, I can't imagine a system without udev but still supporting the
firmware loading with user-space interaction...
It is not so difficult, :-)

Some embedded systems use mdev in busybox, and some can
just parse the firmware event and run the below script:

                Documentation/firmware_class/hotplug-script

on firmware ADD event. I remembered that android loading is
very simple.
quoted
Some application
might need the firmware add/remove event.
Then this is already broken with the direct fw loading on 3.7, no?
Maybe, the direct loading hasn't been tested widely, and depends on
user space.
quoted
Some may not store the
firmware in fs.
And these won't satisfy the firmware signing, so we don't need to care
too much.
quoted
So now it is difficult to say we can remove firmware loading from user
space. Better to just keep it.
Yeah, I don't mean to drop it now.  But I meant to go for dropping
it.  For example, put a deprecated flag and give a warning for udev fw
loading path so that user notices something to be fixed.
Maybe we can do it until direct loading has been tested for some time.
quoted
quoted
Obviously no distro releases using 3.7-rc since it's still rc.
But what's your point?
I mean direct loading hasn't been tested completely, so we don't
know which distributions may fallback on user space loading.
The transition to direct fw loading is seamless, so I don't think
you can see which drivers use udev fw loading from the results of
distros...  It might reveal some potential issues of direct fw loading
(like udev-trigger dependency), though.
The clue can be found from debug message.


Thanks,
-- 
Ming Lei

Re: [PATCH RFC 0/4] Add firmware signature file check

Message details and related content
At Tue, 6 Nov 2012 18:40:57 +0800,
Ming Lei wrote:
On Tue, Nov 6, 2012 at 6:17 PM, Takashi Iwai [off-list ref] wrote:
quoted
At Tue, 6 Nov 2012 18:04:36 +0800,
Ming Lei wrote:
quoted
On Tue, Nov 6, 2012 at 4:18 PM, Takashi Iwai [off-list ref] wrote:
quoted
Right, and it's intentionally dropped so.  For the non-default fw
path, it can be added via proc dynamically or via kconfig statically.
If the firmware is generated via udev, then it doesn't make sense to
check a static signature file.
kconfig should be better, and proc isn't a good way because it
is a bit late. Also the firmware might be loaded dynamically from other
where(network, ...). So it is better to fall back on user space if the
firmware file isn't found by direct loading even firmware signature
is enabled.
It will even with my patch, when enforce_sig is false.
It is true if all firmwares are signed on safe boot. If firmware is allowed
to be loaded from network or other non-fs place in secure distribution,
your patch will break this loading.
Do we already have such a secure mechanism?  How is the security
assured?

quoted
quoted
quoted
A "regression" can't happen in this case because the secure boot is
a completely new stuff :)  For normal boot, sig_enforce is false, so
no behavior change here (well my patch still applies the signature
check for direct fw loading, but it won't regress at least).
Got it, so FIRMWARE_SIG and MODULE_SIG should be enabled only
for secure boot.
The kernels with these kconfigs set can run on normal systems.  In
non-secure boot mode, however, sig_enable option are off, thus the
fallback is still applied.
quoted
The regression might still be triggered if falling back on user space is not
supported, see above.
quoted
quoted
Also the default search path in firmware_class.c is from built-in path of
udev, and distributions may customize their firmware path by udev
configure option.
Well, the default paths in kernel can be changed to follow that as
well, no?
quoted
quoted
Honestly speaking, I have a feeling that we should rather go for
getting rid of udev fw loading.  The fw loader code is overly complex
Yes, I have the feeling too, but we need to make sure no regressions
introduced.
Right.  And I guess the exceptional firmware case is better found by
checking udev.  But it's a bit off topic from secure boot.
Not sure, some distributions may not use udev at all.
Hmm, I can't imagine a system without udev but still supporting the
firmware loading with user-space interaction...
It is not so difficult, :-)

Some embedded systems use mdev in busybox, and some can

6 more quoted lines

But I don't think Android devices will run on secure boot :)
That is, the whole signing madness is just for allowing boot on
upcoming machines that need the secure boot mode forced by Microsoft.
And this doesn't match with systems you suggested in the above.
quoted
quoted
Some application
might need the firmware add/remove event.
Then this is already broken with the direct fw loading on 3.7, no?
Maybe, the direct loading hasn't been tested widely, and depends on
user space.
quoted
quoted
Some may not store the
firmware in fs.
And these won't satisfy the firmware signing, so we don't need to care
too much.
quoted
So now it is difficult to say we can remove firmware loading from user
space. Better to just keep it.
Yeah, I don't mean to drop it now.  But I meant to go for dropping
it.  For example, put a deprecated flag and give a warning for udev fw
loading path so that user notices something to be fixed.
Maybe we can do it until direct loading has been tested for some time.
Yeah, it's a future plan.  But I'd say it's better clarified that we
should go for that direction instead of keeping the stuff forever.

quoted
quoted
quoted
Obviously no distro releases using 3.7-rc since it's still rc.
But what's your point?
I mean direct loading hasn't been tested completely, so we don't
know which distributions may fallback on user space loading.
The transition to direct fw loading is seamless, so I don't think
you can see which drivers use udev fw loading from the results of
distros...  It might reveal some potential issues of direct fw loading
(like udev-trigger dependency), though.
The clue can be found from debug message.
Debug messages are turned off on normal machines, unfortunately.


Takashi

Re: [PATCH RFC 0/4] Add firmware signature file check

Message details and related content
On Tue, Nov 6, 2012 at 6:53 PM, Takashi Iwai [off-list ref] wrote:
At Tue, 6 Nov 2012 18:40:57 +0800,
quoted
It is true if all firmwares are signed on safe boot. If firmware is allowed
to be loaded from network or other non-fs place in secure distribution,
your patch will break this loading.
Do we already have such a secure mechanism?  How is the security
assured?
I don't know, and my comments are just on your patch and the condition.
I understand secure guys should know if the condition may be true or false, :-)
quoted
The clue can be found from debug message.
Debug messages are turned off on normal machines, unfortunately.
Kernel guys will put one eye on bug report, also enabling udev log
can help the problem too.


Thanks,
-- 
Ming Lei

Re: [PATCH RFC 0/4] Add firmware signature file check

Message details and related content
quoted
It is true if all firmwares are signed on safe boot. If firmware is allowed
to be loaded from network or other non-fs place in secure distribution,
your patch will break this loading.
Actually it's not. It should be true that firmware that can harm machine
integrity and is loaded by the OS is signed at some level. However it is
not true that

- firmware that is no integrity threat (eg USB firmware)
- firmware that can be flash updated on another PC and not observed by
  the target

are necessarily in any way signed or secure.
Do we already have such a secure mechanism?  How is the security
assured?
Another thing to consider is that a lot of hardware (particularly
anything aimed at such 'secure boot' machines) is already digitally
signed. Whether you need to enforce external signing is a mix of driver
specific questions ("does this device have signed firmware anyway", "can
bogus firmware do anything interesting") and local policy "do I as admin
want to block any firmware that isn't corporate site approved"

For USB this is quite important because there is a ton of hardware out
there which is intended to have firmware dumped into it for hacking and
fun purposes and should generally be totally outside of the signing
stuff.

Alan
Message details and related content
On Wed, 31 Oct 2012, Matthew Garrett wrote:
quoted
Reading stored memory image (potentially tampered before reboot) from disk 
is basically DMA-ing arbitrary data over the whole RAM. I am currently not 
able to imagine a scenario how this could be made "secure" (without 
storing private keys to sign the hibernation image on the machine itself 
which, well, doesn't sound secure either).
shim generates a public and private key. 
It seems to me that this brings quite a huge delay into the boot process 
both for "regular" and resume cases (as shim has no way to know what is 
going to happen next). Mostly because obtaining enough entropy is 
generally very difficult when we have just shim running, right?
It hands the kernel the private key in a boot parameter and stores the 
public key in a boot variable. On suspend, the kernel signs the suspend 
image with that private key and discards it. On the next boot, shim 
generates a new key pair and hands the new private key to the kernel 
along with the old public key. The kernel verifies the suspend image 
before resuming it. The only way to subvert this would be to be able to 
access kernel memory directly, which means the attacker has already won.
I like this protocol, but after some off-line discussions, I still have 
doubts about it. Namely: how do we make sure that there is noone tampering 
with the variable?

Obvious step towards solving this is making the variable inaccessible 
after ExitBootServices() has been called (by not setting runtime access 
flag on it).

Now how about this scenario:

- consider securely booted win8 (no Linux installed on that machine, so 
  the variable for storing public key doesn't exist yet), possibly being 
  taken over by a malicious user
- he/she creates this secure variable from within the win8 and stores 
  his/her own public key into it
- he/she supplies a signed shim (as provided by some Linux distro vendor), 
  signed kernel (as provided by some Linux distro vendor) and specially 
  crafted resume image, signed by his/her own private key
- he/she reboots the machine in a way that shim+distro kernel+hacker's S4 
  image is used to resume
- distro kernel verifies the signature of the S4 image against the 
  attacker's public key stored in the variable; the signature is OK
- he/she has won, as he has managed to run an arbitrary kernel code 
  (stored in the S4 image) in a trusted mode

No?

Basically, once the machine is already populated with the "secure" version 
of Linux, this can't happen, as we will (as far as I understand) set the 
variable for storing the public key in a way that it can't be accessed 
from runtime environment. But how can we prevent it being *created* before 
the machine is ever touched by Linux?

Thanks,

-- 
Jiri Kosina
SUSE Labs
Message details and related content
On Tue, Nov 06, 2012 at 01:51:15PM +0100, Jiri Kosina wrote:
On Wed, 31 Oct 2012, Matthew Garrett wrote:
quoted
shim generates a public and private key. 
It seems to me that this brings quite a huge delay into the boot process 
both for "regular" and resume cases (as shim has no way to know what is 
going to happen next). Mostly because obtaining enough entropy is 
generally very difficult when we have just shim running, right?
pseudorandom keys should be sufficient here. It's intended to deal with 
the case of an automated attack rather than a deliberate effort to break 
into a given user's system.
quoted
It hands the kernel the private key in a boot parameter and stores the 
public key in a boot variable. On suspend, the kernel signs the suspend 
image with that private key and discards it. On the next boot, shim 
generates a new key pair and hands the new private key to the kernel 
along with the old public key. The kernel verifies the suspend image 
before resuming it. The only way to subvert this would be to be able to 
access kernel memory directly, which means the attacker has already won.
I like this protocol, but after some off-line discussions, I still have 
doubts about it. Namely: how do we make sure that there is noone tampering 
with the variable?
The variable has the same level of security as MOK, so that would be a 
more attractive target.
quoted hunk
- consider securely booted win8 (no Linux installed on that machine, so 
  the variable for storing public key doesn't exist yet), possibly being 
  taken over by a malicious user
- he/she creates this secure variable from within the win8 and stores 
  his/her own public key into it
You can't create a non-RT variable from the OS.
quoted hunk
- he/she supplies a signed shim (as provided by some Linux distro vendor), 
  signed kernel (as provided by some Linux distro vendor) and specially 
  crafted resume image, signed by his/her own private key
shim detects that the key has the RT bit set and deletes it.
- he/she reboots the machine in a way that shim+distro kernel+hacker's S4 
  image is used to resume
And so this step can't happen.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

[PATCH RFC v2 4/4] firmware: Install firmware signature files automatically

Message details and related content
... when CONFIG_FIRMWARE_SIG is set.

Signed-off-by: Takashi Iwai <redacted>
---
 Makefile                |  6 ++++++
 scripts/Makefile.fwinst | 18 ++++++++++++++++--
 2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index a1ccf22..c6d7a3e 100644
--- a/Makefile
+++ b/Makefile
@@ -729,6 +729,12 @@ mod_sign_cmd = true
 endif
 export mod_sign_cmd
 
+ifeq ($(CONFIG_FIRMWARE_SIG),y)
+fw_sign_cmd = perl $(srctree)/scripts/sign-file -f $(MODSECKEY) $(MODPUBKEY)
+else
+fw_sign_cmd = true
+endif
+export fw_sign_cmd
 
 ifeq ($(KBUILD_EXTMOD),)
 core-y		+= kernel/ mm/ fs/ ipc/ security/ crypto/ block/
diff --git a/scripts/Makefile.fwinst b/scripts/Makefile.fwinst
index 4d908d1..df256f0 100644
--- a/scripts/Makefile.fwinst
+++ b/scripts/Makefile.fwinst
@@ -29,6 +29,20 @@ installed-mod-fw := $(addprefix $(INSTALL_FW_PATH)/,$(mod-fw))
 installed-fw := $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-all))
 installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/./
 
+ifeq ($(CONFIG_FIRMWARE_SIG),y)
+installed-fw-sig := $(patsubst %,%.sig, $(installed-fw))
+installed-mod-fw-sig := $(patsubst %,%.sig, $(installed-mod-fw))
+else
+installed-fw-sig :=
+installed-mod-fw-sig :=
+endif
+
+quiet_cmd_fwsig = FWSIG $@
+      cmd_fwsig = $(fw_sign_cmd) $(patsubst %.sig,%,$@) $@
+
+%.sig: %
+	$(call cmd,fwsig)
+
 # Workaround for make < 3.81, where .SECONDEXPANSION doesn't work.
 PHONY += $(INSTALL_FW_PATH)/$$(%) install-all-dirs
 $(INSTALL_FW_PATH)/$$(%): install-all-dirs
@@ -49,9 +63,9 @@ PHONY +=  __fw_install __fw_modinst FORCE
 
 .PHONY: $(PHONY)
 
-__fw_install: $(installed-fw)
+__fw_install: $(installed-fw) $(installed-fw-sig)
 
-__fw_modinst: $(installed-mod-fw)
+__fw_modinst: $(installed-mod-fw) $(installed-mod-fw-sig)
 	@:
 
 __fw_modbuild: $(addprefix $(obj)/,$(mod-fw))
-- 
1.8.0

[PATCH RFC v2 2/4] firmware: Add -a option to scripts/sign-file

Message details and related content
Add a new option -a to sign-file for specifying the hash algorithm
to sign a file, to make it working without .config file.
This will be useful signing external module or firmware files.

Signed-off-by: Takashi Iwai <redacted>
---
 scripts/sign-file | 40 ++++++++++++++++++++++++++++------------
 1 file changed, 28 insertions(+), 12 deletions(-)
diff --git a/scripts/sign-file b/scripts/sign-file
index 5b9d44d..581cdcd 100755
--- a/scripts/sign-file
+++ b/scripts/sign-file
@@ -4,7 +4,7 @@
 #
 # Format:
 #
-#	./scripts/sign-file [-v] [-f] <key> <x509> <module> [<dest>]
+#	./scripts/sign-file [-v] [-f] [-a algo] <key> <x509> <module> [<dest>]
 #
 #
 use strict;
@@ -17,16 +17,19 @@ sub usage()
     print "Format: ./scripts/sign-file [options] <key> <x509> <module> [<dest>]
     -v       verbose output
     -f       create a firmware signature file
+    -a algo  specify hash algorithm
 ";
     exit;
 }
 
 my $verbose = 0;
+my $hashalgo = "";
 my $sign_fw = 0;
 
 GetOptions(
     'v|verbose' => \$verbose,
-    'f|firmware' => \$sign_fw) || usage();
+    'f|firmware' => \$sign_fw,
+    'a|algo=s' => \$hashalgo) || usage();
 usage() if ($#ARGV != 2 && $#ARGV != 3);
 
 my $private_key = $ARGV[0];
@@ -42,10 +45,7 @@ die "Can't read $mode_name\n" unless (-r $module);
 #
 # Read the kernel configuration
 #
-my %config = (
-    CONFIG_MODULE_SIG_SHA512 => 1
-    );
-
+my %config;
 if (-r ".config") {
     open(FD, "<.config") || die ".config";
     while (<FD>) {
@@ -56,6 +56,22 @@ if (-r ".config") {
     close(FD);
 }
 
+if ($hashalgo eq "") {
+    if (exists $config{"CONFIG_MODULE_SIG_SHA1"}) {
+	$hashalgo="sha1";
+    } elsif (exists $config{"CONFIG_MODULE_SIG_SHA224"}) {
+	$hashalgo="sha224";
+    } elsif (exists $config{"CONFIG_MODULE_SIG_SHA256"}) {
+	$hashalgo="sha256";
+    } elsif (exists $config{"CONFIG_MODULE_SIG_SHA384"}) {
+	$hashalgo="sha384";
+    } elsif (exists $config{"CONFIG_MODULE_SIG_SHA512"}) {
+	$hashalgo="sha512";
+    } else {
+	die "Can't determine hash algorithm";
+    }
+}
+
 #
 # Function to read the contents of a file into a variable.
 #
@@ -332,35 +348,35 @@ my $id_type = 1;	# Identifier type: X.509
 # Digest the data
 #
 my ($dgst, $prologue) = ();
-if (exists $config{"CONFIG_MODULE_SIG_SHA1"}) {
+if ($hashalgo eq "sha1") {
     $prologue = pack("C*",
 		     0x30, 0x21, 0x30, 0x09, 0x06, 0x05,
 		     0x2B, 0x0E, 0x03, 0x02, 0x1A,
 		     0x05, 0x00, 0x04, 0x14);
     $dgst = "-sha1";
     $hash = 2;
-} elsif (exists $config{"CONFIG_MODULE_SIG_SHA224"}) {
+} elsif ($hashalgo eq "sha224") {
     $prologue = pack("C*",
 		     0x30, 0x2d, 0x30, 0x0d, 0x06, 0x09,
 		     0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x04,
 		     0x05, 0x00, 0x04, 0x1C);
     $dgst = "-sha224";
     $hash = 7;
-} elsif (exists $config{"CONFIG_MODULE_SIG_SHA256"}) {
+} elsif ($hashalgo eq "sha256") {
     $prologue = pack("C*",
 		     0x30, 0x31, 0x30, 0x0d, 0x06, 0x09,
 		     0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01,
 		     0x05, 0x00, 0x04, 0x20);
     $dgst = "-sha256";
     $hash = 4;
-} elsif (exists $config{"CONFIG_MODULE_SIG_SHA384"}) {
+} elsif ($hashalgo eq "sha384") {
     $prologue = pack("C*",
 		     0x30, 0x41, 0x30, 0x0d, 0x06, 0x09,
 		     0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02,
 		     0x05, 0x00, 0x04, 0x30);
     $dgst = "-sha384";
     $hash = 5;
-} elsif (exists $config{"CONFIG_MODULE_SIG_SHA512"}) {
+} elsif ($hashalgo eq "sha512") {
     $prologue = pack("C*",
 		     0x30, 0x51, 0x30, 0x0d, 0x06, 0x09,
 		     0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03,
@@ -368,7 +384,7 @@ if (exists $config{"CONFIG_MODULE_SIG_SHA1"}) {
     $dgst = "-sha512";
     $hash = 6;
 } else {
-    die "Can't determine hash algorithm";
+    die "Invalid hash algorithm $hashalgo";
 }
 
 #
-- 
1.8.0

[PATCH RFC v2 1/4] firmware: Add the firmware signing support to scripts/sign-file

Message details and related content
Add -f option to sign-file script for generating a firmware signature
file.

A firmware signature file contains a pretty similar structure like a
signed module but in a different order (because it's a separate file
while the module signature is embedded at the tail of unsigned module
contents).  The file consists of
 - the magic string
 - the signature information, which is identical with the module
   signature
 - signer's name
 - key id
 - signature bytes

Signed-off-by: Takashi Iwai <redacted>
---
 scripts/sign-file | 48 +++++++++++++++++++++++++++++++++++-------------
 1 file changed, 35 insertions(+), 13 deletions(-)
diff --git a/scripts/sign-file b/scripts/sign-file
index 87ca59d..5b9d44d 100755
--- a/scripts/sign-file
+++ b/scripts/sign-file
@@ -4,30 +4,40 @@
 #
 # Format:
 #
-#	./scripts/sign-file [-v] <key> <x509> <module> [<dest>]
+#	./scripts/sign-file [-v] [-f] <key> <x509> <module> [<dest>]
 #
 #
 use strict;
 use FileHandle;
 use IPC::Open2;
+use Getopt::Long;
 
-my $verbose = 0;
-if ($#ARGV >= 0 && $ARGV[0] eq "-v") {
-    $verbose = 1;
-    shift;
+sub usage()
+{
+    print "Format: ./scripts/sign-file [options] <key> <x509> <module> [<dest>]
+    -v       verbose output
+    -f       create a firmware signature file
+";
+    exit;
 }
 
-die "Format: ./scripts/sign-file [-v] <key> <x509> <module> [<dest>]\n"
-    if ($#ARGV != 2 && $#ARGV != 3);
+my $verbose = 0;
+my $sign_fw = 0;
+
+GetOptions(
+    'v|verbose' => \$verbose,
+    'f|firmware' => \$sign_fw) || usage();
+usage() if ($#ARGV != 2 && $#ARGV != 3);
 
 my $private_key = $ARGV[0];
 my $x509 = $ARGV[1];
 my $module = $ARGV[2];
-my $dest = ($#ARGV == 3) ? $ARGV[3] : $ARGV[2] . "~";
+my $dest = $ARGV[3] ? $ARGV[3] : $ARGV[2] . ($sign_fw ? ".sig" : "~");
+my $mode_name = $sign_fw ? "firmware" : "module";
 
 die "Can't read private key\n" unless (-r $private_key);
 die "Can't read X.509 certificate\n" unless (-r $x509);
-die "Can't read module\n" unless (-r $module);
+die "Can't read $mode_name\n" unless (-r $module);
 
 #
 # Read the kernel configuration
@@ -393,7 +403,9 @@ die "openssl rsautl died: $?" if ($? >> 8);
 #
 my $unsigned_module = read_file($module);
 
-my $magic_number = "~Module signature appended~\n";
+my $magic_number = $sign_fw ?
+    "~Linux firmware signature~\n" :
+    "~Module signature appended~\n";
 
 my $info = pack("CCCCCxxxN",
 		$algo, $hash, $id_type,
@@ -402,7 +414,7 @@ my $info = pack("CCCCCxxxN",
 		length($signature));
 
 if ($verbose) {
-    print "Size of unsigned module: ", length($unsigned_module), "\n";
+    print "Size of unsigned $mode_name: ", length($unsigned_module), "\n";
     print "Size of signer's name  : ", length($signers_name), "\n";
     print "Size of key identifier : ", length($key_identifier), "\n";
     print "Size of signature      : ", length($signature), "\n";
@@ -414,7 +426,16 @@ if ($verbose) {
 
 open(FD, ">$dest") || die $dest;
 binmode FD;
-print FD
+if ($sign_fw) {
+    print FD
+    $magic_number,
+    $info,
+    $signers_name,
+    $key_identifier,
+    $signature
+    ;
+} else {
+    print FD
     $unsigned_module,
     $signers_name,
     $key_identifier,
@@ -422,8 +443,9 @@ print FD
     $info,
     $magic_number
     ;
+}
 close FD || die $dest;
 
-if ($#ARGV != 3) {
+if (!$sign_fw && $#ARGV != 3) {
     rename($dest, $module) || die $module;
 }
-- 
1.8.0

[PATCH RFC v2 0/4] Add firmware signature file check

Revisions (2)
  1. rfc
  2. v2 current [diff against previous]
Message details and related content
Hi,

this is the revised patches I sent in this week for adding the
firmware signing support.  No big changes in the code but a bit of
clean ups and more descriptions in changelog and comments now.

At this point, it still needs to have a proper Kconfig help text, and
move the stuff of CONFIG_MODULE_SIG to be indepdent from CONFIG_MODULE
so that the code required for signature checks can be built for the
firmware loader even without module.

But, before doing that, I'd like to hear whether this approach is
really a way to go, or better to throw away and scratch.

Any suggests / comments appreciated.


thanks,

Takashi

[PATCH RFC v2 3/4] firmware: Add support for signature checks

Message details and related content
Add a feature to check the firmware signature, specified via Kconfig
CONFIG_FIRMWARE_SIG.

The signature check is performed only for the direct fw loading
without udev.  If sig_enforce is set but no firmware file is found in
fs, request_firmware*() returns an error for now.  It would be
possible to improve this situation, e.g. by adding an extra request of
signature via yet another uevent, but I'm too lazy to implement it and
also skeptical whether it's needed.

On a kernel with CONFIG_FIRMWARE_SIG=y and sig_enforce=1 set, when no
firmware signature is present or the signature doesn't match, the
kernel rejects such a firmware and proceeds to the next possible one.
With sig_enforce=0, a firmware is loaded even if no signature is found
or the signature doesn't match, but it taints the kernel with
TAINT_USER.  This behavior is similar like the signed module loading.

Last to be noted, in this version, the firmware signature support
depends on CONFIG_MODULE_SIG, that is, the system requires the module
support for now.

Signed-off-by: Takashi Iwai <redacted>
---
 drivers/base/Kconfig          |  6 ++++
 drivers/base/firmware_class.c | 78 +++++++++++++++++++++++++++++++++++++++----
 include/linux/firmware.h      |  7 ++++
 kernel/module_signing.c       | 63 ++++++++++++++++++++++++++++++++++
 4 files changed, 147 insertions(+), 7 deletions(-)
diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
index b34b5cd..3696fd7 100644
--- a/drivers/base/Kconfig
+++ b/drivers/base/Kconfig
@@ -145,6 +145,12 @@ config EXTRA_FIRMWARE_DIR
 	  this option you can point it elsewhere, such as /lib/firmware/ or
 	  some other directory containing the firmware files.
 
+config FIRMWARE_SIG
+	bool "Firmware signature verification"
+	depends on FW_LOADER && MODULE_SIG
+	help
+	  Enable firmware signature check.
+
 config DEBUG_DRIVER
 	bool "Driver Core verbose debug messages"
 	depends on DEBUG_KERNEL
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 8945f4e..501cff4 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -36,6 +36,11 @@ MODULE_AUTHOR("Manuel Estrada Sainz");
 MODULE_DESCRIPTION("Multi purpose firmware loading support");
 MODULE_LICENSE("GPL");
 
+#ifdef CONFIG_FIRMWARE_SIG
+static bool sig_enforce;
+module_param(sig_enforce, bool, 0644);
+#endif
+
 /* Builtin firmware support */
 
 #ifdef CONFIG_FW_LOADER
@@ -287,7 +292,7 @@ static noinline long fw_file_size(struct file *file)
 	return st.size;
 }
 
-static bool fw_read_file_contents(struct file *file, struct firmware_buf *fw_buf)
+static bool fw_read_file_contents(struct file *file, void **bufp, size_t *sizep)
 {
 	long size;
 	char *buf;
@@ -302,14 +307,42 @@ static bool fw_read_file_contents(struct file *file, struct firmware_buf *fw_buf
 		vfree(buf);
 		return false;
 	}
-	fw_buf->data = buf;
-	fw_buf->size = size;
+	*bufp = buf;
+	*sizep = size;
 	return true;
 }
 
+#ifdef CONFIG_FIRMWARE_SIG
+static int verify_sig_file(struct firmware_buf *buf, const char *path)
+{
+	const unsigned long markerlen = sizeof(FIRMWARE_SIG_STRING) - 1;
+	struct file *file;
+	void *sig_data;
+	size_t sig_size;
+	int ret;
+
+	file = filp_open(path, O_RDONLY, 0);
+	if (IS_ERR(file))
+		return -ENOKEY;
+
+	ret = fw_read_file_contents(file, &sig_data, &sig_size);
+	fput(file);
+	if (!ret)
+		return -ENOKEY;
+	if (sig_size <= markerlen ||
+	    memcmp(sig_data, FIRMWARE_SIG_STRING, markerlen))
+		return -EBADMSG;
+	ret = fw_verify_sig(buf->data, buf->size,
+			    sig_data + markerlen, sig_size - markerlen);
+	pr_debug("verified signature %s: %d\n", path, ret);
+	vfree(sig_data);
+	return ret;
+}
+#endif /* CONFIG_FIRMWARE_SIG */
+
 static bool fw_get_filesystem_firmware(struct firmware_buf *buf)
 {
-	int i;
+	int i, ret;
 	bool success = false;
 	char *path = __getname();
 
@@ -320,10 +353,30 @@ static bool fw_get_filesystem_firmware(struct firmware_buf *buf)
 		file = filp_open(path, O_RDONLY, 0);
 		if (IS_ERR(file))
 			continue;
-		success = fw_read_file_contents(file, buf);
+		success = fw_read_file_contents(file, &buf->data, &buf->size);
 		fput(file);
-		if (success)
-			break;
+		if (!success)
+			continue;
+#ifdef CONFIG_FIRMWARE_SIG
+		snprintf(path, PATH_MAX, "%s/%s.sig", fw_path[i], buf->fw_id);
+		ret = verify_sig_file(buf, path);
+		if (ret < 0) {
+			if (ret == -ENOENT)
+				pr_err("Cannot find firmware signature %s\n",
+				       path);
+			else
+				pr_err("Invalid firmware signature %s\n", path);
+			if (sig_enforce) {
+				vfree(buf->data);
+				buf->data = NULL;
+				buf->size = 0;
+				success = false;
+				continue;
+			}
+			add_taint(TAINT_USER);
+		}
+#endif /* CONFIG_FIRMWARE_SIG */
+		break;
 	}
 	__putname(path);
 	return success;
@@ -864,6 +917,17 @@ static int _request_firmware_load(struct firmware_priv *fw_priv, bool uevent,
 		goto handle_fw;
 	}
 
+#ifdef CONFIG_FIRMWARE_SIG
+	/* FIXME: we don't handle signature check for fw loaded via udev */
+	if (sig_enforce) {
+		pr_err("Cannot find firmware file %s; aborting fw loading\n",
+		       buf->fw_id);
+		fw_load_abort(fw_priv);
+		direct_load = 1;
+		goto handle_fw;
+	}
+#endif
+
 	/* fall back on userspace loading */
 	buf->fmt = PAGE_BUF;
 
diff --git a/include/linux/firmware.h b/include/linux/firmware.h
index e4279fe..2e9e457 100644
--- a/include/linux/firmware.h
+++ b/include/linux/firmware.h
@@ -79,4 +79,11 @@ static inline int uncache_firmware(const char *name)
 }
 #endif
 
+#ifdef CONFIG_FIRMWARE_SIG
+#define FIRMWARE_SIG_STRING "~Linux firmware signature~\n"
+/* defined in kernel/module_signing.c */
+int fw_verify_sig(const void *fw_data, size_t fw_size,
+		  const void *sig_data, size_t sig_size);
+#endif
+
 #endif
diff --git a/kernel/module_signing.c b/kernel/module_signing.c
index ea1b1df..7994452 100644
--- a/kernel/module_signing.c
+++ b/kernel/module_signing.c
@@ -11,6 +11,7 @@
 
 #include <linux/kernel.h>
 #include <linux/err.h>
+#include <linux/export.h>
 #include <crypto/public_key.h>
 #include <crypto/hash.h>
 #include <keys/asymmetric-type.h>
@@ -247,3 +248,65 @@ error_put_key:
 	pr_devel("<==%s() = %d\n", __func__, ret);
 	return ret;	
 }
+
+#ifdef CONFIG_FIRMWARE_SIG
+/*
+ * Verify the firmware signature, similar like module signature check
+ * but it's stored in a separate file
+ */
+int fw_verify_sig(const void *fw_data, size_t fw_size,
+		  const void *sig_data, size_t sig_size)
+{
+	struct public_key_signature *pks;
+	struct module_signature ms;
+	struct key *key;
+	size_t sig_len;
+	int ret;
+
+	if (sig_size <= sizeof(ms))
+		return -EBADMSG;
+
+	memcpy(&ms, sig_data, sizeof(ms));
+	sig_data += sizeof(ms);
+	sig_size -= sizeof(ms);
+
+	sig_len = be32_to_cpu(ms.sig_len);
+	if (sig_size < sig_len + (size_t)ms.signer_len + ms.key_id_len)
+		return -EBADMSG;
+
+	/* For the moment, only support RSA and X.509 identifiers */
+	if (ms.algo != PKEY_ALGO_RSA ||
+	    ms.id_type != PKEY_ID_X509)
+		return -ENOPKG;
+
+	if (ms.hash >= PKEY_HASH__LAST ||
+	    !pkey_hash_algo[ms.hash])
+		return -ENOPKG;
+
+	key = request_asymmetric_key(sig_data, ms.signer_len,
+				     sig_data + ms.signer_len, ms.key_id_len);
+	if (IS_ERR(key))
+		return PTR_ERR(key);
+
+	pks = mod_make_digest(ms.hash, fw_data, fw_size);
+	if (IS_ERR(pks)) {
+		ret = PTR_ERR(pks);
+		goto error_put_key;
+	}
+
+	sig_data += ms.signer_len + ms.key_id_len;
+	ret = mod_extract_mpi_array(pks, sig_data, sig_len);
+	if (ret < 0)
+		goto error_free_pks;
+
+	ret = verify_signature(key, pks);
+
+error_free_pks:
+	mpi_free(pks->rsa.s);
+	kfree(pks);
+error_put_key:
+	key_put(key);
+	return ret;
+}
+EXPORT_SYMBOL_GPL(fw_verify_sig);
+#endif /* CONFIG_FIRMWARE_SIG */
-- 
1.8.0

Re: [PATCH RFC v2 2/4] firmware: Add -a option to scripts/sign-file

Message details and related content
於 四,2012-11-08 於 18:35 +0100,Takashi Iwai 提到:
Add a new option -a to sign-file for specifying the hash algorithm
to sign a file, to make it working without .config file.
This will be useful signing external module or firmware files.

Signed-off-by: Takashi Iwai <redacted>
Tested-by: Chun-Yi Lee<jlee@suse.com>

Joey Lee
quoted hunk
---
 scripts/sign-file | 40 ++++++++++++++++++++++++++++------------
 1 file changed, 28 insertions(+), 12 deletions(-)
diff --git a/scripts/sign-file b/scripts/sign-file
index 5b9d44d..581cdcd 100755
--- a/scripts/sign-file
+++ b/scripts/sign-file
@@ -4,7 +4,7 @@
 #
 # Format:
 #
-#	./scripts/sign-file [-v] [-f] <key> <x509> <module> [<dest>]
+#	./scripts/sign-file [-v] [-f] [-a algo] <key> <x509> <module> [<dest>]
 #
 #
 use strict;
@@ -17,16 +17,19 @@ sub usage()
     print "Format: ./scripts/sign-file [options] <key> <x509> <module> [<dest>]
     -v       verbose output
     -f       create a firmware signature file
+    -a algo  specify hash algorithm
 ";
     exit;
 }
 
 my $verbose = 0;
+my $hashalgo = "";
 my $sign_fw = 0;
 
 GetOptions(
     'v|verbose' => \$verbose,
-    'f|firmware' => \$sign_fw) || usage();
+    'f|firmware' => \$sign_fw,
+    'a|algo=s' => \$hashalgo) || usage();
 usage() if ($#ARGV != 2 && $#ARGV != 3);
 
 my $private_key = $ARGV[0];
@@ -42,10 +45,7 @@ die "Can't read $mode_name\n" unless (-r $module);
 #

83 more quoted lines

Re: [PATCH RFC v2 1/4] firmware: Add the firmware signing support to scripts/sign-file

Message details and related content
於 四,2012-11-08 於 18:35 +0100,Takashi Iwai 提到:
Add -f option to sign-file script for generating a firmware signature
file.

A firmware signature file contains a pretty similar structure like a
signed module but in a different order (because it's a separate file
while the module signature is embedded at the tail of unsigned module
contents).  The file consists of
 - the magic string
 - the signature information, which is identical with the module
   signature
 - signer's name
 - key id
 - signature bytes

Signed-off-by: Takashi Iwai <redacted>
Tested-by: Chun-Yi Lee <jlee@suse.com>

Joey Lee
quoted hunk
---
 scripts/sign-file | 48 +++++++++++++++++++++++++++++++++++-------------
 1 file changed, 35 insertions(+), 13 deletions(-)
diff --git a/scripts/sign-file b/scripts/sign-file
index 87ca59d..5b9d44d 100755
--- a/scripts/sign-file
+++ b/scripts/sign-file
@@ -4,30 +4,40 @@
 #
 # Format:
 #
-#	./scripts/sign-file [-v] <key> <x509> <module> [<dest>]
+#	./scripts/sign-file [-v] [-f] <key> <x509> <module> [<dest>]
 #
 #
 use strict;
 use FileHandle;
 use IPC::Open2;
+use Getopt::Long;
 
-my $verbose = 0;
-if ($#ARGV >= 0 && $ARGV[0] eq "-v") {
-    $verbose = 1;
-    shift;
+sub usage()
+{
+    print "Format: ./scripts/sign-file [options] <key> <x509> <module> [<dest>]
+    -v       verbose output
+    -f       create a firmware signature file
+";
+    exit;
 }
 
-die "Format: ./scripts/sign-file [-v] <key> <x509> <module> [<dest>]\n"
-    if ($#ARGV != 2 && $#ARGV != 3);
+my $verbose = 0;
+my $sign_fw = 0;
+
+GetOptions(

67 more quoted lines

Re: [PATCH RFC v2 4/4] firmware: Install firmware signature files automatically

Message details and related content
於 四,2012-11-08 於 18:35 +0100,Takashi Iwai 提到:
... when CONFIG_FIRMWARE_SIG is set.

Signed-off-by: Takashi Iwai <redacted>
Tested-by: Chun-Yi Lee <jlee@suse.com>

Joey Lee
quoted hunk
---
 Makefile                |  6 ++++++
 scripts/Makefile.fwinst | 18 ++++++++++++++++--
 2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index a1ccf22..c6d7a3e 100644
--- a/Makefile
+++ b/Makefile
@@ -729,6 +729,12 @@ mod_sign_cmd = true
 endif
 export mod_sign_cmd
 
+ifeq ($(CONFIG_FIRMWARE_SIG),y)
+fw_sign_cmd = perl $(srctree)/scripts/sign-file -f $(MODSECKEY) $(MODPUBKEY)
+else
+fw_sign_cmd = true
+endif
+export fw_sign_cmd
 
 ifeq ($(KBUILD_EXTMOD),)
 core-y		+= kernel/ mm/ fs/ ipc/ security/ crypto/ block/
diff --git a/scripts/Makefile.fwinst b/scripts/Makefile.fwinst
index 4d908d1..df256f0 100644
--- a/scripts/Makefile.fwinst
+++ b/scripts/Makefile.fwinst
@@ -29,6 +29,20 @@ installed-mod-fw := $(addprefix $(INSTALL_FW_PATH)/,$(mod-fw))
 installed-fw := $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-all))
 installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/./
 
+ifeq ($(CONFIG_FIRMWARE_SIG),y)
+installed-fw-sig := $(patsubst %,%.sig, $(installed-fw))
+installed-mod-fw-sig := $(patsubst %,%.sig, $(installed-mod-fw))
+else
+installed-fw-sig :=
+installed-mod-fw-sig :=
+endif
+
+quiet_cmd_fwsig = FWSIG $@
+      cmd_fwsig = $(fw_sign_cmd) $(patsubst %.sig,%,$@) $@

19 more quoted lines

Re: [PATCH RFC v2 3/4] firmware: Add support for signature checks

Message details and related content
於 四,2012-11-08 於 18:35 +0100,Takashi Iwai 提到:
+#ifdef CONFIG_FIRMWARE_SIG
+static int verify_sig_file(struct firmware_buf *buf, const char
*path)
+{
+       const unsigned long markerlen = sizeof(FIRMWARE_SIG_STRING) -
1;
+       struct file *file;
+       void *sig_data;
+       size_t sig_size;
+       int ret;
+
+       file = filp_open(path, O_RDONLY, 0);
+       if (IS_ERR(file))
+               return -ENOKEY;
I think there should return '-ENOENT', otherwise the firmware will show
'Invalid firmware signature' even didn't find the sig file.
quoted hunk
+
+       ret = fw_read_file_contents(file, &sig_data, &sig_size);
+       fput(file); 
Tested-by: Chun-Yi Lee <jlee@suse.com>

Thanks a lot!
Joey Lee

Re: [PATCH RFC v2 3/4] firmware: Add support for signature checks

Message details and related content
At Fri, 23 Nov 2012 14:56:11 +0800,
joeyli wrote:
於 四,2012-11-08 於 18:35 +0100,Takashi Iwai 提到:
quoted
+#ifdef CONFIG_FIRMWARE_SIG
+static int verify_sig_file(struct firmware_buf *buf, const char
*path)
+{
+       const unsigned long markerlen = sizeof(FIRMWARE_SIG_STRING) -
1;
+       struct file *file;
+       void *sig_data;
+       size_t sig_size;
+       int ret;
+
+       file = filp_open(path, O_RDONLY, 0);
+       if (IS_ERR(file))
+               return -ENOKEY;
I think there should return '-ENOENT', otherwise the firmware will show
'Invalid firmware signature' even didn't find the sig file.
Actually this is the intentional behavior.
In the secure boot mode, unsigned firmware should be rejected.

In the normal boot mode, the -ENOKEY error is ignored.  (Whether we
should taint the kernel with such an unsigned firmware is a bit
different question, though.)


thanks,

Takashi

Previous page

Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help