fix(crypto): migrate signature_nocgo + secp fuzzer to btcec/v2 - #2
Open
nebojsa94 wants to merge 1 commit into
Open
fix(crypto): migrate signature_nocgo + secp fuzzer to btcec/v2#2nebojsa94 wants to merge 1 commit into
nebojsa94 wants to merge 1 commit into
Conversation
The deprecated github.com/btcsuite/btcd/btcec (v1) package was removed upstream in btcd v0.23.0, pinning consumers to btcd v0.22.x which carries CVE-2022-44797 (btcd/wire). Port the btcec/v2 implementation from upstream go-ethereum for the !cgo signature path, switch the secp256k1 fuzzer to btcec/v2, and bump btcd to v0.24.2. No behavior change on the default cgo build. Verified via CGO_ENABLED=0 crypto build + tests.
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.
Why
The deprecated
github.com/btcsuite/btcd/btcec(v1) package was removed upstream in btcd v0.23.0, so consumers of this fork stay pinned to btcd v0.22.x carrying CVE-2022-44797 (btcd/wire). This ports thebtcec/v2implementation from upstream go-ethereum for the!cgosignature path (crypto/signature_nocgo.go), switches the secp256k1 fuzzer tobtcec/v2, and bumps btcd to v0.24.2.Change kept minimal (targeted
go get, not a fullgo mod tidy, since the committed module was already un-tidy w.r.t. an unrelatedethereum/go-ethereumfuzzer import — left untouched). No behavior change on the default cgo build. Unblocks the btcd security bump in tenderly-core (ethereum#24787).Tests
CGO_ENABLED=0 go build ./crypto/— passCGO_ENABLED=0 go test ./crypto/ -run 'Sign|Verify|Recover|Pubkey|Compress|Decompress'— passServices affected
None directly; module-graph only.