[PATCH 0/3] lib/digsig: fix some bugs in digsig

From: Dan Carpenter

Date: Wed Dec 02 2026 - 07:20:48 EST


Pereq is doing formal verification work. These are some bugs we found.

* Dereferencing an error pointer on the error path
* Not implementing the RFC correctly
* Allowing garbage bytes after a signature

Fixing the last two bugs is just about correctness and they don't
actually affect real life.

Signed-off-by: Dan Carpenter <dan@xxxxxxxx>
---
Dan Carpenter (3):
lib/digsig: Fix error pointer dereference in digsig_verify_rsa()
lib/digsig: Reject a signature larger than the modulus
lib/digsig: Reject garbage bytes after the signature

lib/digsig.c | 11 +++++++++++
1 file changed, 11 insertions(+)
---
base-commit: a9c48428cbd8d96b26f92631d0db6f8519c5fcc5
change-id: 20261202-digsig_send-1d579b20c1d2

Best regards,
--
Dan Carpenter <dan@xxxxxxxx>