# GHSA-9ghp-w2hm-vfpf: wasmtime_jit_debug Dumps Undefined Memory by `JitDumpFile`

- Severity: Medium (CVSS:4.0, scored by GitHub) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2024-07-06T12:00:00.000Z
- Modified: 2025-10-28T06:29:24.080Z
- Also known as: RUSTSEC-2024-0442
- Weaknesses: CWE-119

## 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](https://github.com/bytecodealliance/wasmtime/pull/10963). Please open an issue in Wasmtime if you're using this crate directly.

(As written by GitHub Advisory Database.)

## Affected

- wasmtime-jit-debug (crates.io): before 24.0.0; from 0.0.0-0 before 24.0.0

## References

- <https://github.com/bytecodealliance/wasmtime/issues/8905> (report, web)
- <https://github.com/bytecodealliance/wasmtime/commit/b5e31a5c33725ab8a7dfbe8505c56b5cf282ffed> (web)
- <https://github.com/bytecodealliance/wasmtime> (package)
- <https://rustsec.org/advisories/RUSTSEC-2024-0442.html> (advisory, web)
- <https://crates.io/crates/wasmtime-jit-debug> (package)

## Sources

- GitHub Advisory Database: [GHSA-9ghp-w2hm-vfpf](https://github.com/advisories/GHSA-9ghp-w2hm-vfpf), CC-BY-4.0, modified 2025-10-28
- RustSec Advisory Database: [RUSTSEC-2024-0442](https://rustsec.org/advisories/RUSTSEC-2024-0442.html), CC0-1.0, modified 2025-10-28

---

Page: https://cve.day/GHSA-9ghp-w2hm-vfpf · Whole record: https://cve.day/GHSA-9ghp-w2hm-vfpf.json · Rebuilt by cve.day 2026-11-25T22:56:43.238Z
