Skip to content

crypto, version: merge geth v1.16.9 (v1.17.4 sync, milestone 1/6)#2308

Draft
pratikspatil024 wants to merge 6 commits into
upstream-merge-v1.17.4from
ppatil-upstream-v1.16.9
Draft

crypto, version: merge geth v1.16.9 (v1.17.4 sync, milestone 1/6)#2308
pratikspatil024 wants to merge 6 commits into
upstream-merge-v1.17.4from
ppatil-upstream-v1.16.9

Conversation

@pratikspatil024

Copy link
Copy Markdown
Member

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's IsOnCurve validation in GenerateShared (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).
  • No conflict markers / unmerged paths; full CI on this PR is the milestone gate.

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, not develop.

🤖 Generated with Claude Code

fengjian and others added 6 commits February 17, 2026 17:03
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

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.74%. Comparing base (3e44cf1) to head (452398d).

Files with missing lines Patch % Lines
crypto/ecies/ecies.go 0.00% 2 Missing and 1 partial ⚠️

❌ 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

Impacted file tree graph

@@                    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     
Files with missing lines Coverage Δ
crypto/ecies/ecies.go 71.06% <0.00%> (-1.10%) ⬇️

... and 22 files with indirect coverage changes

Files with missing lines Coverage Δ
crypto/ecies/ecies.go 71.06% <0.00%> (-1.10%) ⬇️

... and 22 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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 this pull request may close these issues.

3 participants