Wasmtime sandbox escape in aarch64 br_table compilation
bytecodealliance wasmtime
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| wasmtime crates.io |
|
|
bytecodealliance wasmtime
| Product | Affected | Fixed in |
|---|---|---|
| wasmtime crates.io |
|
|
Wasmtime is a runtime for WebAssembly. Prior to 36.0.19, 48.0.7, and 49.0.4, the Cranelift compiler backend on aarch64 can compile a Wasm br_table instruction with more than approximately 256,000 targets so that it has an incorrect conditional branch target. The branch can then jump to arbitrary other code at a user-controlled offset, allowing a user-controlled Wasm module to escape the sandbox on aarch64 engines using the default Cranelift backend. This issue is fixed in versions 36.0.19, 48.0.7, and 49.0.4.
From the CVE record · GitHub_M
On aarch64, Wasmtime’s default Cranelift backend can compile a Wasm br_table instruction with more than approximately 256,000 targets to use an incorrect branch target. A user-controlled Wasm module can then jump to other code at a user-controlled offset and escape the sandbox. The input does not specify network access or authentication requirements; exploitation requires the module to be run.
Engineers running Wasmtime on aarch64 should check crates.io wasmtime versions below 36.0.19, 37.0.0 through versions below 48.0.7, and 49.0.0 through versions below 49.0.4.