libafl has unsound usages of `core::slice::from_raw_parts_mut`
Moderate severity
GitHub Reviewed
Published
Dec 23, 2024
to the GitHub Advisory Database
•
Updated Dec 23, 2024
Description
Published to the GitHub Advisory Database
Dec 23, 2024
Reviewed
Dec 23, 2024
Last updated
Dec 23, 2024
The library breaks the safety assumptions when using unsafe API
slice::from_raw_parts_mut
. The pointer passed tofrom_raw_parts_mut
is misaligned by castingu8
tou16
raw pointer directly, which is unsound. The bug is patched by usingalign_offset
, which could make sure the memory address is aligned to 2 bytes foru16
.This was patched in 0.11.2 in the commit.
References