All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Berger <stefanb@linux.ibm.com>
To: Eric Biggers <ebiggers@kernel.org>,
	keyrings@vger.kernel.org, Jarkko Sakkinen <jarkko@kernel.org>,
	David Howells <dhowells@redhat.com>
Cc: linux-crypto@vger.kernel.org, linux-integrity@vger.kernel.org,
	Gilad Ben-Yossef <gilad@benyossef.com>,
	Tianjia Zhang <tianjia.zhang@linux.alibaba.com>,
	Vitaly Chikunov <vt@altlinux.org>,
	Mimi Zohar <zohar@linux.ibm.com>
Subject: Re: [PATCH 0/2] Fix bugs in public_key_verify_signature()
Date: Mon, 31 Jan 2022 21:38:10 -0500	[thread overview]
Message-ID: <26f513aa-abb6-ec9e-d388-b6ce32e36396@linux.ibm.com> (raw)
In-Reply-To: <20220201003414.55380-1-ebiggers@kernel.org>


On 1/31/22 19:34, Eric Biggers wrote:
> This patchset fixes some bugs in public_key_verify_signature() where it
> could be tricked into using the wrong algorithm, as was discussed at
> https://lore.kernel.org/linux-integrity/20211202215507.298415-1-zohar@linux.ibm.com/T/#t
>
> I'd appreciate it if the people who care about each of the supported
> public key algorithms (RSA, ECDSA, ECRDSA, and SM2) would test this
> patchset to make sure it still works for their use case(s).  I've tested
> that X.509 and PKCS#7 with RSA still work.

I have tested that self-ECDSA-signed x.509 certs can still be loaded and 
ECDSA-signed files are still verified by IMA. It works for NIST P256 and 
P384.

Tested-by: Stefan Berger <stefanb@linux.ibm.com>


>
> Note, I have *not* included a fix for SM2 being implemented incorrectly.
> That is another bug that I pointed out in the above thread.  I think
> that bug is for the people who actually care about SM2.
>
> This applies to v5.17-rc2.
>
> Eric Biggers (2):
>    KEYS: asymmetric: enforce that sig algo matches key algo
>    KEYS: asymmetric: properly validate hash_algo and encoding
>
>   crypto/asymmetric_keys/pkcs7_verify.c    |   6 --
>   crypto/asymmetric_keys/public_key.c      | 126 ++++++++++++++++-------
>   crypto/asymmetric_keys/x509_public_key.c |   6 --
>   3 files changed, 91 insertions(+), 47 deletions(-)
>
>
> base-commit: 26291c54e111ff6ba87a164d85d4a4e134b7315c

  parent reply	other threads:[~2022-02-01  2:38 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-01  0:34 [PATCH 0/2] Fix bugs in public_key_verify_signature() Eric Biggers
2022-02-01  0:34 ` [PATCH 1/2] KEYS: asymmetric: enforce that sig algo matches key algo Eric Biggers
2022-02-02  2:52   ` Vitaly Chikunov
2022-02-02  3:10     ` Eric Biggers
2022-02-02  3:22       ` Eric Biggers
2022-02-02  5:20       ` Vitaly Chikunov
2022-02-21  1:43   ` Jarkko Sakkinen
2022-03-04 19:26     ` Eric Biggers
2022-03-05  5:51       ` Jarkko Sakkinen
2022-02-01  0:34 ` [PATCH 2/2] KEYS: asymmetric: properly validate hash_algo and encoding Eric Biggers
2022-02-21  1:46   ` Jarkko Sakkinen
2022-02-21  2:21     ` Eric Biggers
2022-02-21 20:16       ` Jarkko Sakkinen
2022-02-01  2:38 ` Stefan Berger [this message]
2022-02-07  7:45 ` [PATCH 0/2] Fix bugs in public_key_verify_signature() Tianjia Zhang
2022-02-07 11:43 ` [PATCH] KEYS: asymmetric: enforce SM2 signature use pkey algo Tianjia Zhang
2022-02-08  5:35   ` Eric Biggers
2022-02-08  9:45     ` Tianjia Zhang
2022-02-21  1:49   ` Jarkko Sakkinen
2022-02-21  2:43     ` Tianjia Zhang
2022-02-21 20:17       ` Jarkko Sakkinen

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=26f513aa-abb6-ec9e-d388-b6ce32e36396@linux.ibm.com \
    --to=stefanb@linux.ibm.com \
    --cc=dhowells@redhat.com \
    --cc=ebiggers@kernel.org \
    --cc=gilad@benyossef.com \
    --cc=jarkko@kernel.org \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=tianjia.zhang@linux.alibaba.com \
    --cc=vt@altlinux.org \
    --cc=zohar@linux.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.