From: David Howells <dhowells@redhat.com>
To: Kyle McMartin <kyle@redhat.com>
Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org,
rusty@rustcorp.com.au, jstancek@redhat.com,
Stephan Mueller <stephan.mueller@atsec.com>
Subject: Re: [PATCH] MODSIGN: only panic in fips mode if sig_enforce is set
Date: Wed, 23 Jan 2013 11:26:15 +0000 [thread overview]
Message-ID: <8615.1358940375@warthog.procyon.org.uk> (raw)
In-Reply-To: <20130122184357.GD6538@redacted.bos.redhat.com>
Kyle McMartin <kyle@redhat.com> wrote:
> Commit 1d0059f3a added a test to check if the system is booted in fips
> mode, and if so, panic the system if an unsigned module is loaded.
> However the wording of the changelog "in signature enforcing mode" leads
> one to assume that sig_enforce should be set for the panic to occur and
> that these two tests are transposed.
>
> Move the test for -ENOKEY && !sig_enforce before the test of fips_mode,
> so that err will be 0, and the panic will not trigger unless we've
> explicitly disabled unsigned modules with sig_enforce set, so that
> systemtap and 3rd party modules will work in fips mode. (This also
> matches the behaviour by Red Hat Enterprise Linux 6.)
>
> Things which need to deny module loading such as secure boot already set
> sig_enforce, so there's no issue here.
>
> Reported-by: Jan Stancek <jstancek@redhat.com>
> Signed-off-by: Kyle McMartin <kyle@redhat.com>
Fine by me, but adding Stephan Mueller for his input.
David
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -2460,11 +2460,11 @@ static int module_sig_check(struct load_info *info)
> }
>
> /* Not having a signature is only an error if we're strict. */
> + if (err == -ENOKEY && !sig_enforce)
> + err = 0;
> if (err < 0 && fips_enabled)
> panic("Module verification failed with error %d in FIPS mode\n",
> err);
> - if (err == -ENOKEY && !sig_enforce)
> - err = 0;
>
> return err;
> }
next prev parent reply other threads:[~2013-01-23 11:26 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-22 18:43 Kyle McMartin
2013-01-22 23:17 ` Rusty Russell
2013-01-23 11:26 ` David Howells [this message]
2013-01-23 15:18 ` Stephan Mueller
2013-01-24 14:59 ` Kyle McMartin
2013-01-25 11:28 ` Stephan Mueller
2013-01-24 19:06 ` [PATCH] MODSIGN: flag modules that use cryptoapi and only panic if those are unsigned Kyle McMartin
2013-01-24 19:21 ` Kyle McMartin
2013-01-24 23:36 ` Rusty Russell
2013-01-25 5:45 ` Kyle McMartin
2013-01-25 12:42 ` Stephan Mueller
2013-02-03 23:34 ` Rusty Russell
2013-01-25 12:46 ` Stephan Mueller
2013-01-25 12:18 ` Stephan Mueller
2013-02-05 22:58 ` [RFC PATCH] fips: check whether a module registering an alg or template is signed Kyle McMartin
2013-02-06 8:02 ` Stephan Mueller
2013-02-06 16:15 ` Kyle McMartin
2013-02-06 17:45 ` Stephan Mueller
2013-02-06 18:18 ` Kyle McMartin
2013-01-25 0:14 ` [PATCH] MODSIGN: flag modules that use cryptoapi and only panic if those are unsigned David Howells
2013-01-25 3:20 ` Matthew Garrett
2013-01-25 12:23 ` Stephan Mueller
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=8615.1358940375@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=jstancek@redhat.com \
--cc=kyle@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=stephan.mueller@atsec.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
Powered by JetHome