cbcvebase.
CVE-2023-26489
published 2023-03-08

CVE-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
VendorProductVersion rangeFixed in
bytecodealliancecranelift-codegen
bytecodealliancecranelift-codegen
bytecodealliancecranelift-codegen>= 0.84.0 < 0.91.10.91.1
bytecodealliancecranelift-codegen>= 0.84.0 < 0.91.10.91.1
bytecodealliancecranelift-codegen>= 0.92.0 < 0.92.10.92.1
bytecodealliancecranelift-codegen>= 0.93.0 < 0.93.10.93.1
bytecodealliancewasmtime
bytecodealliancewasmtime
bytecodealliancewasmtime
bytecodealliancewasmtime
bytecodealliancewasmtime
bytecodealliancewasmtime
bytecodealliancewasmtime
bytecodealliancewasmtime
bytecodealliancewasmtime>= 0.0.0-0 < 4.0.14.0.1
bytecodealliancewasmtime>= 0.37.0 < 4.0.14.0.1
bytecodealliancewasmtime>= 0.37.0 < 4.0.14.0.1
bytecodealliancewasmtime>= 5.0.0 < 5.0.15.0.1
bytecodealliancewasmtime>= 6.0.0 < 6.0.16.0.1
debianrust-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.