Arbitrary Code Execution Affecting cranelift-codegen package, versions <0.85.2


0.0
medium

Snyk CVSS

    Attack Complexity High
    Integrity High
Expand this section
NVD
7.5 high

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-RUST-CRANELIFTCODEGEN-2958082
  • published 22 Jul 2022
  • disclosed 22 Jul 2022
  • credit Unknown

How to fix?

Upgrade cranelift-codegen to version 0.85.2 or higher.

Overview

cranelift-codegen is a translates code from an intermediate representation into executable machine code.

Affected versions of this package are vulnerable to Arbitrary Code Execution. 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.