GitHub Advisoryadvisory · crates.io
GHSA-9ghp-w2hm-vfpf wasmtime_jit_debug Dumps Undefined Memory by `JitDumpFile`
MEDIUM
Official page ↗
- Ecosystem
- crates.io
- Packages
- wasmtime-jit-debug
- Severity
- Moderate
- CVSS vector
- CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P
- Weaknesses
- CWE-119
- Reviewed
- 2025-06-17
Affected packages
• crates.io wasmtime-jit-debug: < 24.0.0 → fixed in 24.0.0
Description
The unsound function `dump_code_load_record` uses `from_raw_parts` to directly convert the pointer `addr` and `len` 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.
> Note: this is an internal-only crate in the Wasmtime project not intended for external use and is more strongly signaled nowadays as of bytecodealliance/wasmtime#10963. Please open an issue in Wasmtime if you're using this crate directly.
Related
Weakness · CWE (1)
- CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer weakness