Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2024-4435— BTreeMap memory leak when deallocating nodes with overflows

Quick assessment

Affected
Internet Computer ic-stable-structures
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Stable Structures是DFINITY开源的一个数据结构集合。 Stable Structures 0.6.0之前版本存在安全漏洞,该漏洞源于释放溢出节点时 BTreeMap 中存在内存问题,这可能会导致使用过多的内存,甚至耗尽内存。

CVSS 5.9 · Medium EPSS 0.52% · P42
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2024-4435

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
BTreeMap memory leak when deallocating nodes with overflows
Source: CVE Program / CVE List V5
Vulnerability Description
When storing unbounded types in a BTreeMap, a node is represented as a linked list of "memory chunks". It was discovered recently that when we deallocate a node, in some cases only the first memory chunk is deallocated, and the rest of the memory chunks remain (incorrectly) allocated, causing a memory leak. In the worst case, depending on how a canister uses the BTreeMap, an adversary could interact with the canister through its API and trigger interactions with the map that keep consuming memory due to the memory leak. This could potentially lead to using an excessive amount of memory, or even running out of memory. This issue has been fixed in #212 https://github.com/dfinity/stable-structures/pull/212  by changing the logic for deallocating nodes to ensure that all of a node's memory chunks are deallocated and users are asked to upgrade to version 0.6.4.. Tests have been added to prevent regressions of this nature moving forward. Note: Users of stable-structure < 0.6.0 are not affected. Users who are not storing unbounded types in BTreeMap are not affected and do not need to upgrade. Otherwise, an upgrade to version 0.6.4 is necessary.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
在移除最后引用时对内存的释放不恰当(内存泄露)
Source: CVE Program / CVE List V5
Vulnerability Title
Stable Structures 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Stable Structures是DFINITY开源的一个数据结构集合。 Stable Structures 0.6.0之前版本存在安全漏洞,该漏洞源于释放溢出节点时 BTreeMap 中存在内存问题,这可能会导致使用过多的内存,甚至耗尽内存。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Internet Computer ic-stable-structures 0.6.0 ~ 0.6.4 -

II. Public POCs for CVE-2024-4435

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2024-4435

请登录查看更多情报信息。

Patches & Fixes for CVE-2024-4435 (1)

Other References for CVE-2024-4435 (2)

IV. Related Vulnerabilities

V. Comments for CVE-2024-4435

No comments yet


Leave a comment