Every captured commit receives deterministic security triage and a separate communication-quality score. Security candidates and broader second-pass signals receive full-patch Ollama analysis.
Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.
This commit only changes tests and clarifies a public comment. It does not alter the actual authentication behavior of the btcd RPC client. The code already only suppresses the internally generated Basic auth header when DisableAuth is tru…
No functional code change; only tests and commentsComment clarification that DisableAuth only suppresses generated Basic auth, not caller-provided Authorization headersTests now cover WebSocket handshake, cookie bypass, and caller-provided headers
This commit only adds new unit tests for an existing feature. It does not change any production code, so it cannot introduce a security vulnerability or fix one directly. The tests verify that an existing option called DisableAuth correctl…
This commit fixes a deadlock risk in btcd's new Bitcoin v2 transport handshake. Previously, the responder waited until it had received the initiator's full 64-byte key before doing any work, which could cause both sides to sit waiting for …
BIP324 handshake deadlock avoidanceCPU admission lease split to prevent resource exhaustion / lock holding across network I/OResponder now sends key material before full initiator key is received
This commit changes how btcd reads base64-encoded PSBT (Partially Signed Bitcoin Transaction) data. Previously, the code read the entire base64 input into memory before decoding, and it wrongly applied the Bitcoin P2P wire message size lim…
Removes an incorrect size bound that caused base64 PSBT parsing to reject valid large packets (denial-of-service / interoperability issue)Switches from full in-memory base64 decode to incremental streaming, reducing peak memory for large base64 PSBTsRetains strict base64 alphabet checks and rejects trailing data after the PSBT packet
This commit fixes a class of crash bugs in btcd's PSBT (Partially Signed Bitcoin Transaction) handling for Taproot transactions. Previously, if certain Taproot-related lists contained a nil (empty) entry, the code would panic when trying t…
nil-pointer dereference / panic prevention in Taproot PSBT finalizernil-pointer dereference / panic prevention in PSBT serializationinput validation added before sort.Slice and pointer dereference
This commit fixes two problems in the way btcd reads Partially Signed Bitcoin Transactions (PSBTs). First, the parser could hang forever when reading from a network connection or pipe because it tried to read one extra byte to check for le…
Denial-of-service via blocking read on open stream (potential infinite hang)Denial-of-service via unbounded memory allocation on base64 input before validationStrict parsing hardening for PSBT base64 decoding
This change tightens how a Bitcoin PSBT library extracts final witness data when turning a partially-signed transaction into a finished transaction. Previously, extra bytes after the declared witness stack were silently ignored. Now the li…
strict parsing of serialized witness datarejection of trailing bytes in PSBT final script witnesspotential malleability / ambiguity reduction in PSBT extraction
This commit adds a new test to the btcd PSBT (Partially Signed Bitcoin Transaction) library. The test checks that when extracting a final Bitcoin transaction from a PSBT, the library rejects a final witness value that has extra trailing by…
Strict parsing of final witness data to reject malformed/trailing bytesPrevents creation of transactions with non-standard witness encodingTest-only commit implies behavior enforcement elsewhere in the codebase
This commit fixes a bug in how btcd parses Schnorr (BIP-340) digital signatures. The code was supposed to reject signatures whose 's' number was larger than the allowed group order, but instead it silently wrapped the value around (modulo …
BIP-340 signature parsing non-compliancesilent modulo reduction of s componentsignature malleability risk from non-canonical encodings
This commit fixes a memory-usage issue, not a security vulnerability. When reading PSBT data, the code was keeping a pointer to a large 4 MiB internal memory block even for tiny scripts. The patch copies the small script into its own compa…
This commit only adds a new test case. It does not change any production code. The test checks that the PSBT parser rejects files that have extra bytes after a valid PSBT packet. Because no code behavior is changed, this commit by itself d…
Test-only commitNo production code changesTests input-validation behavior (trailing data rejection)
This change tightens how base64-encoded PSBT (Partially Signed Bitcoin Transaction) data is decoded. Previously, the decoder could silently ignore extra whitespace or unexpected characters in the base64 stream. Now it rejects anything that…
Strict input validation added for base64 decodingRejection of whitespace/newlines inside base64 payloadUse of strict base64 decoder to enforce RFC4648 padding rules
This commit only adds a new unit test that checks whether the MuSig2 partial signature decoder correctly rejects empty or too-short inputs. It does not change any production code, so by itself it cannot introduce or fix a security vulnerab…
This commit only adds new test code for the PSBT (Partially Signed Bitcoin Transaction) package. It does not change any production code. The tests verify that WitnessUtxo fields are parsed strictly and correctly, including rejecting extra …
Strict parsing tests for WitnessUtxo transaction outputsRejection of trailing data after serialized txOutCorrect handling of multi-byte CompactSize script lengths
This commit only adds a new test file. It does not change any production code. The test checks that the PSBT parser rejects transaction fields that have extra trailing bytes. Because no actual parser logic is modified, this commit by itsel…
Regression test added for strict parsing of transaction-valued PSBT fieldsNo production code changes
This commit only adds new test code to check that the PSBT (Partially Signed Bitcoin Transaction) parser rejects malformed base64 input such as whitespace, bad padding, or extra bytes. It does not change the actual parser logic. The tests …
strict base64 decoding validationPSBT packet format hardeningrejection of non-canonical base64 input
This change makes the PSBT (Partially Signed Bitcoin Transaction) parser reject files or data that have extra bytes after the end of a valid PSBT. Previously, extra trailing data was silently ignored, which could let an attacker hide malic…
Parser no longer ignores trailing bytesCould prevent smuggling of extra data inside PSBT containersCould prevent canonicalization attacks where different byte sequences parse to the same structure
This commit fixes a bug in the MuSig2 multi-signature code where reading a partial signature from an input stream could fail silently. Previously, if the stream ended early or had a read error, the function would return 'no error' as if th…
Silent failure in cryptographic decode pathPartial signature scalar left uninitialized on read errorMuSig2 signing correctness dependency
This commit tightens how a Bitcoin-related library reads transaction outputs stored inside PSBT (Partially Signed Bitcoin Transaction) data. Previously, the code read the output value and script in a loose, hand-rolled way that ignored ext…
Strict canonical parsing of serialized transaction outputsRemoval of hand-rolled length handling that ignored script length byteAddition of full-consumption check on parsed witness UTXO data
This commit adds a new helper function to the PSBT (Partially Signed Bitcoin Transaction) package that checks whether a data reader still has leftover bytes after parsing. Leftover bytes could mean a malformed or malicious PSBT file was no…
New validation helper for trailing/leftover data in a binary parserLocated in PSBT parsing utilities, an area where malformed input handling mattersNo caller added in this commit, so defensive effect is not yet active
Merge pull request #2580 from Roasbeef/version-bump-v0.26.2
build: bump version to v0.26.2-beta
58/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
Why it was queued
merge-commit duplicate discount
Lower-prioritybuild: bump version to v0.26.2-betaby Olaoluwa Osuntokun · d9948c49 · Jul 24, 2026 · 1 fileMessage 80 · StrongTriage 0Details
Commit message · Olaoluwa Osuntokun
build: bump version to v0.26.2-beta
In this commit, we move btcd past the v0.26.1 release candidate and set the development version to v0.26.2-beta. This keeps the daemon and RPC server version on the next patch series as work resumes on master.
80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
Lower-prioritybuild: bump version to v0.26.1-beta.rc1by Olaoluwa Osuntokun · 3fa0a65c · Jul 22, 2026 · 1 fileMessage 80 · StrongTriage 0Details
Commit message · Olaoluwa Osuntokun
build: bump version to v0.26.1-beta.rc1
In this commit, we bump btcd from v0.26.0-beta to v0.26.1-beta.rc1 for the next release candidate. This puts the version reported by the daemon and RPC server in sync with the release series prepared by this PR.
80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
In this commit, we include periods in the alphabet accepted by normalizeVerString. SemVer uses periods to separate pre-release identifiers, but the old filter silently collapsed beta.rc1 into betarc1.
We add a focused test for the dotted RC suffix before using it for the next release candidate.
78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
build: pin tagged submodules and remove local replacements
In this commit, we pin btcutil and wire to their freshly tagged v2.0.1 releases. We also remove the root module's remaining local replace directives now that all three in-tree modules have published versions.
This makes local builds and downstream module consumers resolve the same btcutil, v2transport, and wire code. The regenerated checksums cover each published module.
85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
In this commit, we bump the root module requirement to the freshly tagged v2transport v1.1.0 release. This exposes the responder handshake admission APIs added in #2576 when btcd is built as a downstream module, where the repository-local replace directive does not apply.
88/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
In this commit, we wrap the new DisableAuth regression tests to the btcd 80-column formatting convention. We also split the nested handler setup and assertions into logical stanzas so the tests match the surrounding style.
78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
In this commit, we make the DisableAuth tests observe successful requests instead of inferring them from an empty header. This closes a false-positive path where credential lookup could fail before the request reached the server.
We also cover the WebSocket handshake, cookie bypass, and caller-provided headers across enabled and disabled auth. The public comment now makes clear that DisableAuth only suppresses rpcclient-generated Basic auth.
83/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
defensive validationcredential or privilege stateauthentication path
AI analysis · Informational 12/100
This commit only changes tests and clarifies a public comment. It does not alter the actual authentication behavior of the btcd RPC client. The code already only suppresses the internally generated Basic auth header when DisableAuth is true; the commit makes the tests check that real requests succeed and confirms caller-provided Authorization headers are still sent. There is no security fix here.
rpcclient: make HTTP Basic Auth optional via DisableAuth
Add a DisableAuth field to ConnConfig that, when set to true, skips setting the Authorization header on RPC requests.
This enables connecting to third-party RPC providers (e.g. Alchemy, GetBlock) that authenticate via API key in the URL path and reject requests containing an Authorization header with 401 errors.
Previously, getAuth() unconditionally set BasicAuth or attempted cookie auth, leaving no way to disable authentication entirely.
Fixes #2505
86/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
rpcclient: add tests for DisableAuth header behavior
Add table-driven tests that verify: - Authorization header is omitted when DisableAuth is true - Authorization header is present when DisableAuth is false - Default (zero value) behavior includes Authorization header
Suggested by @TechLateef in #2514.
96/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
access controlauthentication path
AI analysis · Informational 15/100
This commit only adds new unit tests for an existing feature. It does not change any production code, so it cannot introduce a security vulnerability or fix one directly. The tests verify that an existing option called DisableAuth correctly controls whether the RPC client sends an Authorization header.
integration: stabilize pre-verack disconnect cycles
In this commit, we make the pre-verack lifecycle test count only peers that btcd has admitted and processed through version exchange.
The source handshake limit can close a rapid follow-up socket while the previous disconnect is still unwinding. This made the client-side version write fail with EPIPE before the intended lifecycle path ran. We now wait for a version response from btcd, retry rejected attempts under a deadline, and still disconnect without sending verack.
This preserves all 50 peerDone without peerAdd cycles while removing the scheduler-dependent admission race from the test.
83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
In this commit, we reject maxpeers values that cannot represent a usable peer budget.
A zero value reached connmgr as TargetOutbound=0, where zero means to use the default target of eight. The server then rejected every completed peer and immediately created a replacement request. Rejecting the value during configuration avoids that outbound reconnect loop.
68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
server+connmgr: make outbound startup deterministic
In this commit, we define TargetOutbound as the number of automatic connections and treat explicit Connect requests as additional peers.
Permanent requests could previously consume connection IDs before Start sampled the shared counter. The resulting automatic count depended on goroutine scheduling, while the listener reserved the worst-case total. We now start the configured automatic count directly and cap it by the peer budget left after permanent peers.
The composition test covers permanent requests on both sides of Start and pins the same automatic+permanent total for either ordering.
83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
In this commit, we make each stress wave establish its full set of peers before disconnecting them together. A ping/pong barrier proves the server processed each verack, while RPC connection-count barriers prove registration and removal completed before the next wave starts.
We bound concurrent handshakes from the shared source, drain every worker on failure, and wait for server-side cleanup. This keeps the test compatible with the admission limits it exercises and makes a passing run evidence of the intended NewPeer/DonePeer ordering.
83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
In this commit, we send the responder key as soon as the initiator diverges from the v1 prefix. This avoids the BIP324 deadlock where both sides can wait for the other to write before the initiator has sent its complete 64-byte key.
We split key generation and key agreement into separate admission leases, and release each lease before the intervening network I/O. The regression test stops after the first mismatch, requires the responder to make progress, then completes key agreement and verifies the resulting packet ciphers interoperate.
78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
secret or key material
AI analysis · Low 48/100
This commit fixes a deadlock risk in btcd's new Bitcoin v2 transport handshake. Previously, the responder waited until it had received the initiator's full 64-byte key before doing any work, which could cause both sides to sit waiting for each other. The change makes the responder send its own key earlier, after the first byte that differs from the old v1 protocol, and splits expensive cryptographic work into two separately rate-limited phases so the CPU lock is not held across network reads or writes. It is a protocol correctness/DoS-resilience fix rather than a direct theft-of-funds bug.
In this commit, we keep loopback and whitelisted peers inside the ordinary pending-handshake and V2 source budgets, while preserving their existing no-ban behavior.
We also derive the listener reservation from the configured peer mode. Connect-only and simnet nodes now reserve just their permanent peers, while automatic mode accounts for both its target and addpeers without exceeding MaxPeers.
Finally, a bound V2 handshake consumes its rate budgets once, but reacquires the concurrency slot for each CPU-bound responder phase. This keeps rate limiting scoped to the handshake while bounding both expensive phases.
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
In this commit, we decode base64 PSBT packets as a stream instead of reading the full encoded input into memory first.
The previous aggregate bound reused wire.MaxMessagePayload, even though BIP-174 doesn't bind PSBT packet size to the P2P message limit. This made the base64 path reject packets that the raw path accepted. We now feed decoded bytes through the same per-field parser used for raw packets, while retaining strict base64 and trailing-data checks.
We also add a regression test with nine individually valid 4,000,000-byte unknown values to pin raw and base64 parsing to the same behavior.
78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
signing boundaryaccess controlfuzzing or regression evidencesigning or wallet path
AI analysis · Low 41/100
This commit changes how btcd reads base64-encoded PSBT (Partially Signed Bitcoin Transaction) data. Previously, the code read the entire base64 input into memory before decoding, and it wrongly applied the Bitcoin P2P wire message size limit to PSBT packets. That caused the base64 parser to reject large but otherwise valid PSBTs that the raw binary parser would accept. The new code decodes base64 incrementally as a stream, removes the wire-size bound for base64 PSBTs, and still rejects whitespace, non-canonical characters, and trailing data. A regression test confirms that nine 4 MB unknown fields are accepted via both raw and base64 paths.
address: reject v2-v16 segwit addresses encoded with bech32
BIP-350 requires that segregated witness outputs of version 1 through 16 use the bech32m checksum, while only version 0 uses bech32. decodeSegWitAddress only special-cased versions 0 and 1, so a witness program with version 2-16 encoded using the legacy bech32 checksum decoded successfully, in violation of the spec and contrary to the BIP-350 reference decoder (which rejects any non-zero witness version that is not bech32m).
Generalize the version 1 check to cover all versions >= 1, matching the reference decode() function. Add the relevant BIP-350 INVALID_ADDRESS vectors (v2 and v16 encoded with bech32) as a regression test; they decoded successfully before this change and are now rejected.
In this commit, we extend taproot PSBT serialization and finalization to reject nil script spend signatures, leaf scripts, and BIP32 derivations before any sort or dereference. We return wrapped ErrInvalidPsbtFormat errors so callers can identify malformed packet state without parsing strings.
We also make FindLeafScript reject nil inputs and leaf entries. This keeps both the direct finalizer and MaybeFinalize paths from panicking on malformed in-memory packets.
68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
secret or key materialsigning boundarysigning or wallet path
AI analysis · Moderate 60/100
This commit fixes a class of crash bugs in btcd's PSBT (Partially Signed Bitcoin Transaction) handling for Taproot transactions. Previously, if certain Taproot-related lists contained a nil (empty) entry, the code would panic when trying to sort, read, or finalize the transaction. The patch now rejects these malformed entries early with a proper error instead of crashing the program. It is a defensive hardening fix rather than a direct theft-of-funds vulnerability, but a crash in a wallet or node could still be disruptive.
multi: parse own-DB blocks leniently in getblock and indexer init
In this commit, we extend the lenient database block parser to the remaining call sites that re-read blocks from the node's own database.
The getblock RPC now copies FetchBlock bytes before its read transaction ends, since database buffers are not valid outside that lifetime. We then strip any legacy trailing data and serve the exact block serialization at every verbosity level. A regression database invalidates its buffer as View returns, pinning the required copy.
The index manager uses the same parser while rolling an index tip back to the main chain. We also place DBBlockFromBytes before its first caller and log legacy trailing data at debug level, since a frequently fetched dirty block should not flood operator logs.
83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
defensive validation
Security candidatepeer: close late connections after disconnectby Boris Nagaev · 617ebe2b · Jul 18, 2026 · 2 filesMessage 78 · AdequateTriage 18Details
Commit message · Boris Nagaev
peer: close late connections after disconnect
In this commit, we serialize connection association with peer disconnection. Previously, Disconnect could run before AssociateConnection, close quit without a socket, and leave a later connection published with no remaining path that could close it.
We now close connections handed to a peer that is already disconnecting, and publish the connected flag only after the socket and connection time are initialized. The tests pin both call orderings and race the transitions to verify the socket closes exactly once.
78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
In this commit, we introduce a server-wide admission policy for incomplete inbound handshakes and the CPU-bound portion of v2 responder setup. Source accounting uses normalized IPv4 and IPv6 prefixes, while global, per-source, and concurrent v2 budgets remain independent and bounded.
Peer construction passes the policy through a small interface only for inbound v2 responders. Handshake slots release on verack or disconnect, and the connection manager reserves MaxPeers capacity for automatic outbound peers.
68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
In this commit, we split the responder handshake into transport classification, key setup, and wire completion phases. This lets callers install a narrow admission interface after the full v2 candidate is available, while preserving NewPeer compatibility and the existing transcript.
We also propagate handshake write failures, reject short writes, and cover v1 fallback, incomplete candidates, admission lifetime, and end-to-end v2 interoperability.