QID 996192

Date Published: 2023-12-13

QID 996192: Rust (Rust) Security Update for cranelift-codegen (GHSA-ff4p-7xrq-q5r8)

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 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.

Successful exploitation of this vulnerability could lead to a security breach or could affect integrity, availability, and confidentiality.

  • CVSS V3 rated as Critical - 9.9 severity.
  • CVSS V2 rated as Medium - 5.4 severity.
  • Solution
    Refer to Github security advisory GHSA-ff4p-7xrq-q5r8 for updates and patch information.
    Vendor References

    CVEs related to QID 996192

    Software Advisories
    Advisory ID Software Component Link
    GHSA-ff4p-7xrq-q5r8 cranelift-codegen URL Logo github.com/advisories/GHSA-ff4p-7xrq-q5r8