LD
← All projectsLedger

Ledger Bitcoin app

Open-source Bitcoin application running on Ledger devices; the device OS is outside this repository.

BitcoinHardware walletsNormal
Repository coverage

374 commits in the local evidence base

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.

101security candidates144second-pass queue345AI analyses
40commits · 30 days
95commits · 60 days
233commits · 180 days
370commits · 365 days
Backfill bands
Aug 5 → Feb 670 seen8 candidatesComplete
Feb 6 → Jun 6149 seen21 candidatesComplete
Jun 6 → Jul 623 seen0 candidatesComplete
Jul 6 → Aug 555 seen5 candidatesComplete
Commit communication

Does the history explain itself?

Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.

54/100 average clarity
22Strong · 80–100
117Adequate · 60–79
177Thin · 40–59
58Opaque · 0–39
6security candidates with opaque commit messaging
Read the scoring rubric →
Developer activity

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
Salvatore Ingala23271205658
Ilya Artemov962696145
Aymeric Robert434063
github-actions[bot]17117046
Mathias BROUSSET16015038
José Luis Landabaso Díaz404067
iartemov-ledger201051
Cerberus Merlin101062
Michael Evans101073
Charles-Edouard de la Vergne101045
Analysis record

Published AI watches

Last scanned 31 minutes ago

Low 37 AI analysisMessage 58 · Thin
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Merge pull request #569 from LedgerHQ/client-fixes

This commit fixes how Ledger's Bitcoin client libraries convert older PSBTv0 transaction data into the newer PSBTv2 format that Ledger hardware wallets expect. The changes correct several field-handling bugs: the transaction locktime is no…

PSBTv0-to-v2 conversion bug fixesMissing input sequence defaulted to 0xffffffff (final sequence)Locktime assigned to transaction object instead of PSBT object
034b9d04by Salvatore Ingala+368−85911 files
No security note in commit
Informational 24 AI analysisMessage 65 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

python client: use default value for nSequence if not given

This commit fixes a small bug in the Python helper library that builds unsigned Bitcoin transactions from PSBT data. Previously, if a PSBT did not explicitly include a per-input sequence number, the code would crash with an assertion error…

Behavioral change in transaction serialization helperRemoves an assertion that could cause crashes on valid PSBTs missing optional sequence fieldsAligns implementation with BIP-370 and HWI upstream behavior
2bf0eed6by Salvatore Ingala+3−21 file
No security note in commit
Informational 15 AI analysisMessage 60 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Bump ledger_bitcoin_client version to 0.7.0

This commit only updates a version number from 0.6.2 to 0.7.0 in two Rust package files. It is a routine bookkeeping change because the public interface of the PSBT module changed, requiring a minor version bump under semantic versioning r…

cfb530b9by Salvatore Ingala+2−22 files
No security note in commit
Informational 15 AI analysisMessage 83 · Strong
LD LedgerLedger Bitcoin app BitcoinHardware wallets

js tests: drop a bogus required height locktime of 0 from test PSBTs

This commit only changes hardcoded test data used in JavaScript unit tests. It removes an invalid zero-value locktime field from two PSBT (Partially Signed Bitcoin Transaction) test fixtures so they conform to the BIP-370 standard. No prod…

ec992074by Salvatore Ingala+6−32 files
No security note in commit
Low 48 AI analysisMessage 95 · Strong
LD LedgerLedger Bitcoin app BitcoinHardware wallets

python client: fix three PSBTv2 defects in psbt.py

This commit fixes three bugs in a Python helper that converts modern PSBTv2 transaction data into the older PSBTv0 format used by Ledger hardware wallets. The bugs could silently corrupt the transaction's lock time and version fields durin…

Silent data corruption in transaction serialization (nLockTime, tx_version, fallback_locktime)PSBTv2 to PSBTv0 conversion path affectedPotential for producing an unsigned transaction that does not match the PSBT's declared fields
04ba9e7bby Salvatore Ingala+6−31 file
No security note in commit
Low 35 AI analysisMessage 73 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

rust client: build PSBTv2 maps from all pairs, not an enumerated list

This commit refactors how the Ledger Bitcoin app's Rust client converts a PSBT (Partially Signed Bitcoin Transaction) from version 0 to version 2. Previously, the code manually listed every PSBT field it knew how to serialize, which risked…

Refactor of PSBT serialization path used before signing on hardware walletRemoval of hand-maintained field enumeration that could omit or mis-serialize PSBT fieldsAddition of explicit error handling for PSBTs containing pre-existing v2 keys that conflict with v0 transaction data
a16bb101by Salvatore Ingala+344−8484 files
No security note in commit
Informational 15 AI analysisMessage 38 · Opaque
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Version bump to v2.5.1

This commit is a routine version bump from 2.5.0 to 2.5.1 for the Ledger Bitcoin app. It only updates the changelog and Makefile version number. No code changes are present in the diff, and no security fixes or vulnerabilities are describe…

e7618c98by Ilya Artemov+5−42 files
No security note in commit
Low 27 AI analysisMessage 73 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Merge pull request #546 from LedgerHQ/simplify_ast

This commit is a large internal refactoring of the Ledger Bitcoin app's wallet-policy parser. It replaces compact 'relative pointers' with ordinary memory pointers in the abstract syntax tree (AST) used to represent Bitcoin wallet descript…

Large-scale memory-layout refactoring of security-critical parserRemoval of custom relative-pointer abstraction, eliminating a class of offset-calculation bugsIncrease in policy buffer size limits and key-info length limits
efee9c25by Salvatore Ingala+412−55812 files
No security note in commit
Low 37 AI analysisMessage 85 · Strong
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Increase MAX_POLICY_KEY_INFO_LEN to the actual maximum; nits from PR review

This commit fixes a size limit in the Ledger Bitcoin app that was too small. The app uses this limit when registering Bitcoin wallet policies (descriptions of how to spend coins). The old limit underestimated how long a key description can…

Buffer/limit size correction for key origin infoRemoval of unused ledger_assert.h includeComment-only updates to serialized wallet policy length bounds
afd42b6dby Salvatore Ingala+5−61 file
No security note in commit
Low 32 AI analysisMessage 68 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Merge pull request #556 from LedgerHQ/mem_opt

This commit removes an old memory workaround in Ledger's Bitcoin app. Previously, a large data structure used during transaction signing was stored in global memory instead of on the function's stack, because some Ledger devices were thoug…

Memory allocation model changed for high-risk signing pathStack-size build-time guard changed for Nano XGlobal cache removed; signing state now lives on stack
3aa53954by Salvatore Ingala+9−275 files
No security note in commit
Informational 15 AI analysisMessage 73 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Merge pull request #558 from LedgerHQ/embit_private

This commit simply renames an internal Python package from `embit` to `_embit` (a common convention indicating it is private/implementation detail) and updates all import statements accordingly. There is no functional code change and no se…

d438dd03by Salvatore Ingala+7−731 files
No security note in commit
Moderate 61 AI analysisMessage 73 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Merge pull request #559 from LedgerHQ/parse_unhardened

