xous has unsound usages of `core::slice::from_raw_parts`
Low severity
GitHub Reviewed
Published
Dec 30, 2024
to the GitHub Advisory Database
•
Updated Dec 30, 2024
Description
Published to the GitHub Advisory Database
Dec 30, 2024
Reviewed
Dec 30, 2024
Last updated
Dec 30, 2024
We consider
as_slice
andas_slice_mut
unsound because: the pointer with any bit patterns could be cast to the slice of arbitrary types. The pointer could be created by unsafe new and deprecatedfrom_parts
. We consider thatfrom_parts
should be removed in latest version because it will help trigger unsoundness inas_slice
. With new declared as unsafe,as_slice
should also declared as unsafe.This was patched in by marking two functions as
unsafe
.References