{"id":"GHSA-f7qj-v3vp-4856","aliases":["RUSTSEC-2024-0424"],"status":"published","title":"libafl has unsound usages of `core::slice::from_raw_parts_mut`","description":"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).","severity":{"version":"4.0","score":6.9,"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","level":"medium","from":"ghsa"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2024-12-19T12:00:00Z","modified":"2025-10-28T06:29:24Z","fixes":[{"ecosystem":"crates.io","package":"libafl","fixed_in":["0.11.2"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"libafl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.11.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"libafl","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.11.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"libafl","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.11.2"}]}]}],"references":[{"url":"https://github.com/AFLplusplus/LibAFL/issues/1526","tags":["web","report"]},{"url":"https://github.com/AFLplusplus/LibAFL/pull/1530","tags":["web"]},{"url":"https://github.com/AFLplusplus/LibAFL/pull/1530/commits/5a60cb31ef587d71d09d534bba39bd3973c4b35d","tags":["web"]},{"url":"https://github.com/AFLplusplus/LibAFL/commit/f70a16a09a8096d3c50159dd8a912a75c2af157c","tags":["web"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2024-0424.html","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-f7qj-v3vp-4856"},{"url":"https://github.com/AFLplusplus/LibAFL","tags":["package"]},{"url":"https://crates.io/crates/libafl","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-f7qj-v3vp-4856","title":"libafl has unsound usages of `core::slice::from_raw_parts_mut` ","description":"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).\n","status":"published","published":"2024-12-23T19:28:19Z","modified":"2024-12-23T19:30:20Z","cvss":[{"version":"4.0","score":6.9,"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","level":"medium"}],"updated_at":"2026-11-02T14:38:26.167657Z"}],"osv":[{"id":"GHSA-f7qj-v3vp-4856","title":"libafl has unsound usages of `core::slice::from_raw_parts_mut` ","description":"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).\n","status":"published","published":"2024-12-23T19:28:19Z","modified":"2025-10-28T06:29:24.276187Z","cvss":[{"version":"4.0","score":6.9,"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","level":"medium"}],"updated_at":"2026-11-02T15:46:46.006631Z"},{"id":"RUSTSEC-2024-0424","title":"Unsound usages of `core::slice::from_raw_parts_mut`","description":"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).","status":"published","published":"2024-12-19T12:00:00Z","modified":"2025-10-28T06:29:24.276187Z","updated_at":"2026-11-02T15:53:39.971022Z"}]}}
