From: Lukas Wunner <lukas@wunner.de>
To: Mikhail Kurinnoi <viewizard@viewizard.com>
Cc: linux-integrity@vger.kernel.org,
Matthias Gerstner <mgerstner@suse.de>,
Mimi Zohar <zohar@linux.vnet.ibm.com>,
linux-crypto@vger.kernel.org
Subject: Re: [PATCH] integrity: prevent deadlock during digsig verification.
Date: Wed, 11 Sep 2024 12:00:18 +0200 [thread overview]
Message-ID: <ZuFqMgSfhIMkoIOH@wunner.de> (raw)
In-Reply-To: <20180627163342.3e1d6333@totoro>
On Wed, Jun 27, 2018 at 04:33:42PM +0300, Mikhail Kurinnoi wrote:
> +int integrity_kernel_module_request(char *kmod_name)
> +{
> + if (strncmp(kmod_name, "crypto-pkcs1pad(rsa,", 20) == 0)
> + return -EINVAL;
> +
> + return 0;
> +}
Just a heads-up: The above was applied as commit 6eb864c1d9dd
("integrity: prevent deadlock during digsig verification.") in 2018.
In 2021 the kernel gained support for ECDSA signatures,
in 2019 for ECRDSA (GOST) signatures.
If kernel modules are signed with ECDSA or ECRDSA, you may once again
see the deadlock addressed by the above-quoted patch and you may need
additional string comparisons to avoid it.
There's a (stalled) effort to support RSA PSS, this may likewise
require yet another string comparison:
https://lore.kernel.org/all/20210420114124.9684-1-varad.gautam@suse.com/
You may have to come up with a solution that doesn't require adding
new string comparisons as this isn't scalable and it's easy to forget
amending the string comparisons when new algorithms or encodings are
added to the crypto subsystem.
Thanks,
Lukas
prev parent reply other threads:[~2024-09-11 10:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-27 13:33 [PATCH] integrity: prevent deadlock during digsig verification Mikhail Kurinnoi
2018-06-28 16:39 ` Matthias Gerstner
2018-06-28 19:14 ` Mimi Zohar
2018-06-28 20:50 ` Mikhail Kurinnoi
2018-06-28 21:27 ` Mimi Zohar
2018-06-28 18:43 ` Mimi Zohar
2024-09-11 10:00 ` Lukas Wunner [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=ZuFqMgSfhIMkoIOH@wunner.de \
--to=lukas@wunner.de \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=mgerstner@suse.de \
--cc=viewizard@viewizard.com \
--cc=zohar@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.