wasmtime_jit_debug Dumps Undefined Memory by `JitDumpFile`
Moderate severity
GitHub Reviewed
Published
Jun 17, 2025
to the GitHub Advisory Database
•
Updated Jun 17, 2025
Description
Published to the GitHub Advisory Database
Jun 17, 2025
Reviewed
Jun 17, 2025
Last updated
Jun 17, 2025
The unsound function
dump_code_load_record
usesfrom_raw_parts
to directly convert the pointeraddr
andlen
into a slice without any validation and that memory block would be dumped.Thus, the 'safe' function dump_code_load_record is actually 'unsafe' since it requires the caller to guarantee that the addr is valid and len must not overflow. Otherwise, the function could dump the memory into file illegally, causing memory leak.
References