Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2024-45056— `fold (xor (shl 1, x), -1) -> (rotl ~1, x)` misoptimization in zksolc

Quick assessment

Affected
matter-labs era-compiler-solidity
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

ZKsync Era是Matter Labs开源的一个编译器。 ZKsync Era 1.5.3之前版本存在安全漏洞,该漏洞源于LLVM在优化过程中对特定指令处理不当,导致数值扩展错误,影响了EraVM上的合约执行。

CVSS 5.9 · Medium EPSS 0.40% · P32

Possible ATT&CK Techniques 1 AI

T1068 · Exploitation for Privilege Escalation
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2024-45056

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
`fold (xor (shl 1, x), -1) -> (rotl ~1, x)` misoptimization in zksolc
Source: CVE Program / CVE List V5
Vulnerability Description
zksolc is a Solidity compiler for ZKsync. All LLVM versions since 2015 fold `(xor (shl 1, x), -1)` to `(rotl ~1, x)` if run with optimizations enabled. Here `~1` is generated as an unsigned 64 bits number (`2^64-1`). This number is zero-extended to 256 bits on EraVM target while it should have been sign-extended. Thus instead of producing `roti 2^256 - 1, x` the compiler produces `rotl 2^64 - 1, x`. Analysis has shown that no contracts were affected by the date of publishing this advisory. This issue has been addressed in version 1.5.3. Users are advised to upgrade and redeploy all contracts. There are no known workarounds for this vulnerability.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
Source: CVE Program / CVE List V5
Vulnerability Type
数值计算不正确
Source: CVE Program / CVE List V5
Vulnerability Title
ZKsync Era 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
ZKsync Era是Matter Labs开源的一个编译器。 ZKsync Era 1.5.3之前版本存在安全漏洞,该漏洞源于LLVM在优化过程中对特定指令处理不当,导致数值扩展错误,影响了EraVM上的合约执行。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
matter-labs era-compiler-solidity < 1.5.3 -

II. Public POCs for CVE-2024-45056

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2024-45056

请登录查看更多情报信息。

Vendor Advisories for CVE-2024-45056 (1)

IV. Related Vulnerabilities

V. Comments for CVE-2024-45056

No comments yet


Leave a comment