This update fixes a boundary bug in how the Ledger Bitcoin app parses wallet policies that use multi-path key expressions like /<M;N>/*. The app was supposed to reject hardened (high-security) derivation indexes, but it incorrectly allowed…

Boundary condition error: hardened derivation index 0x80000000 accepted as unhardenedWallet policy parser validation bypass in multi-path key expressionsRegression unit test added for hardened boundary rejection
96e999feby Salvatore Ingala+49−298 files
No security note in commit
Informational 15 AI analysisMessage 60 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Label unsigned constants in constants.h

This commit only adds 'U' suffixes to numeric constants in a header file and makes a few matching type adjustments in C source files so the code still compiles cleanly with strict compiler warnings. It is a code-quality cleanup, not a secu…

e1fcefb4by Salvatore Ingala+27−276 files
No security note in commit
Low 25 AI analysisMessage 45 · Thin
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Pin @bitcoinerlab/descriptors to v3.1.7

This commit changes a JavaScript package dependency from allowing any compatible 3.x version of @bitcoinerlab/descriptors to a fixed, exact version (3.1.7). Pinning a dependency is often done to prevent unexpected future changes, but the c…

Dependency version pinningNo explicit security claim in commit messageNo code-level security fix visible in diff
6262d104by Salvatore Ingala+101−122 files
No security note in commit
Moderate 60 AI analysisMessage 73 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Reject 0x80000000 as an unhardened step in wallet policy parsing

This commit fixes a boundary-check bug in how the Ledger Bitcoin app parses wallet policies (BIP-388). The app was supposed to reject any hardened derivation step in a specific range expression, but it allowed the value 2147483648 (0x80000…

Off-by-one boundary check in BIP-388 wallet policy parsingForbidden hardened derivation index accepted as unhardenedPotential failure or incorrect behavior in address derivation and signing
44f98a0eby Salvatore Ingala+2−21 file
Vendor flagged security relevance
Low 47 AI analysisMessage 60 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Add regression test for unhardened derivation step parsing

This commit only adds a new regression test to the Bitcoin app's test suite. The test checks that wallet policy key expressions reject a specific boundary value (2147483648, the first 'hardened' child index) where only 'unhardened' values …

Regression test for hardened/unhardened derivation index boundary parsingCommit message states older version accepted 0x80000000 as unhardenedNo production code change in this commit
ce2c25c6by Salvatore Ingala+20−01 file
No security note in commit
Informational 15 AI analysisMessage 65 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Mark vendored embit clone 'private' in python client

This commit simply renames a vendored (internally bundled) copy of the 'embit' library inside the Python client from `embit` to `_embit`. The leading underscore is a Python convention meaning 'private/internal use only.' No code behavior c…

141e88f2by Salvatore Ingala+7−731 files
No security note in commit
Low 33 AI analysisMessage 73 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Delete the hash context before return in compute_rand_i_j

This commit adds a memory wipe of a cryptographic hash context after it is used to derive a secret random value in the Ledger Bitcoin app's MuSig multi-signature code. The change is described by the developer as a 'defense-in-depth' measur…

explicit_bzero added to clear sensitive cryptographic contextMuSig signing randomness treated as sensitive after partial signatures are knownDefense-in-depth memory hygiene patch
121a18ceby Salvatore Ingala+3−01 file
Vendor flagged security relevance
Moderate 67 AI analysisMessage 65 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Harden count_distinct_keys_info to correctly count the used keys

This commit fixes a bug in Ledger's Bitcoin app that could let a wallet policy slip through registration even when it contained unused or out-of-range public keys. The old code simply looked at the highest key index referenced in the walle…

Logic flaw in wallet policy validationPotential bypass of internal-key ownership check via unused key slotsBounds checking added for key indices
d94c51a2by Salvatore Ingala+52−124 files
Vendor flagged security relevance
Low 44 AI analysisMessage 73 · Adequate
LD LedgerLedger Bitcoin app BitcoinHardware wallets

Reject registering wallet policies with pubkeys not on the curve

This commit adds an early safety check in the Ledger Bitcoin app. Before registering a new wallet policy, the app now verifies that each public key is a valid point on the Bitcoin elliptic curve. Previously, an invalid public key would onl…

Input validation added for cryptographic public key pointsInvalid curve points now rejected at wallet registration time rather than deferred to address derivationUse of standard status word SW_INCORRECT_DATA for malformed input
d0c47c7aby Salvatore Ingala+9−01 file
No security note in commit
Repository ledger

Explore captured commits

Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.

Lower-priorityClear the tag/value pool at the start of each reviewby Salvatore Ingala · 8aa0a7a6 · Aug 17, 2026 · 1 fileMessage 65 · AdequateTriage 0Details
Commit message · Salvatore Ingala

Clear the tag/value pool at the start of each review

Centralizes the initialization in a new `reset_flow_state()` function, and calls
it at the beginning of each UI flow.

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
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.

Lower-priorityFix broken comparisonby Salvatore Ingala · cd6d5f0c · Aug 14, 2026 · 1 fileMessage 51 · ThinTriage 0Details
Commit message · Salvatore Ingala

Fix broken comparison

With relative pointers, this check was just redundant; with
absolute pointers, it actually makes the comparison fail, as two
identical placeholders would still have different pointers.

51/100 · ThinMessage clarity
✓ Subject identifies a change✓ Provides detailed explanatory context
Security candidateMerge pull request #533 from LedgerHQ/psbt_refactorby Salvatore Ingala · deaf1f3c · Aug 14, 2026 · 27 filesMessage 58 · ThinHigh 80Details
Commit message · Salvatore Ingala

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.

Lower-priorityRemove never-defined UI function declarationsby Salvatore Ingala · 79934293 · Aug 14, 2026 · 1 fileMessage 60 · AdequateTriage 0Details
Commit message · Salvatore Ingala

Remove never-defined UI function declarations

The corresponding functions were deleted, only the prototypes survived.

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Lower-priorityRemove unused streaming-index UI stateby Salvatore Ingala · 7d355ce0 · Aug 14, 2026 · 2 filesMessage 60 · AdequateTriage 0Details
Commit message · Salvatore Ingala

Remove unused streaming-index UI state

Dalte stale code: `g_current_streaming_index` and its four accessors
are no longer used.

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Lower-priorityDerive N_UX_PAIRS from the per-target output limitby Salvatore Ingala · 090d756f · Aug 14, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · Salvatore Ingala

Derive N_UX_PAIRS from the per-target output limit

The pool size was a hardcoded 54, but it actually depends on the
MAX_EXT_OUTPUT_SIMPLIFIED_NUMBER constant, which is smaller on Nano X.

Deriving the size from what the UI flows actually need keeps reclaims
384 bytes on Nano X.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityBound-check the tag/value count in make_pair_listby Salvatore Ingala · b3808b4e · Aug 14, 2026 · 1 fileMessage 68 · AdequateTriage 0Details
Commit message · Salvatore Ingala

Bound-check the tag/value count in make_pair_list

Before, `make_pair_list` trusted its caller for the row count.

The assertion also catches the truncation of the `unsigned int` parameter
into the `uint8_t nbPairs` field of the SDK's nbgl_layoutTagValueList_t.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityAssert the operation status strings are set before useby Salvatore Ingala · 02af30dc · Aug 14, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · Salvatore Ingala

Assert the operation status strings are set before use

Clear the status strings in `reset_flow_state()`, and asserts that they are set
when using a flow that needs a status string.

This removes the risk of showing a stale message if one forgets to set them.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Security candidateWrite NBGL tag/value rows as whole-struct literalsby Salvatore Ingala · ea367927 · Aug 14, 2026 · 1 fileMessage 73 · AdequateLow 35Details
Commit message · Salvatore Ingala

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).

Lower-priorityAdd missing include for memcpyby Salvatore Ingala · e52cddb1 · Aug 13, 2026 · 1 fileMessage 45 · ThinTriage 0Details
Commit message · Salvatore Ingala

Add missing include for memcpy

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
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.

Security candidateRequire exactly 32 bytes for PSBT_IN_PREVIOUS_TXIDby Salvatore Ingala · ecf84435 · Aug 7, 2026 · 1 fileMessage 65 · AdequateModerate 65Details
Commit message · Salvatore Ingala

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.

Security candidatefuzzing: add Absolution-based stateful fuzzing frameworkby Aymeric Robert · 06ce2fde · Aug 7, 2026 · 31 filesMessage 50 · ThinInformational 15Details
Commit message · Aymeric Robert

fuzzing: add Absolution-based stateful fuzzing framework

50/100 · ThinMessage clarity
✓ 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
Commit message · Aymeric Robert

fuzzing: gate fuzz-only relaxations behind FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION

60/100 · AdequateMessage clarity
✓ 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.

Security candidateMerge pull request #542 from LedgerHQ/musig-fixesby Salvatore Ingala · 0fec192f · Aug 5, 2026 · 3 filesMessage 68 · AdequateModerate 59Details
Commit message · Salvatore Ingala

Merge pull request #542 from LedgerHQ/musig-fixes

Add some missing error propagation in `musig.c`

68/100 · AdequateMessage clarity
✓ 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.

AI review queuedFix missing return value checks for point_add callsby Salvatore Ingala · b1132395 · Aug 4, 2026 · 2 filesMessage 65 · AdequateModerate 59Details
Commit message · Salvatore Ingala

Fix missing return value checks for point_add calls

Also made the cast from size_t to int explicit, and fixed PRINTF
message that had an off-by-one.

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 59/100

This commit fixes three places in the Ledger Bitcoin app's MuSig2 code where the result of an elliptic-curve point-addition operation was not checked for failure. If point_add fails (for example, because it produced the special 'point at infinity' or another error condition), the code previously continued using an invalid public key or nonce. The patch now aborts the signing operation and returns an error. It also corrects a debug-print index that was off by one and makes a type conversion explicit.