[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <30308614a1229870d205c33deba193f3d6732bef.camel@kernel.org>
Date: Thu, 17 Oct 2024 19:50:58 +0300
From: Jarkko Sakkinen <jarkko@...nel.org>
To: Eric Snowberg <eric.snowberg@...cle.com>,
linux-security-module@...r.kernel.org
Cc: dhowells@...hat.com, dwmw2@...radead.org, herbert@...dor.apana.org.au,
davem@...emloft.net, ardb@...nel.org, paul@...l-moore.com,
jmorris@...ei.org, serge@...lyn.com, zohar@...ux.ibm.com,
roberto.sassu@...wei.com, dmitry.kasatkin@...il.com, mic@...ikod.net,
casey@...aufler-ca.com, stefanb@...ux.ibm.com, ebiggers@...nel.org,
rdunlap@...radead.org, linux-kernel@...r.kernel.org,
keyrings@...r.kernel.org, linux-crypto@...r.kernel.org,
linux-efi@...r.kernel.org, linux-integrity@...r.kernel.org
Subject: Re: [RFC PATCH v3 03/13] clavis: Introduce a new system keyring
called clavis
On Thu, 2024-10-17 at 09:55 -0600, Eric Snowberg wrote:
> +static struct asymmetric_key_id *clavis_parse_boot_param(char *kid,
> struct asymmetric_key_id *akid,
> + int
> akid_max_len)
> +{
> + int error, hex_len;
> +
> + if (!kid)
> + return 0;
> +
> + hex_len = strlen(kid) / 2;
Hmmm... I'd consider sanity checking this:
size_t len;
/* ... */
len = strlen(kid);
if (len % 2) {
pr_err("Clavis key id has invalid length %lu\n", len);
return 0;
}
hex_len = len / 2;
BR, Jarkko
Powered by blists - more mailing lists