Home
Trends
Vulnerabilities
News
Researchers
Why dbugs?

Akirilov-Arm

#44473of 53,633
5.9Total CVSS
Vulnerabilities · 1
PT-2022-20583
5.9
2022-02-16
Cranelift · Cranelift · CVE-2022-31169
**Name of the Vulnerable Software and Affected Versions** Wasmtime versions prior to 0.38.2 Cranelift versions prior to 0.85.2 **Description** There is a bug in Wasmtime's code generator, Cranelift, for AArch64 targets where constant divisors can result in incorrect division results at runtime. The translation rules for constants did not take into account whether sign or zero-extension should happen, which resulted in an incorrect value being placed into a register when a division was encountered. This means that programs executing within the WebAssembly sandbox would not behave according to the WebAssembly specification, and it is hypothetically possible for execution within the sandbox to go awry and WebAssembly programs could produce unexpected results. This should not impact hosts executing WebAssembly, but does affect the correctness of guest programs. **Recommendations** For Wasmtime versions prior to 0.38.2, upgrade to Wasmtime version 0.38.2. For Cranelift versions prior to 0.85.2, upgrade to cranelift-codegen version 0.85.2. As a temporary workaround for direct users of Cranelift that control the exact Cranelift instructions being compiled, avoid the vulnerability by explicitly extending constant divisors to 64 bits using either the `sextend.i64` or the `uextend.i64` operation.