Rust advisories / libafl
Unsound MediumRUSTSEC-2024-0424 · libafl
RUSTSEC-2024-0424: Unsound usages of `core::slice::from_raw_parts_mut`
Short answerlibafl has an API that can cause undefined behaviour from safe code: Unsound usages of `core::slice::from_raw_parts_mut`. Fixed in 0.11.2.
| Crate | libafl |
|---|---|
| Type | Unsound |
| Affected versions | Before 0.11.2. |
| Fixed in | 0.11.2 |
| Severity | Medium (GitHub rating) |
| Published | 2024-12-19 |
| Last changed | 2025-10-28 |
| Also known as | GHSA-f7qj-v3vp-4856 |
| Affected functions | libafl::observers::map::HitcountsMapObserver::post_exec |
What to do
- See which version you have:
cargo tree -i libafl(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p libafl. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for examplelibafl = "0.11.2") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
The library breaks the safety assumptions when using unsafe API slice::from_raw_parts_mut. The pointer passed to from_raw_parts_mut is misaligned by casting u8 to u16 raw pointer directly, which is unsound. The bug is patched by using align_offset, which could make sure the memory address is aligned to 2 bytes for u16.
This was patched in 0.11.2 in the commit.
References
- Package: crates.io/crates/libafl
- Advisory: rustsec.org/advisories/RUSTSEC-2024-0424.html
- Report: github.com/AFLplusplus/LibAFL/issues/1526
- Web: github.com/AFLplusplus/LibAFL/pull/1530
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Up next
Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.Read it next →Also worth your time
Did this answer your question?