mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: "Jérémy Jean" <Jeremy.Jean@oss.cyber.gouv.fr>
Cc: dhowells@redhat.com, lukas@wunner.de, ignat@linux.win,
	davem@davemloft.net, keyrings@vger.kernel.org,
	linux-crypto@vger.kernel.org, linux-modules@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pkcs7: Check all signers before waiving authattrs rejection
Date: Wed, 23 Sep 2026 18:46:53 +1000	[thread overview]
Message-ID: <arOR_dQ8QEWbOCDG@gondor.apana.org.au> (raw)
In-Reply-To: <20260822212703.1019792-2-Jeremy.Jean@oss.cyber.gouv.fr>

On Sat, Aug 22, 2026 at 09:27:04PM +0000, Jérémy Jean wrote:
> pkcs7_check_authattrs() only looks at the first SignerInfo when deciding
> whether rejection of authenticated attributes may be waived.  For the
> remaining signers it checks only that authenticated attributes are either
> present on all signers or absent from all of them.
> 
> This means an unmatched ML-DSA signer can be placed first, followed by a
> trusted RSA, ECDSA, or ECRDSA signer.  Verification skips the unmatched
> signature and accepts the later trusted signer.  The first signer still
> leaves the waiver enabled for the whole message, so the non-ML-DSA signer
> can use an exception intended only for ML-DSA.
> 
> Check each SignerInfo's public-key algorithm before leaving the waiver
> enabled.
> 
> Fixes: 91db696adea4 ("pkcs7: Allow authenticatedAttributes for ML-DSA")
> Assisted-by: Codex:gpt-5
> Signed-off-by: Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
> ---
>  crypto/asymmetric_keys/pkcs7_parser.c | 6 ++++++
>  1 file changed, 6 insertions(+)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

      reply	other threads:[~2026-09-23  8:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-22 21:27 Jérémy Jean
2026-09-23  8:46 ` Herbert Xu [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=arOR_dQ8QEWbOCDG@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=Jeremy.Jean@oss.cyber.gouv.fr \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=ignat@linux.win \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=lukas@wunner.de \
    /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

all inboxes | Powered by JetHome®