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 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
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
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…
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…
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
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
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…
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
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
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
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…
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
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…
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
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
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
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…
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
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
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
Merge pull request #569 from LedgerHQ/client-fixes
Client fixes on PSBTv2 field handling
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 boundarysigning or wallet pathparser or protocol pathmerge-commit duplicate discount
AI analysis · Low 37/100
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 now written to the right place, missing input sequence numbers are treated as the default final value, and the Rust client now forwards unknown PSBTv2 fields (such as required locktimes) instead of dropping them. It also rejects malformed PSBTs where v0 and v2 fields contradict each other, rather than producing an invalid PSBT that the device would refuse. These are client-side robustness fixes; they do not appear to be a security patch for the device firmware itself.
The public interface in the psbt module changed, therefore a minor version bump is necessary.
60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
signing boundary
AI analysis · Informational 15/100
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 rules. No code behavior changes are present in the diff.
Security candidatejs tests: drop a bogus required height locktime of 0 from test PSBTsby Salvatore Ingala · ec992074 · Sep 18, 2026 · 2 filesMessage 83 · StrongInformational 15Details
Commit message · Salvatore Ingala
js tests: drop a bogus required height locktime of 0 from test PSBTs
The hardcoded PSBTs that were used in the tests are actually invalid, as they have PSBT_IN_REQUIRED_HEIGHT_LOCKTIME = 0; but the field is required to be > (or absent) per BIP-370.
The PSBT_IN_REQUIRED_HEIGHT_LOCKTIME field is therefore dropped in this commit.
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 boundarysigning or wallet path
AI analysis · Informational 15/100
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 production code, device firmware, or user-facing behavior is changed.
python client: fix three PSBTv2 defects in psbt.py
- get_unsigned_tx assigned the computed lock time to `self.nLockTime` instead of `tx.nLockTime`, so the CTransaction it returned always kept the nLockTime 0.
- cache_unsigned_tx_pieces tested `self.tx is not None`, but __init__ always creates a CTransaction, so the condition is always true -- its own docstring says "does nothing if the PSBT is already v2". For a deserialized PSBTv2, whose tx is null, setup_from_tx therefore overwrote tx_version with 1 and fallback_locktime with 0, discarding the values just parsed. Test the version instead.
- convert_to_v0 cleared tx_version and fallback_locktime and only then called get_unsigned_tx(). Build the transaction first to avoid the values of those fields.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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 · Low 48/100
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 during conversion, which might alter when a transaction becomes valid or what transaction format the device signs. The fixes ensure the correct values are copied before they are erased. There is no direct evidence this was exploitable as a security attack, but it could cause unexpected or invalid signatures in wallet software relying on this library.
Security candidaterust client: build PSBTv2 maps from all pairs, not an enumerated listby Salvatore Ingala · a16bb101 · Sep 17, 2026 · 4 filesMessage 73 · AdequateLow 35Details
Commit message · Salvatore Ingala
rust client: build PSBTv2 maps from all pairs, not an enumerated list
`get_v2_{global,input,output}_pairs` were a hand-maintained copy of rust-bitcoin's `Map::get_pairs`.
This is error-prone, and forced us to reimplement a lot of the (de)serialization logic.
Instead, we let rust-bitcoin serialization the psbt as v0, instead, and only touch the keys where v0 and v2 actually differ: drop PSBT_GLOBAL_UNSIGNED_TX, add the global v2 fields and each input's and output's v2 fields.
This also simplifies the code, as more is delegated to rust-bitcoin.
`get_v2_global_pairs`, `get_v2_input_pairs` and `get_v2_output_pairs` are replaced with a single `get_v2_maps` function, so the whole PSBT is serialized once rather than once per input and output.
Key order is irrelevant -- `add_known_mapping` and `get_merkleized_map_commitment` both sort -- so the commitments remain valid as per the app's expectations.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarysigning or wallet pathparser or protocol path
AI analysis · Low 35/100
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 silently dropping newer or unknown fields. The new code lets the rust-bitcoin library do most of the serialization, then only adds, removes, or changes the specific fields that differ between v0 and v2. It also adds checks that reject malformed PSBTs where v2 fields already exist and conflict with the v0 transaction data. The change is a defensive cleanup that reduces the chance of an incomplete or inconsistent PSBT being sent to the hardware wallet.
Remove obsolete workaround on stack utilization on Nano X
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 · Low 32/100
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 thought to have only 8 KB of stack space. The update increases the allowed stack size for the Nano X and moves that data structure back onto the stack. This is a routine code cleanup, but it changes how memory is allocated during the most memory-intensive signing operation. If the new stack limit is slightly wrong, it could in theory cause stack overflows or memory corruption during signing on a Nano X.
Merge pull request #558 from LedgerHQ/embit_private
Mark vendored embit clone 'private' in python client
73/100 · AdequateMessage clarity
✓ Specific, 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 · Informational 15/100
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 security fix or vulnerability present in the diff.
Security candidatePin @bitcoinerlab/descriptors to v3.1.7by Salvatore Ingala · 6262d104 · Aug 31, 2026 · 2 filesMessage 45 · ThinLow 25Details
Commit message · Salvatore Ingala
Pin @bitcoinerlab/descriptors to v3.1.7
45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
access control
AI analysis · Low 25/100
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 commit itself does not say whether it fixes a security bug. It is a routine dependency-management change with no direct evidence of a vulnerability being patched.
Security candidateReject 0x80000000 as an unhardened step in wallet policy parsingby Salvatore Ingala · 44f98a0e · Aug 31, 2026 · 1 fileMessage 73 · AdequateModerate 60Details
Commit message · Salvatore Ingala
Reject 0x80000000 as an unhardened step in wallet policy parsing
2147483648 must be rejected, as it would result in an hardened derivation step, which is no acceptable in BIP-388 (and would later fail address derivation and signing).
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarydefensive validationsigning or wallet path
AI analysis · Moderate 60/100
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 (0x80000000) because the check used 'greater than' instead of 'greater than or equal to'. That value actually represents a hardened step, which is forbidden here. The fix changes the comparison so 0x80000000 is correctly rejected. If accepted, it could later cause address derivation or signing to fail or behave unexpectedly.
Mark vendored embit clone 'private' in python client
It was always meant for internal use only, and not part of the public interface.
65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
cryptography-sensitive pathsigning or wallet path
AI analysis · Informational 15/100
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 changes; only import paths are updated. There is no security fix or vulnerability here.
Security candidateDelete the hash context before return in compute_rand_i_jby Salvatore Ingala · 121a18ce · Aug 27, 2026 · 1 fileMessage 73 · AdequateLow 33Details
Commit message · Salvatore Ingala
Delete the hash context before return in compute_rand_i_j
Defense-in-depth: once partial signatures are known, rand_i_j is sensitive data, and the hash context might allow retrieving it if leaked.
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 33/100
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' measure: once partial signatures are public, the internal randomness used to create them becomes sensitive, and leftover data in memory could theoretically help an attacker if they later gained access to the device's memory. There is no evidence this issue was exploited or publicly disclosed as a security vulnerability.
Security candidateAdditional validation in crypto_get_uncompressed_pubkeyby Salvatore Ingala · d7fc0f8a · Aug 27, 2026 · 1 fileMessage 55 · ThinModerate 61Details
Commit message · Salvatore Ingala
Additional validation in crypto_get_uncompressed_pubkey
Return with error if: - x is too large - x^3 + 7 is not a quadratic residue
55/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Provides an explanatory body
Why it was queued
cryptography-sensitive path
AI analysis · Moderate 61/100
This commit tightens checks in a Ledger Bitcoin app function that converts compressed public keys into full (x,y) public key points. Previously, the code did not verify that the supplied x-coordinate is a valid field element (less than the curve prime p) and did not confirm that the computed y really satisfies the secp256k1 curve equation. The patch adds both checks, rejecting malformed keys. Without these checks, a specially crafted compressed key could cause the function to produce a point that is not actually on the Bitcoin curve, which could then be used in subsequent cryptographic operations in unexpected ways.
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.
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.
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.'
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.
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.
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.