THREATINT

We use these services and cookies to improve your user experience. You may opt out if you wish, however, this may limit some features on this site.

Please see our statement on Data Privacy.

Fathom (Privacy friendly web analytics)
Zendesk (Helpdesk and Chat)

Ok

Home | EN
Support
CVE
PUBLISHED

CVE-2024-34704

era-compiler-solidity contains a `xor(zext(cmp), -1)` misoptimization

AssignerGitHub_M
Reserved2024-05-07
Published2024-05-13
Updated2024-06-04

Description

era-compiler-solidity is the ZKsync compiler for Solidity. The problem occurred during instruction selection in the `DAGCombine` phase while visiting the XOR operation. The issue arises when attempting to fold the expression `!(x cc y)` into `(x !cc y)`. To perform this transformation, the second operand of XOR should be a constant representing the true value. However, it was incorrectly assumed that -1 represents the true value, when in fact, 1 is the correct representation, so this transformation for this case should be skipped. This vulnerability is fixed in 1.4.1.



MEDIUM: 5.9CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N

Problem types

CWE-682: Incorrect Calculation

Product status

>= 1.2.0, <= 1.4.0
affected

References

https://github.com/matter-labs/era-compiler-solidity/security/advisories/GHSA-22pj-7cvw-r3gc

cve.org CVE-2024-34704

nvd.nist.gov CVE-2024-34704

Download JSON

Share this page
https://cve.threatint.com/CVE/CVE-2024-34704
© Copyright 2024 THREATINT. Made in Cyprus with +