-
Notifications
You must be signed in to change notification settings - Fork 454
fix: task replay directed at same operator set #1629
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a security vulnerability where certificates could be replayed across different tasks directed at the same operator set. The fix changes the message hash from being based solely on the result to including both the task hash and result, preventing cross-task certificate replay attacks.
- Updates message hash calculation to include task hash in addition to result data
- Adds new test cases to verify certificate replay attacks are prevented
- Updates all existing test helper functions and test cases to use the new message hash format
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/contracts/avs/task/TaskMailbox.sol | Implements new getMessageHash function and updates certificate verification to use task-specific message hashes |
| src/contracts/interfaces/ITaskMailbox.sol | Adds interface declaration for the new getMessageHash function |
| src/test/unit/TaskMailboxUnit.t.sol | Updates test helper functions and adds comprehensive test coverage for certificate replay prevention |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
ypatil12
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment
**Motivation:** Bumping up the core submodule to pull in the following changes: Layr-Labs/eigenlayer-contracts#1629 **Modifications:** * Latest `eigenlayer-contracts` changes **Result:** Fixes SigmaPrime: `ELHG-02` finding.
**Motivation:** Bumping up the core submodule to pull in the following changes: Layr-Labs/eigenlayer-contracts#1629 **Modifications:** * Latest `eigenlayer-contracts` changes **Result:** Fixes SigmaPrime: `ELHG-02` finding.
Motivation:
Fixing a bug where a random actor could permissionlessly call
TaskMailbox::submitResultwith an old cert+result combination (as long as the cert is not stale) but for a completely different task directed at the same operator set in the TaskMailbox. This could lead to DoS of the taskCreator.Modifications:
The
messageHashof the cert now iskeccak256(abi.encode(taskHash, result))instead of justkeccak256(result). This ensures that the messageHash is applicable only for a specific task and can't be replayed across tasks.Result:
Fixes
SigmaPrime: ELHG-02finding.