CVEfocus › CVE database › CVE-2022-31169

CVE-2022-31169Cranelift vulnerable to miscompilation of constant values in division on AArch64

CVSS 5.9 MediumEPSS 1.0% (higher than 61% of CVEs)Published 2022-07-21Updated 2025-04-23Assigner: GitHub_M

Wasmtime is a standalone runtime for WebAssembly. There is a bug in Wasmtime's code generator, Cranelift, for AArch64 targets where constant divisors can result in incorrect division results at runtime. This affects Wasmtime prior to version 0.38.2 and Cranelift prior to 0.85.2. This issue only affects the AArch64 platform. Other platforms are not affected. 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. The impact of this bug is that programs executing within the WebAssembly sandbox would not behave according to the WebAssembly specification. This means that 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. This bug has been patched in Wasmtime version 0.38.2 and cranelift-codegen 0.85.2. There are no known workarounds.

CWE-682

What to do

Fixed builds are available from crates.io: see the table below for the fixed version per release.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

2Fixed
16Will not fix
2Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 24.04firefoxNot affected
vulnerable_code_not_present
Ubuntu 24.04thunderbirdWill not fix
mozjs contains a copy of the SpiderMonkey JavaScript engine starting with Ubuntu 22.04, the firefox package is just a script that installs the Firefox snap…
UBUNTU-CVE-2022-31169
Ubuntu 22.04firefoxNot affected
vulnerable_code_not_present
Ubuntu 22.04mozjs78Will not fix
mozjs contains a copy of the SpiderMonkey JavaScript engine starting with Ubuntu 22.04, the firefox package is just a script that installs the Firefox snap…
UBUNTU-CVE-2022-31169
Ubuntu 22.04mozjs91Will not fix
mozjs contains a copy of the SpiderMonkey JavaScript engine starting with Ubuntu 22.04, the firefox package is just a script that installs the Firefox snap…
UBUNTU-CVE-2022-31169
Ubuntu 22.04thunderbirdWill not fix
mozjs contains a copy of the SpiderMonkey JavaScript engine starting with Ubuntu 22.04, the firefox package is just a script that installs the Firefox snap…
UBUNTU-CVE-2022-31169
Ubuntu 20.04firefoxWill not fix
mozjs contains a copy of the SpiderMonkey JavaScript engine starting with Ubuntu 22.04, the firefox package is just a script that installs the Firefox snap…
Ubuntu 20.04mozjs52Will not fix
mozjs contains a copy of the SpiderMonkey JavaScript engine starting with Ubuntu 22.04, the firefox package is just a script that installs the Firefox snap…
UBUNTU-CVE-2022-31169
Ubuntu 20.04mozjs68Will not fix
mozjs contains a copy of the SpiderMonkey JavaScript engine starting with Ubuntu 22.04, the firefox package is just a script that installs the Firefox snap…
UBUNTU-CVE-2022-31169
Ubuntu 20.04thunderbirdWill not fix
mozjs contains a copy of the SpiderMonkey JavaScript engine starting with Ubuntu 22.04, the firefox package is just a script that installs the Firefox snap…
Ubuntu 18.04firefoxWill not fix
mozjs contains a copy of the SpiderMonkey JavaScript engine starting with Ubuntu 22.04, the firefox package is just a script that installs the Firefox snap…
Ubuntu 18.04mozjs38Will not fix
mozjs contains a copy of the SpiderMonkey JavaScript engine starting with Ubuntu 22.04, the firefox package is just a script that installs the Firefox snap…
UBUNTU-CVE-2022-31169
Ubuntu 18.04mozjs52Will not fix
mozjs contains a copy of the SpiderMonkey JavaScript engine starting with Ubuntu 22.04, the firefox package is just a script that installs the Firefox snap…
UBUNTU-CVE-2022-31169
Ubuntu 18.04thunderbirdWill not fix
mozjs contains a copy of the SpiderMonkey JavaScript engine starting with Ubuntu 22.04, the firefox package is just a script that installs the Firefox snap…
Ubuntu 16.04firefoxWill not fix
mozjs contains a copy of the SpiderMonkey JavaScript engine starting with Ubuntu 22.04, the firefox package is just a script that installs the Firefox snap…
Ubuntu 16.04thunderbirdWill not fix
mozjs contains a copy of the SpiderMonkey JavaScript engine starting with Ubuntu 22.04, the firefox package is just a script that installs the Firefox snap…
Ubuntu 14.04firefoxWill not fix
mozjs contains a copy of the SpiderMonkey JavaScript engine starting with Ubuntu 22.04, the firefox package is just a script that installs the Firefox snap…
Ubuntu 14.04thunderbirdWill not fix
mozjs contains a copy of the SpiderMonkey JavaScript engine starting with Ubuntu 22.04, the firefox package is just a script that installs the Firefox snap…
crates.io librarycranelift-codegenFixed0.85.2GHSA-7f6x-jwh5-m9r4
crates.io librarywasmtimeFixed0.33.1RUSTSEC-2022-0101

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.