15 Star 6 Fork 58

src-openEuler/edk2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0082-Fix-printing-of-PROXY_CERT_INFO_EXTENSION-to-not-ass.patch 1.32 KB
一键复制 编辑 原始数据 按行查看 历史
ShenYage 提交于 2024-09-03 20:14 +08:00 . Fix CVE-2021-3712、CVE-2022-0778
From 68557991614b61629dce4a6ab4510087ff28022c Mon Sep 17 00:00:00 2001
From: Matt Caswell <[email protected]>
Date: Wed, 18 Aug 2021 14:02:40 +0100
Subject: [PATCH 3/9] Fix printing of PROXY_CERT_INFO_EXTENSION to not assume
NUL terminated strings
ASN.1 strings may not be NUL terminated. Don't assume they are.
CVE-2021-3712
Reviewed-by: Viktor Dukhovni <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
---
CryptoPkg/Library/OpensslLib/openssl/crypto/x509v3/v3_pci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/CryptoPkg/Library/OpensslLib/openssl/crypto/x509v3/v3_pci.c b/CryptoPkg/Library/OpensslLib/openssl/crypto/x509v3/v3_pci.c
index 3d124fa..98b6ef2 100644
--- a/CryptoPkg/Library/OpensslLib/openssl/crypto/x509v3/v3_pci.c
+++ b/CryptoPkg/Library/OpensslLib/openssl/crypto/x509v3/v3_pci.c
@@ -77,7 +77,8 @@ static int i2r_pci(X509V3_EXT_METHOD *method, PROXY_CERT_INFO_EXTENSION *pci,
i2a_ASN1_OBJECT(out, pci->proxyPolicy->policyLanguage);
BIO_puts(out, "\n");
if (pci->proxyPolicy->policy && pci->proxyPolicy->policy->data)
- BIO_printf(out, "%*sPolicy Text: %s\n", indent, "",
+ BIO_printf(out, "%*sPolicy Text: %.*s\n", indent, "",
+ pci->proxyPolicy->policy->length,
pci->proxyPolicy->policy->data);
return 1;
}
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/edk2.git
[email protected]:src-openeuler/edk2.git
src-openeuler
edk2
edk2
openEuler-24.03-LTS-update-before-20241025

搜索帮助