CVEfocus › CVE database › CVE-2024-45056

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

CVSS 5.9 MediumEPSS 0.6% (higher than 43% of CVEs)Published 2024-08-29Updated 2024-08-29Assigner: GitHub_M

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.

CWE-682

What to do

None of the Linux distributions or Windows releases we track list an affected package for this CVE. Check the vendor-reported products below.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

19Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 24.04llvm-toolchain-14Not affected
vulnerable_code_not_present
Ubuntu 24.04llvm-toolchain-15Not affected
vulnerable_code_not_present
Ubuntu 24.04llvm-toolchain-16Not affected
vulnerable_code_not_present
Ubuntu 24.04llvm-toolchain-17Not affected
vulnerable_code_not_present
Ubuntu 24.04llvm-toolchain-18Not affected
vulnerable_code_not_present
Ubuntu 24.04llvm-toolchain-19Not affected
vulnerable_code_not_present
Ubuntu 22.04llvm-toolchain-11Not affected
vulnerable_code_not_present
Ubuntu 22.04llvm-toolchain-12Not affected
vulnerable_code_not_present
Ubuntu 22.04llvm-toolchain-13Not affected
vulnerable_code_not_present
Ubuntu 22.04llvm-toolchain-14Not affected
vulnerable_code_not_present
Ubuntu 22.04llvm-toolchain-15Not affected
vulnerable_code_not_present
Ubuntu 20.04llvm-toolchain-10Not affected
vulnerable_code_not_present
Ubuntu 20.04llvm-toolchain-11Not affected
vulnerable_code_not_present
Ubuntu 20.04llvm-toolchain-12Not affected
vulnerable_code_not_present
Ubuntu 20.04llvm-toolchain-18Not affected
vulnerable_code_not_present
Ubuntu 20.04llvm-toolchain-6.0Not affected
vulnerable_code_not_present
Ubuntu 20.04llvm-toolchain-7Not affected
vulnerable_code_not_present
Ubuntu 20.04llvm-toolchain-8Not affected
vulnerable_code_not_present
Ubuntu 20.04llvm-toolchain-9Not affected
vulnerable_code_not_present

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.