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

VerifyBlockJustification() Does Not Verify Justification Hash Relates to Block Being Justified (GSR-17) #2414

Closed
danforbes opened this issue Mar 21, 2022 · 0 comments · Fixed by #2619
Assignees

Comments

@danforbes
Copy link
Contributor

The function VerifyBlockJustification(hash common.Hash, justification []byte) verifies that a justification justifies a block with hash.

There is no check to ensure that Justification.Hash equals hash . As a result it is possible that this justification is for a future block.

Substrate performs this check to ensure the justification of for this specific block and thus will reject justifications that are accepted by Gossamer.

The impact is rated low as the verification will only succeed if there are sufficient votes for a descendant of hash and thus a future block is already finalised.

Consider including a check that ensures the justification is for this specific block. That is, ensure Justification.Hash equals hash. Alternatively, it's possible that the specification could be updated to allow justifications for descendants to be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants