1 Star 0 Fork 12

wkh/dsoftbus

forked from src-openEuler/dsoftbus 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
third-party-mbedtls-0002-fix-CVE-2021-45451.patch 984 Bytes
一键复制 编辑 原始数据 按行查看 历史
beiling.xie 提交于 2022-12-16 17:43 . rename patch for each modules
From: =?UTF-8?q?=E6=AF=9B=E5=AE=87=E9=94=8B?= <[email protected]>
Date: Mon, 18 Jul 2022 02:20:45 +0000
Subject: [PATCH] [session] fix a session copy bug fix a possible double
reference on 'ticket' when peer_cert/peer_cert_digest calloc failed.
Cherry-pick from
https://github.com/Mbed-TLS/mbedtls/commit/eb490aabf6a9f47c074ec476d0d4997c2362cdbc
Signed-off-by: maoyufeng <[email protected]>
diff --git a/library/ssl_tls.c b/library/ssl_tls.c
index 3c1e9175981c4c0d175af94914e4c8ebb4558fc9..962d6254353e92b8422842362f603228850184b7 100755
--- a/library/ssl_tls.c
+++ b/library/ssl_tls.c
@@ -301,6 +301,10 @@ static int ssl_session_copy( mbedtls_ssl_session *dst, const mbedtls_ssl_session
mbedtls_ssl_session_free( dst );
memcpy( dst, src, sizeof( mbedtls_ssl_session ) );
+#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_CLI_C)
+ dst->ticket = NULL;
+#endif
+
#if defined(MBEDTLS_X509_CRT_PARSE_C)
if( src->peer_cert != NULL )
{
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yudaiyan/dsoftbus.git
[email protected]:yudaiyan/dsoftbus.git
yudaiyan
dsoftbus
dsoftbus
master

搜索帮助