[PATCH] wolfSSL: Fix the memory leak of crypto_ec_point_compute_y_sqr()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From 545ff6e7b5fa8c4d82a5cd08a1958c8914f9d71f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E5=86=9B=E6=B6=9B?= <d2014zjt@xxxxxxx>
Date: Tue, 19 Apr 2022 17:31:35 +0800
Subject: [PATCH] wolfSSL: Fix the memory leak of
 crypto_ec_point_compute_y_sqr()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Local variable "t" needs to be cleared whether "calced" is 0 or 1.

Signed-off-by: 赵军涛 <d2014zjt@xxxxxxx>
---
 src/crypto/crypto_wolfssl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/crypto/crypto_wolfssl.c b/src/crypto/crypto_wolfssl.c
index dba4dee82..5dc6ec665 100644
--- a/src/crypto/crypto_wolfssl.c
+++ b/src/crypto/crypto_wolfssl.c
@@ -1676,9 +1676,9 @@ done:
 			mp_clear(y2);
 			os_free(y2);
 		}
-		mp_clear(&t);
 	}
 
+	mp_clear(&t);
 	return (struct crypto_bignum *) y2;
 }
 
-- 
2.30.1.windows.1

Attachment: 0001-wolfSSL-Fix-the-memory-leak-of-crypto_ec_point_compu.patch
Description: Binary data

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap

[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux