Repository navigation
Conversation
The <5.8 cap from bitcoin-core#817 traps downstreams at cbor2 versions vulnerable to GHSA-3c37-wwvx-h642 (high-severity DoS in cbor2.loads), first patched in 5.9.0. Empirical testing on real Jade hardware shows stock HWI 3.2.0 + cbor2 5.9.0 completes signing successfully. Whatever broke in 5.8.0 is fixed in 5.9.0 itself. Test matrix and logs at https://github.com/al-munazzim/hwi-jade-cbor-repro Excludes 5.8.0 explicitly (still freezes Jade on pyserial transports per the test matrix). poetry.lock not regenerated in this commit; maintainers may prefer to handle that separately or defer until next release.
Author
4 of 5 tasks
Member
From that commit:
So this would be hard to miss. |
Author
Author
|
Any feedback, @Sjors ?! |
k9ert
added a commit
to k9ert/specter-desktop
that referenced
this pull request
May 22, 2026
Brings: Trezor Safe 5 support, Ledger Nano model IDs, tr() single-leaf
descriptor parsing fix, Debian Buster Linux build compat.
requires-python lifted from >=3.7,<4.0 to >=3.9,<3.13 — HWI 3.x drops
3.7/3.8 (and caps at <3.13). Drops support for those Python versions.
API impact on Specter (verified): all hwilib symbols Specter imports
(hwwclient, errors, key, psbt, _script, descriptor, common,
bitbox02_lib.util, trezorlib.{transport,messages,protobuf}) are
unchanged 2.4 -> 3.1. enumerate() gained allow_emulators=False kwarg
(default ignores emulators). Specter's own simulator paths in vendored
jade/keepkey/specter_diy clients are unaffected; the only behavioral
change is Trezor emulator no longer auto-discovered through Specter
(no callers observed in tests/).
cbor2 stays at 5.9.0 — HWI 3.1's cap is <6.0.0, no conflict. (HWI 3.2
introduces a <5.8 cap that conflicts with the GHSA-3c37-wwvx-h642 fix
floor; relax PR filed upstream as bitcoin-core/HWI#832, prerequisite
for a later 3.2/3.3 bump.)
Note: only mechanical add'n to requirements.txt is the new pip-tools 7
boilerplate text; cbor2 and all other transitive deps unchanged.
Refs:
- cryptoadvance#2597 (BitBox02
Nova; deferred to 3.2/3.3 bump after upstream cap relax merges)
- bitcoin-core/HWI#832
|
ACK from me. |
Member
|
utACK 400f89c The failing ledger tests seem unrelated. Same for the Trezor sim builder failure. |
Author
|
So we can expect a merge soon? Or what is still missing? |
Member
Member
|
please rebase |
Member
|
superseded by #843 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Relax the
cbor2constraint from>=5.4.6,<5.8to>=5.4.6,!=5.8.0,<6.0.0, allowing downstreams to install HWI together withcbor2>=5.9.0.Motivation
The current
<5.8cap was introduced in 38fae57 ("Constrain cbor2 to <5.8") in response to #817 —cbor2==5.8.0changes the decoder's stream-read pattern fromread(n=1)toread(n=4096), which causes Jade signing to hang on pyserial-style transports.That fix made sense at the time, but it traps downstream users at a vulnerable version of cbor2:
cbor2.loads. Affects allcbor2 < 5.9.0.cbor2 >= 5.8.0.The high-severity advisory is unfixable under the current cap. Downstream projects that pin
cbor2>=5.9.0for security cannot install HWI 3.2.0 without overriding the resolver.Evidence
I built a hardware-in-the-loop matrix that exercises the full Jade signing path (
enumerate→getmasterxpub→signtx) under HWI 3.2.0 against cbor2 versions 5.7.1, 5.8.0, and 5.9.0, with and without a candidate read-loop patch.Test repo (with raw logs and reproduction instructions): https://github.com/al-munazzim/hwi-jade-cbor-repro
Tested on macOS 15.4.1, Python 3.9.23, HWI 3.2.0, against an unlocked Jade signer. The key cell: stock HWI 3.2.0 + cbor2 5.9.0 completes Jade signing successfully without any code change in HWI. Whatever changed in cbor2 5.8.0 to break the read pattern appears resolved in 5.9.0 itself.
Scope
This PR is intentionally minimal: cap relax only.
The
JadeInterface.read()loop is still fragile — a future cbor2 change could in principle re-trigger the freeze. Hardening that path is a separate concern and a candidate follow-up PR (the patch from the test repo above can be the basis).cbor2 == 5.8.0is excluded explicitly (!= 5.8.0) since the FROZEN result there is reproducible and confirmed on real hardware.Changes
pyproject.toml:cbor2 = ">=5.4.6,<5.8"→cbor2 = ">=5.4.6,!=5.8.0,<6.0.0"setup.py: same constraint (kept in sync with pyproject)poetry.locknot regenerated in this PR. Happy to add a follow-up commit regenerating it if that is the convention; otherwise it can be regenerated at next release.Refs
cbor2 >= 5.9.0