What changed, and why it matters
This commit adds a new automated test file that checks whether sending a simple 'ping' message to a Jade hardware wallet interrupts an ongoing signing process. It is purely a test addition with no changes to production code, and it does not fix or introduce any security vulnerability.
No security action required. Review as normal test code if desired.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit introduces tests/rpc/test_ping.py, a pytest-style RPC test that verifies the ping RPC does not break the sign_message/get_signature protocol. It compares an uninterrupted signing flow against one where a ping and a nonblocking get_version_info call are inserted between sign_message and get_signature, asserting that the resulting signature and commitments match. No firmware, library, or protocol code is modified.
Changed components
tests/rpc/test_ping.pyInspect captured patch +43 / −0
### tests/rpc/test_ping.py
@@ -0,0 +1,43 @@
+import os
+from . import *
+
+
+NUM_VALUES_VERINFO = 22
+
+
+def wait(seconds, force=False):
+ if transport_is_not('libjade'):
+ time.sleep(seconds)
+
+
+def test_ping_protocol(jade):
+ """Test ping doesn't break signing protocol"""
+ # Random ae data as irrelevant, so long as same in both cases
+ signmsg = jade.jade.build_request('signABC', 'sign_message',
+ {'path': [0, 16],
+ 'message': 'TestABC',
+ 'ae_host_commitment': os.urandom(32)})
+ getsig = jade.jade.build_request('getsigABC', 'get_signature',
+ {'ae_host_entropy': os.urandom(32)})
+
+ # Uninterrupted flow
+ commitABC1 = jade.jade.make_rpc_call(signmsg)['result']
+ sigABC1 = jade.jade.make_rpc_call(getsig)['result']
+
+ # Same messages but with a 'ping' packet between protocol messages
+ commitABC2 = jade.jade.make_rpc_call(signmsg)['result']
+ assert commitABC2 == commitABC1
+
+ jade_is_busy = jade.jade.make_rpc_call(jade.jade.build_request('pingNOW', 'ping'))['result']
+ assert jade_is_busy == 1 # handling a message (the sign-msg sent above)
+
+ verinfo = jade.jade.make_rpc_call(jade.jade.build_request('verInfoNOW', 'get_version_info',
+ {'nonblocking': True}))['result']
+ assert len(verinfo) == NUM_VALUES_VERINFO
+
+ sigABC2 = jade.jade.make_rpc_call(getsig)['result']
+ assert sigABC2 == sigABC1
+
+ wait(1) # short delay to ensure return to idle status
+ jade_is_busy = jade.jade.make_rpc_call(jade.jade.build_request('pingAGAIN', 'ping'))['result']
+ assert jade_is_busy == 0 # idleWhy this scored 15/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.