low
static-alloc vulnerability leads to uninitialized read after allocating MemBump
- Severity
- low CVSS:4.0 by GitHub
- Published
- Last changed
- Also known as
- RUSTSEC-2025-0042
Description
The affected function, MemBump::new(), would allocate memory without initializing it. Subsequently calling the created value's various allocmethods 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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| static-alloc (crates.io) | from 0.2.2 before 0.2.6, from 0.2.2-0 before 0.2.6 | GitHub Advisory Database, RustSec Advisory Database |
Classification
What each source says
GitHub Advisory Database
The affected function, MemBump::new(), would allocate memory without initializing it. Subsequently calling the created value's various allocmethods 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.
RustSec Advisory Database
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 is
undefined 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 to cause 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.
References
Sources
| Source | Record | Licence |
|---|---|---|
| GitHub Advisory Database | GHSA-xrrq-rrgq-h89w changed 2025-10-28 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2025-0042 changed 2025-10-28 | CC0-1.0 |