GHSA-f7qj-v3vp-4856
JSON

medium

libafl has unsound usages of `core::slice::from_raw_parts_mut`

Severity
medium CVSS:4.0 by GitHub
Published
Last changed
Also known as
RUSTSEC-2024-0424

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.

This was patched in 0.11.2 in the commit.

Affected

Product or packageVersionsReported by
libafl (crates.io)before 0.11.2, from 0.0.0-0 before 0.11.2GitHub Advisory Database, RustSec Advisory Database

References

Sources

SourceRecordLicence
GitHub Advisory DatabaseGHSA-f7qj-v3vp-4856 changed 2025-10-28CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2024-0424 changed 2025-10-28CC0-1.0