{"id":"GHSA-f7qj-v3vp-4856","aliases":["GHSA-f7qj-v3vp-4856","RUSTSEC-2024-0424"],"related":[],"kind":"vulnerability","state":"published","title":"libafl has unsound usages of `core::slice::from_raw_parts_mut`","summary":"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`.  \n\nThis was patched in 0.11.2 in the [commit](https://github.com/AFLplusplus/LibAFL/pull/1530/commits/5a60cb31ef587d71d09d534bba39bd3973c4b35d).","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"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`.  \n\nThis was patched in 0.11.2 in the [commit](https://github.com/AFLplusplus/LibAFL/pull/1530/commits/5a60cb31ef587d71d09d534bba39bd3973c4b35d).","format":"markdown","source":"ghsa"}],"published":"2024-12-19T12:00:00.000Z","modified":"2025-10-28T06:29:24.276Z","severity":{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.11.2"}],"ecosystem":"crates.io","package":"libafl","purl":"pkg:cargo/libafl","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.11.2"}],"ecosystem":"crates.io","package":"libafl","purl":"pkg:cargo/libafl","source":"rustsec"}],"references":[{"url":"https://github.com/AFLplusplus/LibAFL/issues/1526","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/AFLplusplus/LibAFL/pull/1530","tags":["web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/AFLplusplus/LibAFL/pull/1530/commits/5a60cb31ef587d71d09d534bba39bd3973c4b35d","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/AFLplusplus/LibAFL/commit/f70a16a09a8096d3c50159dd8a912a75c2af157c","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/AFLplusplus/LibAFL","tags":["package"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2024-0424.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/libafl","tags":["package"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-f7qj-v3vp-4856","url":"https://github.com/advisories/GHSA-f7qj-v3vp-4856","licence":"CC-BY-4.0","modified":"2025-10-28T06:29:24.276Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2024-0424","url":"https://rustsec.org/advisories/RUSTSEC-2024-0424.html","licence":"CC0-1.0","modified":"2025-10-28T06:29:24.276Z"}],"updatedAt":"2026-11-25T22:56:43.231Z"}