Wasmtime provides unsound API access to a WebAssembly shared linear memory
bytecodealliance wasmtime
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| wasmtime crates.io |
|
|
bytecodealliance wasmtime
| Product | Affected | Fixed in |
|---|---|---|
| wasmtime crates.io |
|
|
36.0.324.0.5Wasmtime is a runtime for WebAssembly. Prior to version 38.0.4, 37.0.3, 36.0.3, and 24.0.5, Wasmtime's Rust embedder API contains an unsound interaction where a WebAssembly shared linear memory could be viewed as a type which provides safe access to the host (Rust) to the contents of the linear memory. This is not sound for shared linear memories, which could be modified in parallel, and this could lead to a data race in the host. Patch releases have been issued for all supported versions of Wasmtime, notably: 24.0.5, 36.0.3, 37.0.3, and 38.0.4. These releases reject creation of shared memories via `Memory::new` and shared memories are now excluded from core dumps. As a workaround, eembeddings affected by this issue should use `SharedMemory::new` instead of `Memory::new` to create shared memories. Affected embeddings should also disable core dumps if they are unable to upgrade. Note that core dumps are disabled by default but the wasm threads proposal (and shared memory) is enabled by default.
From the CVE record · GitHub_M
Wasmtime’s Rust embedder API can expose shared WebAssembly memory through a type that provides safe host access. If that memory is modified in parallel, the host could experience a data race. The input does not specify network access, authentication, or user-interaction requirements.
Engineers running the crates.io wasmtime package should check installations older than 24.0.5, or on the 25–36, 37, or 38 release lines before 36.0.3, 37.0.3, or 38.0.4, respectively.