119 Star 0 Fork 15

src-openEuler/cups-filters

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-CVE-2024-47076.patch 944 Bytes
一键复制 编辑 原始数据 按行查看 历史
From 95576ec3d20c109332d14672a807353cdc551018 Mon Sep 17 00:00:00 2001
From: Zdenek Dohnal <zdohnal@redhat.com>
Date: Thu, 26 Sep 2024 23:09:29 +0200
Subject: [PATCH] cfGetPrinterAttributes5(): Validate response attributes
before return
The destination can be corrupted or forged, so validate the response
to strenghten security measures.
Fixes CVE-2024-47076
---
cupsfilters/ipp.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/cupsfilters/ipp.c b/cupsfilters/ipp.c
index d703327..88f66b5 100644
--- a/cupsfilters/ipp.c
+++ b/cupsfilters/ipp.c
@@ -402,6 +402,14 @@ get_printer_attributes5(http_t *http_printer,
total_attrs);
ippDelete(response);
} else {
+
+ // Check if the response is valid
+ if (!ippValidateAttributes(response))
+ {
+ ippDelete(response);
+ response = NULL;
+ }
+
/* Suitable response, we are done */
if (have_http == 0) httpClose(http_printer);
if (uri) free(uri);
--
2.43.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/cups-filters.git
git@gitee.com:src-openeuler/cups-filters.git
src-openeuler
cups-filters
cups-filters
master

搜索帮助