POJIA破甲
地图 / Potential invocation of qsort on uninitialized memory during cookie save

Potential invocation of qsort on uninitialized memory during cookie save

内存破坏 / 内存破坏(通用) / #696822

厂商
curl
严重程度
低危
赏金
—
弱点
内存破坏(通用)
研究员
@pauldreik
披露日期
2021-02-08
资产
https://github.com/curl/curl
CVE
—

该报告还没有中文解读。

原文摘录

摘自原文(2698 字符中的一小部分)
Summary: If cookiejar is set, cookies are written to file at exit. That is done by the function cookie_output() in cookie.c. The cookies are sorted before being stored, using qsort on a temporary array. That temporary array is uninitialized (gotten from malloc at …
原文中的代码
diff --git a/lib/cookie.c b/lib/cookie.c
index 53ca40237..875569bb0 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -1547,7 +1547,7 @@ static int cookie_output(struct CookieInfo *c, const char *dumphere)
       }
     }
 
-    qsort(array, c->numcookies, sizeof(struct Cookie *), cookie_sort_ct);
+ …

默认不展示报告全文。以上为简短摘录,完整复现过程请阅读原文。版权归研究员与 curl 所有。

时间线

  • 报告提交
  • 公开披露
阅读 HackerOne 原文 ↗作者 @pauldreik · 版权归作者与 curl 所有

同类报告

Race Conditions in Popular reports feature.HackerOne · 2016-08-03Malformed .MDL triggers an Access Violation on GoldSRC (hl.exe)Valve · 2019-10-09[FG-VD-19-009] Intel(R) Trace Analyzer and Collector 2019 Memory Corruption Vulnerability NotificationIntel Corporation · — · $1,500Type Confusion Vulnerability - SOAP / make_http_soap_request()Internet Bug Bounty · 2019-10-15 · $1,000Corrupted pointer in node::fs::ReadFileUtf8(const FunctionCallbackInfo<Value>& args) when args[0] is a string.Node.js · 2025-05-15Heap overflow in mysqlnd related to BIT fields (CVE-2016-7412)Internet Bug Bounty · 2019-11-12