{"id":"GHSA-f85w-wvc7-crwc","revision":"462c6998aeb84a38801079c75ebb33d7","records":[{"revision":"462c6998aeb84a38801079c75ebb33d7","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"GHSA-f85w-wvc7-crwc","aliases":["RUSTSEC-2022-0078"],"title":"bumpalo has use-after-free due to a lifetime error in `Vec::into_iter()`","description":"In affected versions of this crate, the lifetime of the iterator produced by `Vec::into_iter()` is not constrained to the lifetime of the `Bump` that allocated the vector's memory. Using the iterator after the `Bump` is dropped causes use-after-free accesses.\n\nThe following example demonstrates memory corruption arising from a misuse of this unsoundness.\n\n```rust\nuse bumpalo::{collections::Vec, Bump};\n\nfn main() {\n    let bump = Bump::new();\n    let mut vec = Vec::new_in(&bump);\n    vec.extend([0x01u8; 32]);\n    let into_iter = vec.into_iter();\n    drop(bump);\n\n    for _ in 0..100 {\n        let reuse_bump = Bump::new();\n        let _reuse_alloc = reuse_bump.alloc([0x41u8; 10]);\n    }\n\n    for x in into_iter {\n        print!(\"0x{:02x} \", x);\n    }\n    println!();\n}\n```\n\nThe issue was corrected in version 3.11.1 by adding a lifetime to the `IntoIter` type, and updating the signature of `Vec::into_iter()` to constrain this lifetime.\n","state":0,"publishedAt":"2023-01-20T21:54:22+00:00","modifiedAt":"2026-09-10T03:49:51.242907+00:00","affected":[{"ecosystem":"crates.io","name":"bumpalo","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"1.1.0"},{"kind":"fixed","version":"3.11.1"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/fitzgen/bumpalo","https://github.com/fitzgen/bumpalo/blob/main/CHANGELOG.md#3111","https://rustsec.org/advisories/RUSTSEC-2022-0078.html"],"sourceUrl":"https://github.com/advisories/GHSA-f85w-wvc7-crwc","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-f85w-wvc7-crwc","identifiers":["GHSA-f85w-wvc7-crwc","RUSTSEC-2022-0078"]},"retained":false,"historicalAffected":[]}],"coverage":[]}