GHSA-xrrq-rrgq-h89w json
static-alloc vulnerability leads to uninitialized read after allocating MemBump
published last yr. modified last yr. also RUSTSEC-2025-0042
- cvss
- —
- not scored
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
Summary
The affected function, `MemBump::new()`, would allocate memory without initializing it. Subsequently calling the created value's various `alloc`methods would then read and write the start of that memory as a `Cell` which isundefined behavior. Instead, it should zero initialize the start of the allocated memory.
For instance, some values could violate the internal invariants of the type and cause an assertion failure. Nevertheless, no deterministic read is known tocause further uninitialized memory to be exposed.
Affected downstream users that can not upgrade are advised to call `MemBump::reset` immediately after allocation to manually perform the missing write of the counter best-as-possible.
The flaw was corrected in commit d8d6a7d096d3aaafd963b356a8f1bbd8d26fd967 by zeroing the Cell at the start of the allocated memory.
Patch / fix
Is GHSA-xrrq-rrgq-h89w in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerAffected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | static-alloc | >=0.2.2, <0.2.6 >=0.2.2-0, <0.2.6 |
0.2.6 |
Classification
- Weakness
-
- CWE-908 Use of Uninitialized Resource
References
Sources
- GitHub Advisory GHSA-xrrq-rrgq-h89w
- OSV RUSTSEC-2025-0042
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.