Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(levm): handle sdiv with zero dividend and negative divisor #1241

Merged
merged 4 commits into from
Nov 25, 2024

Conversation

maximopalopoli
Copy link
Contributor

@maximopalopoli maximopalopoli commented Nov 22, 2024

Motivation

Fixes a bug found by FuzzingLabs in sdiv opcode implementation.

Description

The error happened when executing sdiv with a zero dividend and a negative divisor, and returned something that is not zero (it's negated).

Closes #1199

@maximopalopoli maximopalopoli marked this pull request as ready for review November 22, 2024 20:05
@maximopalopoli maximopalopoli requested a review from a team as a code owner November 22, 2024 20:05
@maximopalopoli maximopalopoli self-assigned this Nov 22, 2024
@maximopalopoli maximopalopoli added the levm Lambda EVM implementation label Nov 22, 2024
@ilitteri ilitteri added this pull request to the merge queue Nov 25, 2024
Merged via the queue into main with commit 2bf96b3 Nov 25, 2024
22 checks passed
@ilitteri ilitteri deleted the levm/fix/handle-sdiv-negative-divisor-zero-dividend branch November 25, 2024 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
levm Lambda EVM implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SECURITY] Incorrect Handling of Zero Dividend in SDIV Operation
2 participants