CVE-2020-25795
Description
An issue was discovered in the sized-chunks crate through 0.6.2 for Rust. In the Chunk implementation, insert_from can have a memory-safety issue upon a panic.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
The sized-chunks crate for Rust suffers a memory-safety bug in the Chunk::insert_from function when a panicking iterator is used.
Vulnerability
CVE-2020-25795 is a memory-safety issue in the sized-chunks crate (version 0.6.2 and earlier) for Rust. Specifically, the Chunk implementation's insert_from method is not panic-safe; if the iterator provided to it panics during iteration, the function can leave the internal array in an inconsistent state, leading to double-free or other memory corruption [1][2].
Exploitation
An attacker who can control or influence the iterator passed to Chunk::insert_from can trigger this vulnerability by providing an iterator that panics at a controlled point, such as during a clone, next, or by using a custom type like DropDetector that panics on clone [1]. No special network position is required beyond being able to supply a panicking iterator, which could occur in library usage where user-supplied data is processed.
Impact
Successful exploitation results in memory unsoundness, potentially leading to undefined behavior such as use-after-free, double-free, or arbitrary code execution, depending on the Rust compiler's optimization and the crate's use in an application [3]. The flaw is in a foundational crate used by im data structures, so it can have widespread impact.
Mitigation
The sized-chunks crate repository has been archived and no patched version was released for this specific issue; the advisory recommends avoiding the crate in security-sensitive contexts [3]. The advisory notes that the im-rs project (which used sized-chunks) was also archived and users should migrate to other immutable collection libraries [1][4].
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
sized-chunkscrates.io | < 0.6.3 | 0.6.3 |
Affected products
2- sized-chunks crate/sized-chunks cratedescription
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
4- github.com/advisories/GHSA-x54v-qxxr-93qcghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2020-25795ghsaADVISORY
- github.com/bodil/sized-chunks/issues/11ghsax_refsource_MISCWEB
- rustsec.org/advisories/RUSTSEC-2020-0041.htmlghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.