Off-by-one Error Affecting cranelift-codegen package, versions >=0.88.0 <0.91.1 >=0.92.0 <0.92.1 >=0.93.0 <0.93.1
Threat Intelligence
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-3357685
- published 9 Mar 2023
- disclosed 9 Mar 2023
- credit afonso360
Introduced: 9 Mar 2023
CVE-2023-27477 Open this link in a new tabHow to fix?
Upgrade cranelift-codegen to version 0.91.1, 0.92.1, 0.93.1 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 Off-by-one Error in the calculation of the mask to the pshufb instruction.
The vulnerability exists due to a bug on x86_64 platforms for the WebAssembly i8x16.select instruction, which will produce the wrong results when the same operand is provided to the instruction and some of the selected indices are greater than 16.
Workaround
If upgrading is not an option for you at this time, you can avoid this miscompilation by disabling the Wasm simd proposal
config.wasm_simd(false);
Additionally, the bug is only present on x86_64 hosts. Other platforms such as AArch64 and s390x are not affected.