Instituto Nacional de ciberseguridad. Sección Incibe
Instituto Nacional de Ciberseguridad. Sección INCIBE-CERT

CVE-2023-26489

Gravedad CVSS v3.1:
CRÍTICA
Tipo:
CWE-125 Lectura fuera de límites
Fecha de publicación:
08/03/2023
Última modificación:
07/11/2023

Descripción

*** Pendiente de traducción *** 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

Productos y versiones vulnerables

CPE Desde Hasta
cpe:2.3:a:bytecodealliance:cranelift-codegen:*:*:*:*:*:rust:*:* 0.84.0 (incluyendo) 0.91.1 (excluyendo)
cpe:2.3:a:bytecodealliance:cranelift-codegen:0.92.0:*:*:*:*:rust:*:*
cpe:2.3:a:bytecodealliance:cranelift-codegen:0.93.0:*:*:*:*:rust:*:*
cpe:2.3:a:bytecodealliance:wasmtime:*:*:*:*:*:rust:*:* 0.37.0 (incluyendo) 4.0.1 (excluyendo)
cpe:2.3:a:bytecodealliance:wasmtime:5.0.0:*:*:*:*:rust:*:*
cpe:2.3:a:bytecodealliance:wasmtime:6.0.0:*:*:*:*:rust:*:*