fix panic on bad tx sender #195
Merged
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.
Transaction pool would panic on processing a tx with a bad sig.
I can push an example branch with a script showing the panic but it required exporting a
BadSigfunction fromchain/types/transaction.gofor convenience (of course, an attacker could just hand craft the rlp tx bytes himself to trigger this). I suppose I should add atransaction_pool_test.gowith a bunch of handcrafted malicious txs. Here's the fix in the meantime. Have I missed something, or was there no signature check up to now?Note the panic was on the
GetAccount, which ultimately triggered https://github.com/ethereum/go-ethereum/blob/develop/trie/trie.go#L299