From: Mimi Zohar <zohar@linux.ibm.com>
To: David Howells <dhowells@redhat.com>
Cc: keyrings@vger.kernel.org, linux-integrity@vger.kernel.org,
linux-security-module@vger.kernel.org
Subject: Re: [PATCH] KEYS: revert requiring signature "encoding"
Date: Fri, 09 Nov 2018 09:14:35 -0500 [thread overview]
Message-ID: <1541772875.3990.29.camel@linux.ibm.com> (raw)
In-Reply-To: <27927.1541769383@warthog.procyon.org.uk>
On Fri, 2018-11-09 at 13:16 +0000, David Howells wrote:
> Mimi Zohar <zohar@linux.ibm.com> wrote:
>
> > Attempting to verify IMA signatures fail causing the system to hang.
>
> Can you say why?
On systems with IMA-appraisal enabled with a policy requiring file
signatures, the "good" signature values are stored on the filesystem
as extended attributes (security.ima). Signature verification failure
would normally be limited to just a particular file (eg. executable),
but during boot signature verification failure could result in a
system hang.
Removing existing signature formats breaks existing systems. This
patch adds support for RSA signatures without an explicit "pkcs1" sig-
>encoding.
>
> > Fixes: commit 82f94f24475c ("KEYS: Provide software public key query
> > function [ver #2]")
>
> Btw, no word "commit" after Fixes:.
Ok.
Looking the patch over again, do you prefer the duplicate call or
defining a local variable and using the ternary conditional operator
("?:") like this:
bool rsa = false;
if (!(sig->encoding) && strcmp(pkey->pkey_algo, "rsa") == 0)
rsa = true;
ret = software_key_determine_akcipher(rsa ? "pkcs1" : sig->encoding,
sig->hash_algo,
pkey, alg_name);
Mimi
next prev parent reply other threads:[~2018-11-09 14:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-09 5:59 [PATCH] KEYS: revert requiring signature "encoding" Mimi Zohar
2018-11-09 13:16 ` David Howells
2018-11-09 14:14 ` Mimi Zohar [this message]
2018-11-09 15:05 ` David Howells
2018-11-09 15:06 ` David Howells
2018-11-09 15:28 ` 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=1541772875.3990.29.camel@linux.ibm.com \
--to=zohar@linux.ibm.com \
--cc=dhowells@redhat.com \
--cc=keyrings@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-security-module@vger.kernel.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).