Skip to content

GHSA-f7qj-v3vp-4856 libafl has unsound usages of `core::slice::from_raw_parts_mut`

MediumCVSS 6.9
Published
Updated
Exploit status
No public exploit known

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.

Upgrade path

1 package: 1 fixed.

PackageAffectedFixed inStatus
crates.io libafl(crates.io) < 0.11.2; >= 0.0.0-0, < 0.11.2 0.11.2 Fixed

Affected products

ProductAffected versionsFixed in
crates.io libafl(crates.io) < 0.11.2 0.11.2
crates.io libafl(crates.io) >= 0.0.0-0, < 0.11.2 0.11.2

References