coldcard: fix get_soft_device_id() discarding its return value
What changed, and why it matters
This is a tiny one-line bug fix in Electrum's Coldcard hardware wallet plugin. A helper method that is supposed to fetch a software-based device identifier was calling the parent implementation but accidentally throwing away the result instead of returning it. The fix simply adds 'return'. On its own this is a routine correctness bug with very limited security implications; it could cause Electrum to fail to recognize or distinguish a Coldcard device, but it does not let an attacker steal funds or bypass protections directly.
Apply the patch; it is a straightforward correctness fix. Users relying on Coldcard hardware wallets should update to a release containing this commit to avoid minor device-identification issues. No urgent security response is indicated by the diff alone.
Security signals we found
Missing return value causes method to always return None
Affects hardware wallet device identification only
No change to signing, encryption, or authentication code
No input validation, injection, or memory-safety issue evident
Evidence from the diff
In electrum/plugins/coldcard/coldcard.py, CKCCClient.get_soft_device_id() previously called super().get_soft_device_id() without returning its value, so the method always returned None (unless an exception was raised). The patch adds the missing ‘return’. get_soft_device_id is used by Electrum’s hardware wallet abstraction to obtain a stable device identifier for wallet matching and persistence. Returning None could degrade device identification, potentially leading to duplicate wallet entries or confusion when multiple Coldcards are used, but it does not alter transaction signing logic, key derivation, or user confirmation flows.
Changed components
electrum/plugins/coldcard/coldcard.pyCKCCClient.get_soft_device_id()Inspect captured patch +1 / −1
diff --git a/electrum/plugins/coldcard/coldcard.py b/electrum/plugins/coldcard/coldcard.py
index e92c6c2..b73cecf 100644
--- a/electrum/plugins/coldcard/coldcard.py
+++ b/electrum/plugins/coldcard/coldcard.py
@@ -93,7 +93,7 @@ class CKCCClient(HardwareClientBase):
def get_soft_device_id(self) -> Optional[str]:
try:
- super().get_soft_device_id()
+ return super().get_soft_device_id()
except CCProtoError:
return None
Why this scored 18/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.