From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,zohar@us.ibm.com,nicstange@gmail.com,
karthik@pereq.eu,herbert@gondor.apana.org.au,ebiggers@kernel.org,
dmitry.kasatkin@gmail.com,clement@cryspen.com,dan@pereq.eu,
akpm@linux-foundation.org
Subject: + lib-digsig-reject-garbage-bytes-after-the-signature.patch added to mm-nonmm-unstable branch
Date: Thu, 03 Dec 2026 11:37:14 -0800 [thread overview]
Message-ID: <20261203193715.235071F000CE@smtp.kernel.org> (raw)
In-Reply-To: <20261202-digsig_send-v1-3-2797f094dac3@pereq.eu>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2663 bytes --]
The patch titled
Subject: lib/digsig: reject garbage bytes after the signature
has been added to the -mm mm-nonmm-unstable branch. Its filename is
lib-digsig-reject-garbage-bytes-after-the-signature.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/lib-digsig-reject-garbage-bytes-after-the-signature.patch
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Dan Carpenter <dan@pereq.eu>
Subject: lib/digsig: reject garbage bytes after the signature
Date: Wed, 02 Dec 2026 15:20:30 +0300
The digsig_verify_rsa() function accepts signatures with garbage after the
end. Reject signatures that aren't the correct length.
evmctl writes the header, the bit count and the RSA output and nothing
else, so no one is affected by this in real life. It's just a correctness
issue.
Link: https://patch.msgid.link/20261202-digsig_send-v1-3-2797f094dac3@pereq.eu
Fixes: 051dbb918c7f ("crypto: digital signature verification support")
Signed-off-by: Dan Carpenter <dan@pereq.eu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Eric Biggers <ebiggers@kernel.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Nicolai Stange <nicstange@gmail.com>
Cc: Mimi Zohar <zohar@us.ibm.com>
Cc: Karthik Bhargavan <karthik@pereq.eu>
Cc: Clément Blaudeau <clement@cryspen.com>
Cc: Dmitry Kasatkin <dmitry.kasatkin@gmail.com>
lib/digsig.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/lib/digsig.c~lib-digsig-reject-garbage-bytes-after-the-signature
+++ a/lib/digsig.c
@@ -135,6 +135,11 @@ static int digsig_verify_rsa(struct key
goto err;
}
+ if (nret != siglen) {
+ err = -EINVAL;
+ goto err;
+ }
+
if (mpi_cmp(in, pkey[0]) >= 0) {
err = -EINVAL;
goto err;
_
Patches currently in -mm which might be from dan@pereq.eu are
lib-digsig-fix-error-pointer-dereference-in-digsig_verify_rsa.patch
lib-digsig-reject-a-signature-larger-than-the-modulus.patch
lib-digsig-reject-garbage-bytes-after-the-signature.patch
next prev parent reply other threads:[~2026-12-03 19:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 12:20 [PATCH 0/3] lib/digsig: fix some bugs in digsig Dan Carpenter
2026-12-02 12:20 ` [PATCH 1/3] lib/digsig: Fix error pointer dereference in digsig_verify_rsa() Dan Carpenter
2026-12-03 19:37 ` + lib-digsig-fix-error-pointer-dereference-in-digsig_verify_rsa.patch added to mm-nonmm-unstable branch Andrew Morton
2026-12-02 12:20 ` [PATCH 2/3] lib/digsig: Reject a signature larger than the modulus Dan Carpenter
2026-12-03 19:37 ` + lib-digsig-reject-a-signature-larger-than-the-modulus.patch added to mm-nonmm-unstable branch Andrew Morton
2026-12-02 12:20 ` [PATCH 3/3] lib/digsig: Reject garbage bytes after the signature Dan Carpenter
2026-12-03 19:37 ` Andrew Morton [this message]
2026-12-02 20:57 ` [PATCH 0/3] lib/digsig: fix some bugs in digsig Andrew Morton
2026-12-03 6:18 ` Dan Carpenter
2026-12-03 6:44 ` Eric Biggers
2026-12-03 12:09 ` Mimi Zohar
2026-12-03 13:49 ` Dmitry Kasatkin
2026-12-03 18:45 ` Eric Biggers
2026-12-03 19:36 ` Andrew Morton
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=20261203193715.235071F000CE@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=clement@cryspen.com \
--cc=dan@pereq.eu \
--cc=dmitry.kasatkin@gmail.com \
--cc=ebiggers@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=karthik@pereq.eu \
--cc=mm-commits@vger.kernel.org \
--cc=nicstange@gmail.com \
--cc=zohar@us.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.