1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
Description: Resolve issue with openssl 3.5.3 encrypt #1956
Set output buffer size prior to encrypt operation
When calling EVP_PKEY_encrypt with a non-null output buffer,
the output buffer length must be provided. Attempts to write
beyond this length will fail.
Author: Michael Lowman (GitHub)
Forwarded: yes
Index: iperf3-3.19.1/src/iperf_auth.c
===================================================================
--- iperf3-3.19.1.orig/src/iperf_auth.c 2025-07-25 21:50:36.000000000 +0200
+++ iperf3-3.19.1/src/iperf_auth.c 2025-11-09 09:28:11.404817901 +0100
@@ -252,6 +252,7 @@
#endif
rsa_buffer = OPENSSL_malloc(keysize * 2);
*encryptedtext = (unsigned char*)OPENSSL_malloc(keysize);
+ encryptedtext_len = keysize;
BIO *bioBuff = BIO_new_mem_buf((void*)plaintext, (int)strlen(plaintext));
rsa_buffer_len = BIO_read(bioBuff, rsa_buffer, keysize * 2);
|