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
[FUZZ] Beaconfuzz_v2 crash-2cf82c9a6bf1e6e9e0609d767f4ea582defd9cf3 in proposer_slashing #74
Comments
Thanks, I'm able to reproduce ;) |
This is a great catch from the structural differential fuzzer, thanks for reporting @Daft-Wullie ! After investigating, it turns out that Prysm implements the From the eth2-specs repo: def process_proposer_slashing(state: BeaconState, proposer_slashing: ProposerSlashing) -> None:
header_1 = proposer_slashing.signed_header_1.message
header_2 = proposer_slashing.signed_header_2.message
# Verify header slots match
assert header_1.slot == header_2.slot
# Verify header proposer indices match
assert header_1.proposer_index == header_2.proposer_index
# Verify the headers are different
assert header_1 != header_2
# Verify the proposer is slashable
proposer = state.validators[header_1.proposer_index]
assert is_slashable_validator(proposer, get_current_epoch(state))
# Verify signatures
for signed_header in (proposer_slashing.signed_header_1, proposer_slashing.signed_header_2):
domain = get_domain(state, DOMAIN_BEACON_PROPOSER, compute_epoch_at_slot(signed_header.message.slot))
signing_root = compute_signing_root(signed_header.message, domain)
assert bls.Verify(proposer.pubkey, signing_root, signed_header.signature)
slash_validator(state, header_1.proposer_index) As you can see, for a proposer slashing to be valid, the two block headers must be different ( The As a result, this particular This discrepancy is not directly exploitable per se, since it would require a malicious actor to be able to produce two different, valid BLS signatures for the same message ( Great find nonetheless! The research team added additional test vectors to the specs repository as a result. Thanks again for reporting this @Daft-Wullie ! |
Can you elaborate on this? Prysm does check the headers are not equal. |
Actually, I see what you are saying now. Sorry for the noise. Fix PR incoming! |
…poser slashings. Resolves sigp/beacon-fuzz#74
…poser slashings (#7252) * Check that the headers are equal while ignoring the signature for proposer slashings. Resolves sigp/beacon-fuzz#74 * fix test Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
I've done and provided the following:
[FUZZ]
issue already refers to that crasherbeacon-fuzz
version or commit used.Info to Reproduce
Command run: e.g.
make fuzz_proposer_slashing-struct
Crasher file name: crash-2cf82c9a6bf1e6e9e0609d767f4ea582defd9cf3
2cf82c9a6bf1e6e9e0609d767f4ea582defd9cf3.zip
Client exercised: prysm(?)
Fuzzing engine used (if applicable): libfuzzer
Crash output and stacktrace
ran
ETH2FUZZ_BEACONSTATE=../eth2fuzz/workspace/corpora/beaconstate cargo +nightly fuzz run struct_proposer_slashing fuzz/artifacts/struct_proposer_slashing/crash-2cf82c9a6bf1e6e9e0609d767f4ea582defd9cf3
and got
Your Environment
The text was updated successfully, but these errors were encountered: