GHSA-9ghp-w2hm-vfpf json
wasmtime_jit_debug Dumps Undefined Memory by `JitDumpFile`
published 2y ago modified last yr. also RUSTSEC-2024-0442
- cvss
- —
- not scored
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
Summary
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.
Patch / fix
Is GHSA-9ghp-w2hm-vfpf in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerAffected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | wasmtime-jit-debug | <24.0.0 >=0.0.0-0, <24.0.0 |
24.0.0 |
Classification
- Weakness
-
- CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer
References
-
github.com
/bytecodealliance/wasmtime/commit/b5e31a5c33725ab8a7dfbe8505c56b5cf282ffed
web
-
github.com
/bytecodealliance/wasmtime/issues/8905
web, report
-
github.com
/bytecodealliance/wasmtime
package
-
rustsec.org
/advisories/RUSTSEC-2024-0442.html
web, advisory
-
crates.io
/crates/wasmtime-jit-debug
package
Sources
- GitHub Advisory GHSA-9ghp-w2hm-vfpf
- OSV RUSTSEC-2024-0442
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.