[openssl/openssl] d9330f: 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-3.4/[email protected]>
  Branch: refs/heads/openssl-3.4
  Home:   https://github.com/openssl/openssl
  Commit: d9330f19ae047acd74e7ee6a6ee6b87f66375783
      https://github.com/openssl/openssl/commit/d9330f19ae047acd74e7ee6a6ee6b87f66375783
  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)
(cherry picked from commit 317a8867ce00ab2ec7b9652531b3338bbf9cd5ff)



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-3.4/ef2257-d9330f%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.