GHSA-9ghp-w2hm-vfpf Dump Undefined Memory by `JitDumpFile`
An internal Wasmtime crate allows dumping undefined memory to a file due to unsound pointer handling, potentially leaking sensitive data.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Not stated
- Victim action needed
- Not needed
- Fix
- Available
What is GHSA-9ghp-w2hm-vfpf?
GHSA-9ghp-w2hm-vfpf is a vulnerability in wasmtime-jit-debug, published on 6 Jul 2024.
Official 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.
Which versions are affected by GHSA-9ghp-w2hm-vfpf?
3 open source packages ship an affected version, including wasmtime-jit-debug.
| Package | Affected | Fixed in |
|---|---|---|
wasmtime-jit-debug crates.io | All versions | 24.0.0 |
wasmtime-jit-debug crates.io | All versions | 24.0.0 |
wasmtime-jit-debug crates.io | From 0.0.0-0 | 24.0.0 |
How do I fix GHSA-9ghp-w2hm-vfpf?
Upgrade wasmtime-jit-debug to 24.0.0 or later.
Is GHSA-9ghp-w2hm-vfpf being exploited?
There is no known exploitation of GHSA-9ghp-w2hm-vfpf in the wild and no public exploit code.
Sources
Also known as RUSTSEC-2024-0442.