Skip to content
Sign in
CVE-2023-2648910.0CriticalCWE-125

CVE-2023-26489: Guest-controlled out-of-bounds read/write on x86_64 in wasmtime

bytecodealliance · wasmtime

Affected: bytecodealliance wasmtime · Exploitation: possible (1 to 10%)

Not in CyberSIXT coverage yet: no article names this CVE. This page shows the public record.

1.3%probability of exploitation in the next 30 days
69th percentile
050100

Higher than 69% of scored CVEs

10.0CriticalCVSS 3.1
LowCrit.

DescriptionCVE.org

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.

Affected products1

From the CVE record. A product or version that is not listed is unknown, not unaffected.

  • bytecodealliance · wasmtimecranelift-codegen: >= 0.84.0, < 0.91.1; cranelift-codegen: >= 0.92.0, < 0.92.1; cranelift-codegen: >= 0.93.0, < 0.93.1; wasmtime: >= 0.37.0, < 4.0.1; wasmtime: >= 5.0.0, < 5.0.1; wasmtime: >= 6.0.0, < 6.0.1

On the Atlas

Every published CVE is on the CyberSIXT Atlas, grouped by weakness, vendor and month.

Open the Atlas
Exploitation
Possible (1 to 10%). EPSS between 1% and 10%.
CISA KEV
Not listed
Public check
No public nuclei template
Published
March 2023

CoverageNo articles yet

No CyberSIXT article names CVE-2023-26489 yet, so there is no coverage timeline, action brief or change log for it. Everything on this page comes from the public CVE record, CISA KEV, EPSS and the nuclei template index. Search the archive or see the CVEs in the news.

References

Updated AboutDevelopersSign in