9 Star 1 Fork 18

src-openEuler/p11-kit

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
backport-0001-CVE-2020-29361-Check-for-arithmetic-overflo...
backport-0002-CVE-2020-29361-Follow-up-to-arithmetic-over...
backport-CVE-2020-29362-Fix-bounds-check-in-p11_rpc_buffe...
backport-CVE-2020-29363-Check-attribute-length-against-bu...
backport-anchor-Exit-with-non-zero-code-if-any-error-occu...
backport-proxy-Fix-slot-ID-reuse-avoiding-duplicating-IDs...
backport-rpc-server-Disable-parsing-CKF_ARRAY_ATTRIBUTE.p...
p11-kit-0.23.20.tar.xz
p11-kit-client.service
p11-kit.spec
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-rpc-server-Disable-parsing-CKF_ARRAY_ATTRIBUTE.patch 1.51 KB
一键复制 编辑 原始数据 按行查看 历史
From b3243a754763f6df19351593781b88e277a324bc Mon Sep 17 00:00:00 2001
From: Daiki Ueno <ueno@gnu.org>
Date: Sun, 23 May 2021 18:28:57 +0200
Subject: [PATCH] rpc-server: Disable parsing CKF_ARRAY_ATTRIBUTE
This is a temporary measure to avoid oss-fuzz failure. When the
attribute array is nested, the current internal API cannot determine
the actual size of data that need to be stored, because ulValueLen is
set to the attribute count times sizeof(CK_ATTRIBUTE).
Signed-off-by: Daiki Ueno <ueno@gnu.org>
---
p11-kit/rpc-client.c | 5 +++++
p11-kit/rpc-server.c | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/p11-kit/rpc-client.c b/p11-kit/rpc-client.c
index 6e9cd60..ae66375 100644
--- a/p11-kit/rpc-client.c
+++ b/p11-kit/rpc-client.c
@@ -241,6 +241,11 @@ proto_read_attribute_array (p11_rpc_message *msg,
return PARSE_ERROR;
}
+ if (temp.type & CKF_ARRAY_ATTRIBUTE) {
+ p11_debug("recursive attribute array is not supported");
+ return PARSE_ERROR;
+ }
+
/* Try and stuff it in the output data */
if (arr) {
CK_ATTRIBUTE *attr = &(arr[i]);
diff --git a/p11-kit/rpc-server.c b/p11-kit/rpc-server.c
index 796a674..ba7240e 100644
--- a/p11-kit/rpc-server.c
+++ b/p11-kit/rpc-server.c
@@ -323,6 +323,11 @@ proto_read_attribute_array (p11_rpc_message *msg,
return PARSE_ERROR;
}
+ if (temp.type & CKF_ARRAY_ATTRIBUTE) {
+ p11_debug("recursive attribute array is not supported");
+ return PARSE_ERROR;
+ }
+
attrs[i].type = temp.type;
/* Whether this one is valid or not */
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/p11-kit.git
git@gitee.com:src-openeuler/p11-kit.git
src-openeuler
p11-kit
p11-kit
openEuler-20.03-LTS

搜索帮助