CVE-2023-26489
published 2023-03-08CVE-2023-26489: wasmtime is a fast and secure runtime for WebAssembly. In affected versions wasmtime's code generator, Cranelift, has a bug on x86_64 targets where…
PriorityP355critical9.9CVSS 3.1
AVNACLPRLUINSCCHIHAH
EPSS
1.25%
65.7th percentile
wasmtime is a fast and secure runtime for WebAssembly. In affected versions wasmtime's code generator, Cranelift, has a bug on x86_64 targets where address-mode computation mistakenly would calculate a 35-bit effective address instead of WebAssembly's defined 33-bit effective address. This bug means that, with default codegen settings, a wasm-controlled load/store operation could read/write addresses up to 35 bits away from the base of linear memory. Due to this bug, however, addresses up to `0xffffffff * 8 + 0x7ffffffc = 36507222004 = ~34G` bytes away from the base of linear memory are possible from guest code. This means that the virtual memory 6G away from the base of linear memory up to ~34G away can be read/written by a malicious module. A guest module can, without the knowledge of the embedder, read/write memory in this region. The memory may belong to other WebAssembly instances when using the pooling allocator, for example. Affected embedders are recommended to analyze preexisting wasm modules to see if they're affected by the incorrect codegen rules and possibly correlate that with an anomalous number of traps during historical execution to locate possibly suspicious modules. The specific bug in Cranelift's x86_64 backend is that a WebAssembly address which is left-shifted by a constant amount from 1 to 3 will get folded into x86_64's addressing modes which perform shifts. For example `(i32.load (i32.shl (local.get 0) (i32.const 3)))` loads from the WebAssembly address `$local0 << 3`. When translated to Cranelift the `$local0 << 3` computation, a 32-bit value, is zero-extended to a 64-bit value and then added to the base address of linear memory. Cranelift would generate an instruction of the form `movl (%base, %local0, 8), %dst` which calculates `%base + %local0 << 3`. The bug here, however, is that the address computation happens with 64-bit values, where the `$local0 << 3` computation was supposed to be truncated to a a 32-bit value. This means that `%lo
Affected
20 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| bytecodealliance | cranelift-codegen | — | — |
| bytecodealliance | cranelift-codegen | — | — |
| bytecodealliance | cranelift-codegen | >= 0.84.0 < 0.91.1 | 0.91.1 |
| bytecodealliance | cranelift-codegen | >= 0.84.0 < 0.91.1 | 0.91.1 |
| bytecodealliance | cranelift-codegen | >= 0.92.0 < 0.92.1 | 0.92.1 |
| bytecodealliance | cranelift-codegen | >= 0.93.0 < 0.93.1 | 0.93.1 |
| bytecodealliance | wasmtime | — | — |
| bytecodealliance | wasmtime | — | — |
| bytecodealliance | wasmtime | — | — |
| bytecodealliance | wasmtime | — | — |
| bytecodealliance | wasmtime | — | — |
| bytecodealliance | wasmtime | — | — |
| bytecodealliance | wasmtime | — | — |
| bytecodealliance | wasmtime | — | — |
| bytecodealliance | wasmtime | >= 0.0.0-0 < 4.0.1 | 4.0.1 |
| bytecodealliance | wasmtime | >= 0.37.0 < 4.0.1 | 4.0.1 |
| bytecodealliance | wasmtime | >= 0.37.0 < 4.0.1 | 4.0.1 |
| bytecodealliance | wasmtime | >= 5.0.0 < 5.0.1 | 5.0.1 |
| bytecodealliance | wasmtime | >= 6.0.0 < 6.0.1 | 6.0.1 |
| debian | rust-wasmtime | — | — |
CVSS provenance
nvdv3.19.9CRITICALCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
vendor_debian9.9LOW
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
OSV
wasmtime vulnerable to guest-controlled out-of-bounds read/write on x86_64
osv·2023-03-09
CVE-2023-26489 [CRITICAL] wasmtime vulnerable to guest-controlled out-of-bounds read/write on x86_64
wasmtime vulnerable to guest-controlled out-of-bounds read/write on x86_64
### Impact
Wasmtime's code generator, Cranelift, has a bug on x86_64 targets where address-mode computation mistakenly would calculate a 35-bit effective address instead of WebAssembly's defined 33-bit effective address. This bug means that, with default codegen settings, a wasm-controlled load/store operation could read/write addresses up to 35 bits away from the base of linear memory. Wasmtime's default sandbox settings provide up to 6G of protection from the base of linear memory to guarantee that any memory access in that range will be semantically correct. Due to this bug, however, addresses up to `0xffffffff * 8 + 0x7ffffffc = 36507222004 = ~34G` bytes away from the base of linear memory are possible from gu
GHSA
wasmtime vulnerable to guest-controlled out-of-bounds read/write on x86_64
ghsa·2023-03-09
CVE-2023-26489 [CRITICAL] CWE-125 wasmtime vulnerable to guest-controlled out-of-bounds read/write on x86_64
wasmtime vulnerable to guest-controlled out-of-bounds read/write on x86_64
### Impact
Wasmtime's code generator, Cranelift, has a bug on x86_64 targets where address-mode computation mistakenly would calculate a 35-bit effective address instead of WebAssembly's defined 33-bit effective address. This bug means that, with default codegen settings, a wasm-controlled load/store operation could read/write addresses up to 35 bits away from the base of linear memory. Wasmtime's default sandbox settings provide up to 6G of protection from the base of linear memory to guarantee that any memory access in that range will be semantically correct. Due to this bug, however, addresses up to `0xffffffff * 8 + 0x7ffffffc = 36507222004 = ~34G` bytes away from the base of linear memory are possible from gu
OSV
Guest-controlled out-of-bounds read/write on x86\_64
osv·2023-03-02
CVE-2023-26489 Guest-controlled out-of-bounds read/write on x86\_64
Guest-controlled out-of-bounds read/write on x86\_64
This is an entry in the RustSec database for the Wasmtime security advisory
located at
https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-ff4p-7xrq-q5r8.
For more information see the GitHub-hosted security advisory.
Debian
CVE-2023-26489: rust-wasmtime - wasmtime is a fast and secure runtime for WebAssembly. In affected versions wasm...
vendor_debian·2023·CVSS 9.9
CVE-2023-26489 [CRITICAL] CVE-2023-26489: rust-wasmtime - wasmtime is a fast and secure runtime for WebAssembly. In affected versions wasm...
wasmtime is a fast and secure runtime for WebAssembly. In affected versions wasmtime's code generator, Cranelift, has a bug on x86_64 targets where address-mode computation mistakenly would calculate a 35-bit effective address instead of WebAssembly's defined 33-bit effective address. This bug means that, with default codegen settings, a wasm-controlled load/store operation could read/write addresses up to 35 bits away from the base of linear memory. Due to this bug, however, addresses up to `0xffffffff * 8 + 0x7ffffffc = 36507222004 = ~34G` bytes away from the base of linear memory are possible from guest code. This means that the virtual memory 6G away from the base of linear memory up to ~34G away can be read/written by a malicious module. A guest module can, without the knowledge of th
No detection rules found.
No public exploits indexed.
https://docs.rs/wasmtime/latest/wasmtime/struct.Config.html#method.static_memory_guard_sizehttps://docs.rs/wasmtime/latest/wasmtime/struct.Config.html#method.static_memory_maximum_sizehttps://github.com/bytecodealliance/wasmtime/commit/63fb30e4b4415455d47b3da5a19d79c12f4f2d1fhttps://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-ff4p-7xrq-q5r8https://groups.google.com/a/bytecodealliance.org/g/sec-announce/c/Mov-ItrNJsQhttps://docs.rs/wasmtime/latest/wasmtime/struct.Config.html#method.static_memory_guard_sizehttps://docs.rs/wasmtime/latest/wasmtime/struct.Config.html#method.static_memory_maximum_sizehttps://github.com/bytecodealliance/wasmtime/commit/63fb30e4b4415455d47b3da5a19d79c12f4f2d1fhttps://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-ff4p-7xrq-q5r8https://groups.google.com/a/bytecodealliance.org/g/sec-announce/c/Mov-ItrNJsQ
2023-03-08
Published