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 pins the exact versions of Python testing tools used by the project's automated tests. Previously, the test setup allowed any newly released version of those tools to be installed automatically, which could introduce unexpected…
Supply-chain risk reduction for test/CI dependenciesPrevents unreviewed automatic upgrades of speculos and raggerNo change to firmware or published package code
This commit is a routine version bump from 2.5.1 to 2.6.0 in the Ledger Bitcoin app. It only updates the version number in the Makefile and the release date in the CHANGELOG. There are no code changes, no bug fixes, and no security-related…
This commit tightens how the Ledger Bitcoin app and its companion client libraries read PSBT (Partially Signed Bitcoin Transaction) data. It adds checks that reject malformed or suspicious PSBTs: truncated fields, unexpected extra bytes af…
Hardened PSBT deserialization against truncation and trailing dataAdded duplicate-key detection in PSBT mapsRejected PSBTv2-only fields inside PSBTv0 to prevent locktime/field override attacks
This commit tightens input validation in the Python helper library that prepares Bitcoin transaction data for Ledger hardware wallets. It now rejects PSBT files that claim to be the older version 0 format but contain fields that only belon…
Input-validation hardening: stricter parsing of PSBT version 0 to reject v2-only key typesConsistency fix across clients: aligns Python client with HS and Rust client behaviorLocktime normalization during v0-to-v2 conversion to prevent per-input locktime from overriding transaction locktime
This commit updates a test helper file used to talk to a Bitcoin node during automated testing. The old helper could accidentally send the same command twice if the network connection hiccuped, which could cause a test-only action like sen…
Removed transparent retry of non-idempotent RPC requests after connection resetsTest helper could execute state-changing RPCs twice before the fixNew connection-per-call configuration mitigates idle-timeout disconnects without retry risk
This commit fixes the JavaScript PSBT (Partially Signed Bitcoin Transaction) parser in Ledger's Bitcoin app so it now rejects malformed PSBTs that contain duplicate keys or extra trailing bytes. Previously, such malformed data could be acc…
BIP-174 non-compliance: duplicate keys and trailing data were previously acceptedState reuse bug: deserializing multiple PSBTs in the same instance could merge mapsInput validation gap in client-side PSBT parsing
This commit fixes the automated test harness, not the Ledger Bitcoin app itself. Previously, the test framework could silently pass even when the device completed a request without showing the expected on-screen review. The change makes te…
Test-hardening only: no firmware or runtime application code changedFixes false-negative test results where a request could succeed without expected UI reviewCorrects scope of navigation settings to avoid leaking across nested or subsequent calls
This commit fixes an arithmetic overflow bug in a test-only PSBT (Bitcoin transaction format) parser used in unit tests. The bug could let a crafted test input make the parser think a data length is huge, potentially confusing the mock dis…
Integer overflow/wrap-around in length calculationOut-of-bounds length derived from arithmetic on attacker-influenced offsetsUnit-test-only code path, not device firmware
This commit fixes a bug in the Ledger Bitcoin app's Rust client where a PSBT v0 (an older transaction format) could silently carry fields that only have meaning in PSBT v2. When converting v0 to v2, those fields could override values taken…
Input validation added for cross-format PSBT conversionPrevents v2-only fields from overriding unsigned-transaction-derived valuesBIP-370 compliance enforcement for PSBTv0
This commit fixes a bug in the Ledger Bitcoin app's JavaScript client library. When converting an older-style Bitcoin transaction file (PSBT version 0) into the newer PSBT version 2 format, the library previously ignored fields that are on…
Input validation fix: rejects malformed PSBTv0 containing v2-only fieldsPrevents silent override of transaction locktime during PSBTv0-to-v2 conversionAdds missing BIP-370 key type constants for required time/height locktime
This commit fixes a bug in how the Ledger Bitcoin app client parses PSBT (Partially Signed Bitcoin Transaction) maps. Previously, if the same key appeared twice in a map, the parser silently kept the last value. A malicious or malformed PS…
Silent overwrite of duplicate PSBT map keys could create commitment mismatch between client and deviceTruncated PSBT maps were silently accepted due to exception swallowing in deserialization loopsTrailing data after PSBT maps was ignored, allowing reserialization to silently normalize malformed inputs
This commit fixes several bugs in Ledger's Bitcoin app. The most serious ones are: (1) a set of miniscript policy analyzer mistakes that could let the app accept Bitcoin wallet policies whose scripts are too large or too expensive to execu…
Miniscript cost/property analysis errors that could allow oversized/undercosted wallet policiesHost-driven infinite-loop / denial-of-service via zero-length GET_MORE_ELEMENTS responsesUI state inconsistency causing a security warning to be prematurely dismissed
This commit improves the Ledger Bitcoin app's MuSig2 multi-signature feature. It lets wallet software pre-generate public nonces before a transaction is known, adds an optional MUSIG2_SESSION_ID field so multiple signing sessions can be in…
New PSBT proprietary field parsing with length validation (1-32 bytes, empty rejected)Session ID now commits to wallet policy plus optional MUSIG2_SESSION_IDSession storage limit raised from 8 to 32 with LRU eviction
This commit is a small code cleanup in Ledger's Bitcoin app. It changes two local arrays from unsigned (uint16_t) to signed (int16_t) in functions that count operations and stack sizes for Bitcoin miniscript 'thresh' policies. The commit m…
Signed/unsigned type mismatch in sentinel handlingPotential latent integer interpretation bug in miniscript threshold policy analysisCode clarity improvement around invalid (dis)satisfaction markers
This commit fixes the Ledger Bitcoin app's internal checker for Miniscript wallet policies. The checker was incorrectly rejecting some valid Bitcoin spending policies as unsafe, and in a few places it was computing safety properties using …
Logic change in Miniscript policy analysisAlignment with upstream Bitcoin Core reference implementationRelaxation of overly strict non-malleability and timelock-mixing checks
This commit fixes a bug in how the Ledger Bitcoin app counts the number of Bitcoin script operations (ops) needed to spend certain wallet policies that use a 'miniscript andor' fragment. Because the count was wrong, the app could allow use…
Incorrect miniscript ops accounting for andor fragmentPolicy sanity check bypass leading to unspendable registered walletsReference alignment with Bitcoin Core implementation
This commit fixes a bug in how the Ledger Bitcoin app counts Bitcoin script operations ('ops') for two specific Miniscript fragments, 'l:' and 'u:'. Because the count was too low, the app could accept wallet policies that look valid but ar…
Undercounting of script operation budget leading to acceptance of unspendable policiesIncorrect handling of Miniscript wrapper dissatisfaction semanticsPolicy sanity check bypass via operation-count accounting flaw
This commit only updates documentation and the changelog. It explains a new optional PSBT field called MUSIG2_SESSION_ID that lets software wallets manage multiple MuSig2 signing sessions for the same wallet policy on a Ledger device. Ther…
This commit is a simple capacity increase, not a security fix. It raises the number of simultaneous MuSig2 signing sessions the Ledger Bitcoin app can keep in memory from 8 to 32, because users with multiple MuSig accounts or wallets that …
This commit improves the user experience and error handling for Ledger's Bitcoin app when using MuSig2 multi-signatures. Previously, if a required MuSig2 session was missing during the second round of signing, the device would only report …
UX-hardening: fail-fast before user approval instead of afterNew specific error code EC_SIGN_PSBT_MUSIG2_SESSION_NOT_FOUND for missing MuSig2 sessionsRefactored session storage lookup to support non-destructive existence check
Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.
Security candidateAdd various unit tests for crypto_get_uncompressed_pubkeyby Salvatore Ingala · 327db310 · Aug 27, 2026 · 1 fileMessage 75 · AdequateInformational 12Details
Commit message · Salvatore Ingala
Add various unit tests for crypto_get_uncompressed_pubkey
This includes failure cases that will be fixed in the next commit.
75/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
Why it was queued
cryptography-sensitive path
AI analysis · Informational 12/100
This commit only adds new automated tests for an existing cryptography helper function. It does not change the actual app code that runs on Ledger devices, so it cannot by itself introduce or fix a security bug. The commit message notes that some of the new tests check failure cases that will be addressed in a later commit.
Security candidateCheck return value of crypto_get_uncompressed_pubkeyby Salvatore Ingala · 7c2354ba · Aug 27, 2026 · 1 fileMessage 65 · AdequateLow 42Details
Commit message · Salvatore Ingala
Check return value of crypto_get_uncompressed_pubkey
Failures should not silently absorb errors.
65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
cryptography-sensitive path
AI analysis · Low 42/100
This commit fixes a spot in the Ledger Bitcoin app where a function that converts a compressed public key to an uncompressed one was called without checking whether it succeeded. Before the fix, if the conversion failed, the code would keep going with potentially invalid data. After the fix, the function's return value is checked and the operation aborts with an error if something went wrong. The change is small and defensive, but it removes a silent-failure path in cryptographic key derivation.
We no longer access G_cx anywhere, so this is redundant. Also remove unused imports in crypto.c.
50/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides an explanatory body
Why it was queued
cryptography-sensitive path
AI analysis · Informational 15/100
This commit is a routine code cleanup. It removes an unused SDK include path from the build configuration and deletes several unused header imports in a source file. There is no functional change and no security issue is indicated.
Using a global was a workaround around an old Nano X limitation on the stack size, that has since been removed.
This reclaims about 2.5kb of memory from the .bss section, rather allocating it on the stack during the sign_psbt flow.
68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarysigning or wallet path
AI analysis · Informational 12/100
This commit is a straightforward internal code cleanup: it moves a temporary data cache used during Bitcoin transaction signing from a permanent global variable into a local stack variable inside the signing function. The change frees about 2.5 KB of always-reserved RAM and is described by the developer as removing an old workaround for a device stack-size limit that no longer exists. There is no indication in the commit that this fixes a security bug or changes behavior visible to users or attackers.
AI review queuedenable LTOby Mathias BROUSSET · 9b42a195 · Aug 24, 2026 · 1 fileMessage 0 · OpaqueInformational 15Details
Commit message · Mathias BROUSSET
enable LTO
0/100 · OpaqueMessage clarity
! Very short subject! Too few words to establish purpose! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI analysis · Informational 15/100
This commit simply turns on Link Time Optimization (LTO), a standard compiler feature that can make the app smaller and faster. There is no indication of a security bug or fix in the change itself or the commit message.
AI review queuedSupport musig in multi_a key expressionsby Salvatore Ingala · 5622eec3 · Aug 21, 2026 · 8 filesMessage 78 · AdequateLow 29Details
Commit message · Salvatore Ingala
Support musig in multi_a key expressions
musig() is deliberately rejected in sortedmulti_a, where sorting the keys would require recomputing each aggregate key once per position; doc/musig.md now documents that.
Also update some imprecisions in the documentation about MAX_PUBKEYS_PER_MUSIG.
Add positive tests for musig in multi_a, and rejection test for musig in sortedmulti_a (where sorting makes things more complicated).
The cleartext module makes sure that $keys only matches plain keys, and not musig-aggregate keys.
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 or wallet pathsecond-pass: security-sensitive path
AI analysis · Low 29/100
This commit adds support for using MuSig multi-signature key groups inside taproot multi_a wallet policies on Ledger devices, while deliberately blocking them in sortedmulti_a. It also fixes a subtle parsing bug: previously, key expressions inside multi_a/sortedmulti_a were allocated one-by-one in a memory buffer, which would interleave badly with MuSig's own allocations and corrupt the in-memory layout. The new code parses all the keys into a temporary stack array first, then copies them into one contiguous allocation. Separately, the 'cleartext' human-readable display module now refuses to classify multisig patterns that contain musig keys, so the device falls back to showing the raw descriptor instead of potentially misleading text (for example, showing 'any 1 of two keys' for a musig that actually requires both).
Security candidateClear the output buffer on failures in merkle-tree related functionsby Salvatore Ingala · 240552f7 · Aug 20, 2026 · 18 filesMessage 73 · AdequateModerate 51Details
Commit message · Salvatore Ingala
Clear the output buffer on failures in merkle-tree related functions
As a defense-in-depth measure, we make sure that the output buffers are zeroed on failures, preventing the attacker from leaving host-chosen content on uninitialized buffers.
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
explicit security language
AI analysis · Moderate 51/100
This commit hardens Ledger's Bitcoin app so that when it asks the host computer for Merkle-tree data and the request fails or the data is rejected, the memory buffer that was supposed to receive the data is wiped clean with zeros. Before the change, an attacker-controlled host could leave chosen bytes in that buffer even after the app decided the data was invalid. The patch is a defense-in-depth measure; it does not by itself fix a known exploitable bug, but it removes a class of subtle mistakes where later code might accidentally trust leftover hostile data.
Security candidateMerge pull request #502 from LedgerHQ/aro/fuzzing-frameworkby Aymeric Robert · ab26f04c · Aug 18, 2026 · 41 filesMessage 58 · ThinInformational 15Details
Commit message · Aymeric Robert
Merge pull request #502 from LedgerHQ/aro/fuzzing-framework
Add Absolution-based fuzzing
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
fuzzing or regression evidenceseed or entropy pathsigning or wallet pathparser or protocol pathmerge-commit duplicate discount
AI analysis · Informational 15/100
This commit adds a new developer-only fuzzing test framework to the Ledger Bitcoin app. It does not change how the app behaves on a real device; it only adds automated test infrastructure that feeds random or structured inputs to the app in a simulated environment to help find bugs. There is no indication this commit fixes or introduces a security vulnerability in production code.
Security candidateDerive MuSig2 nonces from the untweaked aggregate keyby Salvatore Ingala · b56cf7ab · Aug 17, 2026 · 2 filesMessage 85 · StrongLow 30Details
Commit message · Salvatore Ingala
Derive MuSig2 nonces from the untweaked aggregate key
The `aggpk` argument passed to NonceGen was the aggregate key after all the tweaks, which depends on the input's (change, address_index) and on the taptree. This, however, depends on the transaction being signed, which in some cases might not be known until round 2, since wallets might want to pre-generate nonces in advance.
Therefore, we change the argument passed to `aggpk` so that it takes the aggrgate key _before_ the tweaks.
85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
nonce handlingsigning or wallet path
AI analysis · Low 30/100
This commit changes how cryptographic 'nonces' (one-time random numbers used in multi-signature Bitcoin signing) are derived in Ledger's Bitcoin app. Previously, the nonce was tied to details of the exact transaction being signed, which could cause problems if a wallet wanted to prepare nonces before the final transaction was known. The change makes the nonce depend only on secret device randomness and wallet policy, not on transaction details. The commit frames this as a usability/protocol correctness improvement and explicitly states it is not a security vulnerability, because the old design still did not let an attacker predict or control the nonces.
AI review queuedAdd functional test for stale review state across commandsby Salvatore Ingala · 29d8d61d · Aug 17, 2026 · 70 filesMessage 75 · AdequateLow 48Details
Commit message · Salvatore Ingala
Add functional test for stale review state across commands
Verified to fail on the parent of the previous commit.
75/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
Why it was queued
signing or wallet pathsecond-pass: unusually broad changesecond-pass: security-sensitive path
AI analysis · Low 48/100
This commit only adds a new automated test, plus screen snapshots used by that test. The test checks that after signing a Bitcoin transaction (PSBT), then signing a text message, the device does not accidentally reuse leftover display settings from the previous operation. The commit message says the test would have failed on an older version of the app, implying a prior UI bug existed. However, this commit itself does not change the app code, so it is not a fix and cannot be directly exploited. It is a regression test that documents a previous display-state issue.
Merge pull request #533 from LedgerHQ/psbt_refactor
Harden and refactor PSBT accessor API
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
signing boundarydefensive validationsigning or wallet pathmerge-commit duplicate discount
AI analysis · High 80/100
This commit is a hardening and refactor of the code that reads PSBT (Partially Signed Bitcoin Transaction) fields from a host computer into a Ledger hardware wallet. The core security fix is that the device now clearly distinguishes between a field that is genuinely missing in a PSBT map and a field that is present but malformed or failed to verify. Previously, both cases could return the same error code, which could trick the wallet into silently using a default value (for example, default nSequence or default locktime) when the host had actually committed to something else. The commit also adds a guard that refuses to look up values by key unless the map's keys have already been proven to be sorted and unique, preventing a malicious host from supplying two different values for the same key.
Security candidateClear the output buffer when a PSBT field read is rejectedby Salvatore Ingala · cf24d637 · Aug 14, 2026 · 2 filesMessage 65 · AdequateModerate 52Details
Commit message · Salvatore Ingala
Clear the output buffer when a PSBT field read is rejected
This avoids leaving host-controlled bytes in memory in cases of failure.
65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
signing boundarysigning or wallet path
AI analysis · Moderate 52/100
This commit fixes a security hygiene issue in Ledger's Bitcoin app when reading PSBT (Partially Signed Bitcoin Transaction) data fields. Previously, if a field was missing or malformed, the memory buffer meant to hold the field value could be left containing leftover or partially written data controlled by the host/device communicating with the Ledger. The change ensures the buffer is explicitly wiped to zero and its reported length is reset in those failure cases, so callers cannot accidentally use stale or incorrect data. The commit message itself states this avoids leaving 'host-controlled bytes in memory in cases of failure.'
AI review queuedNits from PR reviewby Salvatore Ingala · 48cb1764 · Aug 14, 2026 · 4 filesMessage 28 · OpaqueLow 36Details
Commit message · Salvatore Ingala
Nits from PR review
28/100 · OpaqueMessage clarity
✓ Subject identifies a change! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: opaque commit messagesecond-pass: security-sensitive path
AI analysis · Low 36/100
This commit is a small follow-up cleanup to a previous pull request. It adds one safety step before validating a sorted key map, clarifies documentation about when missing map keys can be trusted, updates a copyright year, tightens a size check on a Bitcoin transaction field, and removes an oversized temporary buffer. The changes look like defensive hardening rather than a fix for an active bug, and the commit message gives no security context.
Write NBGL tag/value rows as whole-struct literals
By always assigning the entire struct at once, we are sure that the other fields (if any) are zero-ed, which avoid the risk of the content depending on history. This also covers any future field possibly added to the struct in the SDK.
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundary
AI analysis · Low 35/100
This commit changes how on-screen text labels are prepared on Ledger's newer Bitcoin app interface. Previously, only the text fields were updated, leaving other hidden struct fields carrying whatever values were left over from earlier screens. The patch now resets the entire struct each time, preventing stale hidden settings (like centered layout flags or icons) from leaking between different app screens. The risk is mainly that a leftover flag could subtly alter what the user sees or how a confirmation page is rendered, potentially confusing a user at the moment they approve a transaction.
AI review queuedReplace the wallet policy AST relative pointers with native pointersby Salvatore Ingala · aa612cba · Aug 13, 2026 · 10 filesMessage 73 · AdequateLow 30Details
Commit message · Salvatore Ingala
Replace the wallet policy AST relative pointers with native pointers
Relative pointers saved some RAM, but added a significant amount of code complexity - which is no longer a good tradeoff for devices post Nano S.
The "N bytes" comments on the node structures were wrong even before this change: policy_node_s::flags is a struct of unsigned int bitfields, hence 4 bytes rather than 1, which made every node 6 bytes larger than advertised. They are now the measured sizes for the 32-bit devices.
src/common/cleartext_match.c is generated, so the accessors are rewritten in specs/bip388/gen.py and the file regenerated.
Also adds an assertion for an implicitly used invariant: multi() and friends allocate their key expressions one at a time but index them as an array, which only works if sizeof(policy_node_keyexpr_t) is a multiple of the alignment buffer_alloc() pads to.
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Low 30/100
This commit is a code cleanup in Ledger's Bitcoin app. It replaces a memory-saving 'relative pointer' scheme with ordinary C pointers in the wallet-policy data structures. The change removes several hundred lines of pointer-conversion code and adds one compile-time check to make sure key-expression structures stay properly aligned when allocated back-to-back. There is no direct evidence in the commit that it fixes an active security bug; it reads as a maintainability/refactoring change to reduce complexity on newer Ledger devices that have more RAM.
AI review queuedEnlarge the buffers holding the parsed wallet policyby Salvatore Ingala · 18e01ab5 · Aug 13, 2026 · 4 filesMessage 95 · StrongLow 27Details
Commit message · Salvatore Ingala
Enlarge the buffers holding the parsed wallet policy
Preparing to rebuild the abstract syntax tree of a wallet policy with native pointers, which will increase its size.
Measured over the largest policies of the test suite, the tree grows by up to about 1.3x on the 32-bit devices, and up to about 2.2x in the 64-bit unit test builds; the growth is bounded by 1.5x and 3x respectively, which are the growth factors of policy_node_tree_t, the largest of any node type.
Therefore, we make MAX_WALLET_POLICY_BYTES scales with the size of a pointer, rather than declaring a separate constant for unit tests.
Because Nano X has significantly less memory, we keep the maximum size smaller, which incurs some risk of certain very complex policies no longer fitting in memory. It should still be rare in practice.
95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Low 27/100
This commit increases the memory buffers used to store parsed Bitcoin wallet policies inside Ledger's Bitcoin app. It is a preparatory change for an upcoming internal refactor that will make the policy data structure larger. The change itself does not fix a known bug or vulnerability, but it adjusts memory limits to avoid future out-of-memory failures. The Nano X keeps a smaller buffer than other devices, which the commit notes could cause some very complex policies to be rejected.
AI review queuedReject unreadable nSequence and fallback locktime instead of defaultingby Salvatore Ingala · d4308bd4 · Aug 13, 2026 · 4 filesMessage 65 · AdequateModerate 62Details
Commit message · Salvatore Ingala
Reject unreadable nSequence and fallback locktime instead of defaulting
Default should only be applied for actually absent keys, without swallowing errors.
65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Moderate 62/100
This commit fixes a bug in Ledger's Bitcoin app where malformed PSBT data could silently be treated as if it were missing. Specifically, if the 'nSequence' or 'fallback locktime' fields were present but unreadable (wrong length or bad proof), the app previously substituted default values and continued signing. Now it correctly rejects such malformed inputs. This prevents a malicious or buggy wallet client from getting the device to sign a transaction using sequence or locktime values the client never actually committed to.
Security candidateAdd typed accessors for the PSBT fields read while signingby Salvatore Ingala · acb931a7 · Aug 13, 2026 · 13 filesMessage 95 · StrongInformational 12Details
Commit message · Salvatore Ingala
Add typed accessors for the PSBT fields read while signing
Accessing PSBT fields needed raw validation at the caller's site, which ends up mixing the PSBT validation logic with the actual signing logic.
Introduce sign_psbt/psbt_fields.{c,h}, where each accessor owns the structural validation of exactly one field and returns a typed value.
Every accessor returns a tri-state psbt_field_status_t, so that a caller can always tell a field that is not in the map from one that could not be read. The length policy of each field - an exact size, or a maximum - lives here rather than next to call_get_merkleized_map_value.
Note the accessors return an enum whose ERROR value is -1, which is truthy. Therefore, every one of the 26 call sites compares against PSBT_FIELD_PRESENT explicitly.
This is a pure refactor: no behavioral change. In particular the two optional fields keep the exact defaulting policy they had before, which is deliberately left alone here and fixed in the next commit: - the four nSequence reads in txhashes.c fall back to 0xFFFFFFFF on any non-PRESENT status, as they did on any failed read before; - psbt_get_global_fallback_locktime keeps its 9-byte varint buffer and reports every read failure as ABSENT, yielding locktime 0. Both are marked as such in the accessor docs.
The three unit tests covering the removed u32 wrapper are dropped, as they are subsumed by a test added here against the real accessor. The two remaining tests in test_get_merkleized_map_value.c now assert the named statuses.
Unit tests are added for the new accessors.
95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Why it was queued
signing boundarysigning or wallet path
AI analysis · Informational 12/100
This commit is a code cleanup (refactor) in Ledger's Bitcoin app. It moves the logic for reading PSBT (Partially Signed Bitcoin Transaction) fields into dedicated helper functions with clearer success/error/absent status codes. The author explicitly states there is no behavior change; the patch preserves existing handling of two optional fields exactly as before, with fixes for those edge cases planned in a follow-up commit. The changes add unit tests and improve code clarity, but do not by themselves fix a security bug.
Security candidateReport a missing map key distinctly from a failed lookupby Salvatore Ingala · 941235f8 · Aug 13, 2026 · 10 filesMessage 83 · StrongModerate 50Details
Commit message · Salvatore Ingala
Report a missing map key distinctly from a failed lookup
Reading a value by key out of a merkleized map has two outcomes that callers must tell apart: the key is genuinely not in the map (normal for every optional PSBT field), or the lookup failed (Merkle proof mismatch, malformed client response, transport error).
Previously, the API collapsed both into a single negative return, so a caller applying a default for an optional field would also apply it after a proof failure, swallowing what should logically be an error.
The shared contract lives in the new map_value_status.h, which also documents that MAP_VALUE_ABSENT is a client assertion and not a proof: the device requests no proof of absence, so a suppressed key is indistinguishable from an honest omission. Where soundness is required, presence must be derived from the key enumeration performed while validating the map, which is committed to by keys_root.
No caller behaviour changes here: every current caller tests `< 0`, which stays correct. Three tests that pinned the old granular codes now assert the named ones, and the not-found test is strengthened from `< 0` to MERKLE_LEAF_NOT_FOUND.
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
signing boundary
AI analysis · Moderate 50/100
This commit fixes a design bug in how the Ledger Bitcoin app asks a connected computer for data stored in a cryptographic map (used for PSBT transaction fields). Previously, 'key genuinely missing' and 'lookup failed due to a bad proof or communication error' were reported the same way. That meant the app could silently apply a default value when it should have rejected a faulty response. The patch separates the two cases so future callers can tell them apart, though existing callers still use the old '< 0' check and are not changed here. The commit also documents that 'missing key' is only what the host claims, not a cryptographic proof.
AI review queuedEnforce the sorted-keys precondition for by-key map readsby Salvatore Ingala · 5231c796 · Aug 13, 2026 · 11 filesMessage 85 · StrongHigh 76Details
Commit message · Salvatore Ingala
Enforce the sorted-keys precondition for by-key map reads
Reading a value out of a merkleized map by key is only sound once the keys tree has been verified to be lexicographically sorted, and hence that the keys are unique; otherwise a malicious client could equivocate on the value committed to by a given key. So far this was a documented convention, whose enforcement was expected from the callers
Instead, here we track the invariant in the commitment itself, via a new private _keys_are_sorted member of merkleized_map_commitment_t. call_get_merkleized_map[_with_callback] and the new call_check_merkleized_map_sorted set this field on success.
All the readers by key, like call_get_merkleized_map_value, call_get_merkleized_map_value, and the streaming versions) will now fail explicitly if the _keys_are_sorted sentinel is not set.
The member is documented as private and named with a conventional _; callers must neither read nor set it.
85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · High 76/100
This commit hardens a Ledger Bitcoin app security check. Previously, reading a value from a special data structure (a 'merkleized map') by key required the caller to first verify that all keys were sorted and unique; that was only a documented rule, not enforced. A malicious host could potentially trick the app into reading the wrong value for a key if the rule was skipped. The patch now tracks a 'keys are sorted' flag inside the map commitment itself and makes all by-key readers fail (via an internal assertion) if that flag is not set. It also adds a helper to validate maps that come directly from the APDU command (like the PSBT global map).
Security candidatefix: harden parsing and signing against malformed inputby Aymeric Robert · 83251d16 · Aug 7, 2026 · 9 filesMessage 85 · StrongModerate 63Details
Commit message · Aymeric Robert
fix: harden parsing and signing against malformed input
Found by the fuzzing harness added in this PR:
- signed left shift computing the Merkle tree traversal mask - zero-length memmove when merging parser buffers - out-of-range integer conversions and a signed/unsigned comparison in PSBT signing
85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
Why it was queued
signing boundarydefensive validationfuzzing or regression evidencesigning or wallet pathparser or protocol path
AI analysis · Moderate 63/100
This commit fixes several low-level programming bugs in Ledger's Bitcoin app that were found by automated fuzzing. The bugs include a dangerous bit shift, a pointless memory move with zero bytes, and incorrect comparisons between signed and unsigned numbers when parsing transaction data and signing PSBTs. Most fixes are defensive hardening, but one change moves a sanity check earlier so the app rejects absurdly large input amounts before adding them up, which could prevent an overflow. The commit does not claim these are directly exploitable attacks, but they remove undefined behavior that could in theory lead to crashes or incorrect signing.
Require exactly 32 bytes for PSBT_IN_PREVIOUS_TXID
Values of length different than 32 should in fact be rejected.
65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
signing boundarysigning or wallet path
AI analysis · Moderate 65/100
This commit tightens validation of a Bitcoin transaction signing field. The Ledger app previously accepted any non-error value when reading the PSBT_IN_PREVIOUS_TXID field, even if it was shorter or longer than the required 32 bytes. Now it rejects any length other than exactly 32 bytes. An incorrect txid length could let a malformed or malicious PSBT misrepresent which previous transaction is being spent, potentially leading to signing the wrong transaction data.
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
fuzzing or regression evidenceseed or entropy pathsigning or wallet path
AI analysis · Informational 15/100
This commit adds a new developer-only fuzzing test framework for the Ledger Bitcoin app. It does not change any production wallet, signing, or transaction-handling code. Instead, it introduces mock functions, test harnesses, build scripts, and documentation so automated tools can throw randomized inputs at the app in a controlled way to find bugs. There is no indication this commit fixes a security bug or introduces a vulnerability in shipped firmware.
AI review queuedfuzzing: gate fuzz-only relaxations behind FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTIONby Aymeric Robert · f155ed7e · Aug 7, 2026 · 4 filesMessage 60 · AdequateInformational 20Details
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
Why it was queued
fuzzing or regression evidencesigning or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 20/100
This commit only changes how the app's internal fuzz-testing harness behaves. It does not alter normal production behavior. The changes add compile-time guards so that certain safety relaxations (like skipping duplicate-public-key checks or forcing swap checks to run) are active only when the code is built in a special fuzzing mode. One small non-fuzzing change moves a Bech32 character table from a pointer into read-only data, which is a hardening improvement but not a fix for an exploitable vulnerability.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
Why it was queued
cryptography-sensitive pathsigning or wallet pathmerge-commit duplicate discount
AI analysis · Moderate 59/100
This commit fixes missing error handling in the Ledger Bitcoin app's MuSig2 multi-signature code. Several cryptographic functions could fail silently or return incorrect results because their error codes were ignored. The patch now checks those return values and aborts the signing process when something goes wrong. It also corrects a debug-print index so a disruptive co-signer is reported with the right number.