{"id":"CVE-2024-34704","published":"2024-05-13T19:13:27Z","modified":"2024-08-02T02:59:21Z","title":"era-compiler-solidity contains a `xor(zext(cmp), -1)` misoptimization","vendor":"matter-labs","product":"era-compiler-solidity","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.9,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00466,"percentile":0.41259,"provenance":"source"},"cwes":[{"id":"CWE-682","name":"Incorrect Calculation"}],"references":[{"url":"https://github.com/matter-labs/era-compiler-solidity/security/advisories/GHSA-22pj-7cvw-r3gc","tags":["x_refsource_CONFIRM"]}],"priority":{"score":12.4,"factors":[{"name":"EPSS percentile","points":8.25},{"name":"CVSS severity","points":4.13}]},"vendorSlug":"matter-labs","affectedVersions":[{"vendor":"matter-labs","product":"era-compiler-solidity","versions":[">= 1.2.0, <= 1.4.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2024-05-14T01:22:19.210870Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2024-34999","exploited":false,"provenance":"source"}}