crypto, version: merge geth v1.16.9 (v1.17.4 sync, milestone 1/6) - #2308
Draft
pratikspatil024 wants to merge 8 commits into
Draft
crypto, version: merge geth v1.16.9 (v1.17.4 sync, milestone 1/6)#2308pratikspatil024 wants to merge 8 commits into
pratikspatil024 wants to merge 8 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 54.24% 54.21% -0.04%
==========================================================
Files 908 908
Lines 162242 162245 +3
==========================================================
- Hits 88014 87966 -48
- Misses 68803 68842 +39
- Partials 5425 5437 +12
... and 17 files with indirect coverage changes
🚀 New features to boost your workflow:
|
Develop-drift cascade, carrying develop's two new commits up the stack: #2347, which drops the pull_request branch filter so the Kurtosis e2e and stateless-e2e workflows run for every PR base, and #2333, which produces complete witnesses under BlockSTM v2. Every branch in the stack needs the merge, not only the base: a pull_request workflow is resolved from the head branch, so the filter removal has to be present on each head ref for the jobs to trigger. Clean at this hop. This branch predates upstream #34106, so develop's witness code still matches the API it was written against.
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