crypto, version: merge geth v1.16.9 (v1.17.4 sync, milestone 1/6)#2308
Draft
pratikspatil024 wants to merge 6 commits into
Draft
crypto, version: merge geth v1.16.9 (v1.17.4 sync, milestone 1/6)#2308pratikspatil024 wants to merge 6 commits into
pratikspatil024 wants to merge 6 commits into
Conversation
Fix ECIES invalid-curve handling in RLPx handshake (reject invalid ephemeral pubkeys early) - Add curve validation in crypto/ecies.GenerateShared to reject invalid public keys before ECDH. - Update RLPx PoC test to assert invalid curve points fail with ErrInvalidPublicKey. Motivation / Context RLPx handshake uses ECIES decryption on unauthenticated network input. Prior to this change, an invalid-curve ephemeral public key would proceed into ECDH and only fail at MAC verification, returning ErrInvalidMessage. This allows an oracle on decrypt success/failure and leaves the code path vulnerable to invalid-curve/small-subgroup attacks. The fix enforces IsOnCurve validation up front.
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## upstream-merge-v1.17.4 #2308 +/- ##
==========================================================
+ Coverage 53.73% 53.74% +0.01%
==========================================================
Files 898 898
Lines 160630 160633 +3
==========================================================
+ Hits 86308 86330 +22
+ Misses 68955 68933 -22
- Partials 5367 5370 +3
... and 22 files with indirect coverage changes
🚀 New features to boost your workflow:
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Important
Merge with a merge commit — do not squash. This PR carries upstream go-ethereum history; squashing would collapse upstream authorship and break future syncs.
Summary
First milestone of the geth v1.16.8 → v1.17.4 upstream sync (plan:
docs/upstream-merges/v1.17.4/plan.md, decision ledger:docs/upstream-merges/v1.17.4/ledger.md). Merges upstream tag v1.16.9 (3 commits, crypto security backports) into the sync base branch.Conflict resolutions (all operator-reviewed, details in the ledger):
crypto/ecies/ecies.go— took upstream'sIsOnCurvevalidation inGenerateShared(invalid-curve guard Bor lacked; upstream #33669).crypto/secp256k1/curve.go— kept Bor's text; Bor had pre-applied the identical coordinate check.crypto/secp256k1/ext.h— took upstream's combined fail-closed form; semantically identical to Bor's pre-applied fix.Auto-merged:
version/version.go(geth base marker 1.16.8 → 1.16.9),crypto/signature_nocgo.go(identical to Bor's side).Executed tests
go build ./...— clean.go test ./crypto/...— all packages pass (crypto, blake2b, bn256/*, ecies, kzg4844, secp256k1, signify).Rollout notes
Not consensus-affecting: crypto input-validation hardening only (ECIES invalid-curve rejection, secp256k1 coordinate canonicality). No hardfork surfaces touched. Backwards-compatible; no coordinated upgrade needed. Targets the sync base branch
upstream-merge-v1.17.4, notdevelop.🤖 Generated with Claude Code