Wasmtime up to 0.38.1 Cranelift incorrect calculation

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
6.3$0-$5k0.00

Summaryinfo

A vulnerability has been found in Wasmtime up to 0.38.1 and classified as critical. This impacts an unknown function of the component Cranelift. The manipulation of the argument incorrect leads to calculation. This vulnerability is documented as CVE-2022-31169. The attack can be initiated remotely. There is not any exploit available. The affected component should be upgraded.

Detailsinfo

A vulnerability, which was classified as critical, has been found in Wasmtime up to 0.38.1. This issue affects an unknown part of the component Cranelift. The manipulation of the argument incorrect with an unknown input leads to a calculation vulnerability. Using CWE to declare the problem leads to CWE-682. The product performs a calculation that generates incorrect or unintended results that are later used in security-critical decisions or resource management. Impacted is confidentiality, integrity, and availability. The summary by CVE is:

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.

The weakness was released 07/22/2022 as GHSA-7f6x-jwh5-m9r4. It is possible to read the advisory at github.com. The identification of this vulnerability is CVE-2022-31169 since 05/18/2022. Technical details of the vulnerability are known, but there is no available exploit.

Upgrading to version 0.38.2 eliminates this vulnerability. Applying the patch 2ba4bce5cc719e5a74e571a534424614e62ecc41 is able to eliminate this problem. The bugfix is ready for download at github.com. The best possible mitigation is suggested to be upgrading to the latest version.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Productinfo

Name

Version

License

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 6.3
VulDB Meta Temp Score: 6.3

VulDB Base Score: 5.6
VulDB Temp Score: 5.4
VulDB Vector: 🔍
VulDB Reliability: 🔍

NVD Base Score: 7.5
NVD Vector: 🔍

CNA Base Score: 5.9
CNA Vector (GitHub, Inc.): 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

Exploitinginfo

Class: Calculation
CWE: CWE-682
CAPEC: 🔍
ATT&CK: 🔍

Physical: No
Local: No
Remote: Yes

Availability: 🔍
Status: Not defined

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔍

Upgrade: Wasmtime 0.38.2
Patch: 2ba4bce5cc719e5a74e571a534424614e62ecc41

Timelineinfo

05/18/2022 🔍
07/22/2022 +65 days 🔍
07/22/2022 +0 days 🔍
08/20/2022 +29 days 🔍

Sourcesinfo

Advisory: GHSA-7f6x-jwh5-m9r4
Status: Confirmed

CVE: CVE-2022-31169 (🔍)
GCVE (CVE): GCVE-0-2022-31169
GCVE (VulDB): GCVE-100-204851

Entryinfo

Created: 07/22/2022 09:02
Updated: 08/20/2022 07:54
Changes: 07/22/2022 09:02 (53), 08/20/2022 07:54 (11)
Complete: 🔍
Cache ID: 216::103

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you want to use VulDB in your project?

Use the official API to access entries easily!