fix(core/thp): disable THP ACK piggybacking as a workaround for #6506
What changed, and why it matters
This commit temporarily disables a performance feature called 'THP ACK piggybacking' in Trezor firmware to reduce the chance of triggering an unrelated bug referenced as issue #6506. It is described as a workaround, not a complete fix. The underlying bug can still occur, but only if a network acknowledgment is delayed by more than 200 milliseconds. The change lowers the protocol version minor number from 1 to 0 and stops the device from enabling ACK piggybacking during the handshake. There is no direct evidence in the commit that this is a security vulnerability, and no changelog entry is added.
Treat this as a defensive workaround pending a proper fix for issue #6506. Monitor the referenced issue for the root-cause patch and re-enable ACK piggybacking only after #6506 is resolved and the fix is reviewed. If this firmware is being evaluated for security certification, request details on #6506 from the vendor to assess whether the underlying bug has security implications.
Security signals we found
Workaround for an unspecified bug (#6506) with timing-related trigger condition (>200ms ACK delay)
Feature rollback (protocol version minor 1 -> 0) to avoid compatibility path
No changelog entry added despite user-facing protocol change
No CVE, advisory, or researcher attribution present in commit materials
Evidence from the diff
The patch removes the changelog entry for ‘Support receive-side THP ACK piggybacking’ and disables the feature in two places: (1) the THP protocol version minor is rolled back from 1 to 0, and (2) the handshake handler no longer calls ABP.allow_ack_piggybacking() when the ACK bit is set in handshake_init_req. Comments indicate this is a workaround for issue #6506, which can still happen without piggybacking but with much lower probability (requires >200ms THP ACK delay over USB). The actual bug in #6506 is not shown, so the security relevance is inferred only from the workaround language.
Changed components
core/src/trezor/wire/thp/__init__.pycore/src/trezor/wire/thp/received_message_handler.pyTrezor Core THP (Trezor Host Protocol) implementationInspect captured patch +7 / −6
diff --git a/core/.changelog.d/6202.added b/core/.changelog.d/6202.added
deleted file mode 100644
index c50964dc..00000000
--- a/core/.changelog.d/6202.added
+++ /dev/null
@@ -1 +0,0 @@
-Support receive-side THP ACK piggybacking.
diff --git a/core/src/trezor/wire/thp/__init__.py b/core/src/trezor/wire/thp/__init__.py
index 0945178f..201b433f 100644
--- a/core/src/trezor/wire/thp/__init__.py
+++ b/core/src/trezor/wire/thp/__init__.py
@@ -210,7 +210,8 @@ def _get_device_properties(iface: WireInterface) -> ThpDeviceProperties:
internal_model=utils.INTERNAL_MODEL,
model_variant=model_variant,
protocol_version_major=2,
- protocol_version_minor=1,
+ # TODO: re-enable THP ACK piggybacking after #6506 is fixed
+ protocol_version_minor=0,
)
diff --git a/core/src/trezor/wire/thp/received_message_handler.py b/core/src/trezor/wire/thp/received_message_handler.py
index b0b6e310..bd17f8f1 100644
--- a/core/src/trezor/wire/thp/received_message_handler.py
+++ b/core/src/trezor/wire/thp/received_message_handler.py
@@ -106,10 +106,11 @@ async def _handle_state_handshake(
def _handshake_callback(ctrl_byte: int) -> bool:
success = control_byte.is_handshake_init_req(ctrl_byte)
- if success and control_byte.get_ack_bit(ctrl_byte) == 1:
- # Newer Suite versions will send `handshake_init_req` with a non-zero ACK bit.
- # The device should not use ACK piggybacking with older Suite versions.
- ABP.allow_ack_piggybacking(ctx.channel_cache)
+ # TODO: re-enable THP ACK piggybacking after #6506 is fixed
+ # if success and control_byte.get_ack_bit(ctrl_byte) == 1:
+ # # Newer Suite versions will send `handshake_init_req` with a non-zero ACK bit.
+ # # The device should not use ACK piggybacking with older Suite versions.
+ # ABP.allow_ack_piggybacking(ctx.channel_cache)
if __debug__:
ctx._log(
Why this scored 34/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.