From: Fan Wu <wufan@linux.microsoft.com>
To: luca.boccassi@gmail.com, linux-security-module@vger.kernel.org
Cc: paul@paul-moore.com, serge@hallyn.com
Subject: Re: [PATCH] ipe: fallback to platform keyring also if key in trusted keyring is rejected
Date: Fri, 27 Sep 2024 10:50:35 -0700 [thread overview]
Message-ID: <8d1203e4-c935-4352-9924-1418a56e9f4f@linux.microsoft.com> (raw)
In-Reply-To: <20240927082343.553258-1-luca.boccassi@gmail.com>
On 9/27/2024 1:23 AM, luca.boccassi@gmail.com wrote:
> From: Luca Boccassi <bluca@debian.org>
>
> If enabled, we fallback to the platform keyring if the trusted keyring doesn't have
> the key used to sign the roothash. But if pkcs7_verify() rejects the key for other
> reasons, such as usage restrictions, we do not fallback. Do so, following the same
> change in dm-verity.
>
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> Suggested-by: Serge Hallyn <serge@hallyn.com>
> ---
> The equivalent change in dm-verity was accepted, so apply it to IPE as well:
> https://lore.kernel.org/all/63220688-ac55-e1fc-300d-c93a948801e3@redhat.com/
>
> security/ipe/policy.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/security/ipe/policy.c b/security/ipe/policy.c
> index 45f7d6a0ed23..b628f696e32b 100644
> --- a/security/ipe/policy.c
> +++ b/security/ipe/policy.c
> @@ -178,7 +178,7 @@ struct ipe_policy *ipe_new_policy(const char *text, size_t textlen,
> VERIFYING_UNSPECIFIED_SIGNATURE,
> set_pkcs7_data, new);
> #ifdef CONFIG_IPE_POLICY_SIG_PLATFORM_KEYRING
> - if (rc == -ENOKEY)
> + if (rc == -ENOKEY || rc == -EKEYREJECTED)
> rc = verify_pkcs7_signature(NULL, 0, new->pkcs7, pkcs7len,
> VERIFY_USE_PLATFORM_KEYRING,
> VERIFYING_UNSPECIFIED_SIGNATURE,
Acked-by: Fan Wu <wufan@linux.microsoft.com>
prev parent reply other threads:[~2024-09-27 17:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-27 8:23 [PATCH] ipe: fallback to platform keyring also if key in trusted keyring is rejected luca.boccassi
2024-09-27 17:50 ` Fan Wu [this message]
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=8d1203e4-c935-4352-9924-1418a56e9f4f@linux.microsoft.com \
--to=wufan@linux.microsoft.com \
--cc=linux-security-module@vger.kernel.org \
--cc=luca.boccassi@gmail.com \
--cc=paul@paul-moore.com \
--cc=serge@hallyn.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;
as well as URLs for NNTP newsgroup(s).