[openssl/openssl] 8b19d5: rsa_sig: reject short buffers in raw verify_recover

"'Dexter.k' via openssl-commits" <[email protected]>
Newsgroups gmane.comp.encryption.openssl.cvs
Message-ID <openssl/openssl/push/refs/heads/openssl-4.0/[email protected]>
  Branch: refs/heads/openssl-4.0
  Home:   https://github.com/openssl/openssl
  Commit: 8b19d5dfdd438574f74b894afe13ca8e183bdfe2
      https://github.com/openssl/openssl/commit/8b19d5dfdd438574f74b894afe13ca8e183bdfe2
  Author: rootvector2 <[email protected]>
  Date:   2026-06-02 (Tue, 02 Jun 2026)

  Changed paths:
    M providers/implementations/signature/rsa_sig.c

  Log Message:
  -----------
  rsa_sig: reject short buffers in raw verify_recover

The md==NULL path of rsa_verify_recover passed the caller buffer to
RSA_public_decrypt without checking routsize, while the X9.31 and PKCS#1
paths already reject undersized output buffers. RSA_public_decrypt writes
up to RSA_size() bytes, so a short rout overflows. Validate routsize
against RSA_size() before the call.

Fixes: 6f4b7663150e "PROV: add RSA signature implementation"

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Dmitry Belyavskiy <[email protected]>
Reviewed-by: Eugene Syromiatnikov <[email protected]>
Reviewed-by: Paul Yang <[email protected]>
MergeDate: Tue Jun  2 11:55:00 2026
(Merged from https://github.com/openssl/openssl/pull/31340)

(cherry picked from commit 78dd79823215ff37a51d977b47cf0bcb4798cee2)



To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups "openssl-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-commits/openssl/openssl/push/refs/heads/openssl-4.0/2ff4fc-8b19d5%40github.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.