This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Fix unaligned read of short_vec pubkey_size in sigverify#6388
Merged
solana-grimes merged 3 commits intosolana-labs:masterfrom Oct 16, 2019
Merged
Fix unaligned read of short_vec pubkey_size in sigverify#6388solana-grimes merged 3 commits intosolana-labs:masterfrom
solana-grimes merged 3 commits intosolana-labs:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6388 +/- ##
========================================
+ Coverage 72.7% 77.4% +4.7%
========================================
Files 219 209 -10
Lines 45244 40004 -5240
========================================
- Hits 32901 30972 -1929
+ Misses 12343 9032 -3311 |
CriesofCarrots
previously approved these changes
Oct 16, 2019
Contributor
CriesofCarrots
left a comment
There was a problem hiding this comment.
One nit, but lgtm
![]()
|
|
||
| let message = Message { | ||
| header: MessageHeader { | ||
| num_required_signatures: required_num_sigs as u8, |
Contributor
There was a problem hiding this comment.
Don't need this cast
Pull request has been modified.
Contributor
Author
yay! |
Contributor
|
@ryoqun thanks! |
Contributor
|
Yes looks good. Thanks for splitting it out into this commit, it was much easier to understand the change. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(This is split from #6236 as requested by @sakridge !)
Problem
sigverify's deserialization is wrong in a corner case; most of time it works as intended.From https://github.com/solana-labs/solana/pull/6236/files#r333704395
Solution
Shift the offset correctly, taking
size_ofMessageHeaderinto account.