]> git.ipfire.org Git - thirdparty/gnutls.git/commit
lib/auth/rsa: check that ciphertext matches the modulus size
authorAlexander Sosedkin <asosedkin@redhat.com>
Mon, 30 Mar 2026 15:31:07 +0000 (17:31 +0200)
committerAlexander Sosedkin <asosedkin@redhat.com>
Wed, 29 Apr 2026 13:35:03 +0000 (15:35 +0200)
commit77228f2d1ac207d2f894e5a168fbb47e5378e42f
treeb42e2038df13bb99a02298effabb5bff396ebe97
parent6cdea5d6833206969d916ee35186c4c5f3e01091
lib/auth/rsa: check that ciphertext matches the modulus size

A client sending extremely short premaster secret as part of an
RSA key exchange could've theoretically triggered a short heap overread
to nowhere when the RSA key was backed with a PKCS#11 token.
With this fix, the internal decryption function will not be called
with an mismatching plaintext length specified, avoiding the overread.

Reported-by: Joshua Rogers of AISLE Research Team <joshua@joshua.hu>
Fixes: #1814
Fixes: CVE-2026-5260
Fixes: GNUTLS-SA-2026-04-29-10
CVSS: 5.9 Medium CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Signed-off-by: Alexander Sosedkin <asosedkin@redhat.com>
lib/auth/rsa.c
lib/auth/rsa_psk.c