CVE-2024-34704
published medium CVSS 3.1 · 5.9era-compiler-solidity contains a `xor(zext(cmp), -1)` misoptimization
Package status and fixes
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 5.9 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| matter-labs | era-compiler-solidity | >= 1.2.0, <= 1.4.0 (affected) | GitHub_M · cna |
| matter-labs | era-compiler-solidity | 1.2.0 to < 1.4.1 (affected · custom)Default: unknown | CISA-ADP · adp |
Weaknesses
1- CWE-682 CWE-682: Incorrect Calculation
References
1Provider assertions
3GitHub_M · cna
era-compiler-solidity contains a `xor(zext(cmp), -1)` misoptimization
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 16803c67abce44296c99b908781f1658346b51958f87ed9a752284b1e73df46a
- Ingested
- 23 Sep 2026, 08:23:37 UTC
- Source record
- Official CVE record