Memory leak when calling a canister method via `ic_cdk::call`
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-401.
Summary
When a canister method is called via ic_cdk::call* , a new Future CallFuture is created and can be awaited by the caller to get the execution result. Internally, the state of the Future is tracked and stored in a struct called CallFutureState. A bug in the polling implementation of the CallFuture allows multiple references to be held for this internal state and not all references were dropped before the Future is resolved. Since we have unaccounted references held, a copy of the internal state ended up being persisted in the canister's heap and thus causing a memory leak. Impact Canisters built in Rust with ic_cdk and ic_cdk_timers are affected. If these canisters call a canister method, use timers or heartbeat, they will likely leak a small amount of memory on every such operation. In the worst case, this could lead to heap memory exhaustion triggered by an attacker. Motoko based canisters are not affected by the bug. PatchesThe patch has been backported to all minor versions between >= 0.8.0, <= 0.15.0. The patched versions available are 0.8.2, 0.9.3, 0.10.1, 0.11.6, 0.12.2, 0.13.5, 0.14.1, 0.15.1 and their previous versions have been yanked. WorkaroundsThere are no known workarounds at the moment. Developers are recommended to upgrade their canister as soon as possible to the latest available patched version of ic_cdk to avoid running out of Wasm heap memory. Upgrading the canisters (without updating `ic_cdk`) also frees the leaked memory but it's only a temporary solution.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Internet Computer | ic-cdk | 0.8.0 to before 0.8.2; 0.9.0 to before 0.9.3; 0.10.0 to before 0.10.1; 0.11.0 to before 0.11.5; 0.12.0 to before 0.12.2; 0.13.0 to before 0.13.4; 0.14.0 to before 0.14.1; 0.15.0 to before 0.15.1 | 0.8.2, 0.9.3, 0.10.1, 0.11.5, 0.12.2, 0.13.4, 0.14.1, 0.15.1 | Patch available | CNA |
| — | ic_cdk (crates.io) | 0.8.0 to before 0.8.2 | 0.8.2 | Patch available | GHSA-rwq6-crjg-9cpw |
| — | ic_cdk (crates.io) | 0.9.0 to before 0.9.3 | 0.9.3 | Patch available | GHSA-rwq6-crjg-9cpw |
| — | ic_cdk (crates.io) | 0.10.0 to before 0.10.1 | 0.10.1 | Patch available | GHSA-rwq6-crjg-9cpw |
| — | ic_cdk (crates.io) | 0.11.0 to before 0.11.6 | 0.11.6 | Patch available | GHSA-rwq6-crjg-9cpw |
| — | ic_cdk (crates.io) | 0.12.0 to before 0.12.2 | 0.12.2 | Patch available | GHSA-rwq6-crjg-9cpw |
| — | ic_cdk (crates.io) | 0.13.0 to before 0.13.5 | 0.13.5 | Patch available | GHSA-rwq6-crjg-9cpw |
| — | ic_cdk (crates.io) | 0.14.0 to before 0.14.1 | 0.14.1 | Patch available | GHSA-rwq6-crjg-9cpw |
| — | ic_cdk (crates.io) | 0.15.0 to before 0.15.1 | 0.15.1 | Patch available | GHSA-rwq6-crjg-9cpw |
- ic-cdk VendorInternet Computer Affected 0.8.0 to before 0.8.2; 0.9.0 to before 0.9.3; 0.10.0 to before 0.10.1; 0.11.0 to before 0.11.5; 0.12.0 to before 0.12.2; 0.13.0 to before 0.13.4; 0.14.0 to before 0.14.1; 0.15.0 to before 0.15.1 Fixed in 0.8.2, 0.9.3, 0.10.1, 0.11.5, 0.12.2, 0.13.4, 0.14.1, 0.15.1 Patch available CNA
- ic_cdk (crates.io) Vendor— Affected 0.8.0 to before 0.8.2 Fixed in 0.8.2 Patch available GHSA-rwq6-crjg-9cpw
- ic_cdk (crates.io) Vendor— Affected 0.9.0 to before 0.9.3 Fixed in 0.9.3 Patch available GHSA-rwq6-crjg-9cpw
- ic_cdk (crates.io) Vendor— Affected 0.10.0 to before 0.10.1 Fixed in 0.10.1 Patch available GHSA-rwq6-crjg-9cpw
- ic_cdk (crates.io) Vendor— Affected 0.11.0 to before 0.11.6 Fixed in 0.11.6 Patch available GHSA-rwq6-crjg-9cpw
- ic_cdk (crates.io) Vendor— Affected 0.12.0 to before 0.12.2 Fixed in 0.12.2 Patch available GHSA-rwq6-crjg-9cpw
- ic_cdk (crates.io) Vendor— Affected 0.13.0 to before 0.13.5 Fixed in 0.13.5 Patch available GHSA-rwq6-crjg-9cpw
- ic_cdk (crates.io) Vendor— Affected 0.14.0 to before 0.14.1 Fixed in 0.14.1 Patch available GHSA-rwq6-crjg-9cpw
- ic_cdk (crates.io) Vendor— Affected 0.15.0 to before 0.15.1 Fixed in 0.15.1 Patch available GHSA-rwq6-crjg-9cpw
CPE configurations NVD · 4
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:dfinity:canister_developer_kit_for_the_internet_computer:*:*:*:*:*:rust:*:* | 0.8.0 to before 0.8.2; 0.9.0 to before 0.9.3; 0.11.0 to before 0.11.6; 0.12.0 to before 0.12.2; 0.13.0 to before 0.13.5 | Vulnerable | Internet Computer |
| cpe:2.3:a:dfinity:canister_developer_kit_for_the_internet_computer:0.10.0:*:*:*:*:rust:*:* | 0.10.0 | Vulnerable | Internet Computer |
| cpe:2.3:a:dfinity:canister_developer_kit_for_the_internet_computer:0.14.0:*:*:*:*:rust:*:* | 0.14.0 | Vulnerable | Internet Computer |
| cpe:2.3:a:dfinity:canister_developer_kit_for_the_internet_computer:0.15.0:*:*:*:*:rust:*:* | 0.15.0 | Vulnerable | Internet Computer |
- cpe:2.3:a:dfinity:canister_developer_kit_for_the_internet_computer:*:*:*:*:*:rust:*:* Versions 0.8.0 to before 0.8.2; 0.9.0 to before 0.9.3; 0.11.0 to before 0.11.6; 0.12.0 to before 0.12.2; 0.13.0 to before 0.13.5 Vulnerable ·Internet Computer
- cpe:2.3:a:dfinity:canister_developer_kit_for_the_internet_computer:0.10.0:*:*:*:*:rust:*:* Versions 0.10.0 Vulnerable ·Internet Computer
- cpe:2.3:a:dfinity:canister_developer_kit_for_the_internet_computer:0.14.0:*:*:*:*:rust:*:* Versions 0.14.0 Vulnerable ·Internet Computer
- cpe:2.3:a:dfinity:canister_developer_kit_for_the_internet_computer:0.15.0:*:*:*:*:rust:*:* Versions 0.15.0 Vulnerable ·Internet Computer
Remediation
- Fix · CNA ic-cdk (Internet Computer) Fixed in 0.8.2, 0.9.3, 0.10.1, 0.11.5, 0.12.2, 0.13.4, 0.14.1, 0.15.1
- Fix · GHSA-rwq6-crjg-9cpw ic_cdk (crates.io) Fixed in 0.8.2 Advisory →
- Fix · GHSA-rwq6-crjg-9cpw ic_cdk (crates.io) Fixed in 0.9.3 Advisory →
- Fix · GHSA-rwq6-crjg-9cpw ic_cdk (crates.io) Fixed in 0.10.1 Advisory →
- Fix · GHSA-rwq6-crjg-9cpw ic_cdk (crates.io) Fixed in 0.11.6 Advisory →
- Fix · GHSA-rwq6-crjg-9cpw ic_cdk (crates.io) Fixed in 0.12.2 Advisory →
- Fix · GHSA-rwq6-crjg-9cpw ic_cdk (crates.io) Fixed in 0.13.5 Advisory →
- Fix · GHSA-rwq6-crjg-9cpw ic_cdk (crates.io) Fixed in 0.14.1 Advisory →
- Fix · GHSA-rwq6-crjg-9cpw ic_cdk (crates.io) Fixed in 0.15.1 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2024-7884
- 2026-10-03 Alias added: GHSA-rwq6-crjg-9cpw
References
Other 7
- https://docs.rs/ic-cdk/latest/ic_cdk/
- https://internetcomputer.org/docs/current/references/ic-interface-spec
- https://github.com/dfinity/cdk-rs/security/advisories/GHSA-rwq6-crjg-9cpw
- https://github.com/dfinity/cdk-rs/commit/bd17d57a7b8ca59665fea5fad6143ca02724d03b
- https://docs.rs/ic-cdk/latest/ic_cdk
- https://github.com/dfinity/cdk-rs
- https://rustsec.org/advisories/RUSTSEC-2024-0372.html
Sources
- CVE-2024-7884 · CVE Program
- CVE-2024-7884 · NVD
- FIRST EPSS
- GHSA-rwq6-crjg-9cpw · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences