Skip to content
Crypto Write-up Advanced

Zksync Insufficient Proof Verification Bug Fix Review

A vulnerability in zkSync Lite's packed floating point format allowed a malicious user to generate a valid proof with arbitrary mantissa values, bypassing proof verification. This could enable unauthorized token minting, freezing, transferring, transaction tampering, and preventing state tree recovery.

immunefi.com

Published on immunefi.com

On October 5th 2023, security researcher LonelySloth responsibly disclosed a Critical vulnerability in zkSync Lite with multiple impacts, including unauthorized minting, freezing, and transferring of tokens, tampering with transactions, and preventing the recovery of the state tree by other users of the protocol.

The author, on immunefi.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The mantissa variable in the packed floating point parsing was allocated without constraints, allowing arbitrary values to be used in proof generation.

Impact

An attacker could mint, freeze, or transfer tokens without authorization, tamper with transactions, and prevent other users from recovering the state tree.

What the attacker needed

Ability to generate proofs for zkSync Lite

The fix

The vulnerability was fixed by enforcing constraints on the mantissa value using a new method and removing unconstrained allocations.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

zkSync Lite is a system that processes transactions off the main Ethereum chain but uses zero-knowledge proofs to prove they are valid. The bug was that a number used in these proofs could be set to any value without being checked, so an attacker could create a fake proof that looked valid. This could let them do things like create tokens out of thin air or change transaction details.

What is Crypto?

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

Similar reports

View all

Same bug class and techniques, clearest first.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.