Skip to content

fix: EIP-712 cancel propagation and strtoll input validation#239

Open
BitHighlander wants to merge 2 commits into
developfrom
fix/eip712-security
Open

fix: EIP-712 cancel propagation and strtoll input validation#239
BitHighlander wants to merge 2 commits into
developfrom
fix/eip712-security

Conversation

@BitHighlander
Copy link
Copy Markdown
Owner

Summary

Two EIP-712 signing security fixes:

Cancel ignored: confirmName() and confirmValue() cast review() return to void, so pressing cancel on the device didn't stop signing. Added USER_CANCELLED error code and propagate it up through the call chain.

strtoll overflow/garbage: strtoll() was called with NULL endptr, silently accepting trailing garbage and undefined behaviour on overflow. Added endptr validation and rejection of negative values for uint types.

Test plan

  • CI green
  • Cancelling EIP-712 signing mid-flow returns ActionCancelled
  • Non-numeric uint value returns error

Bug 1 (cancel ignored): confirmName() and confirmValue() cast review()
return value to void, allowing signing to continue after user presses
cancel. Added USER_CANCELLED error code and propagate cancellation up
through the call chain.

Bug 2 (strtoll overflow/garbage): strtoll() was called with NULL endptr,
silently accepting trailing garbage and wrapping on overflow. Added endptr
validation to reject non-numeric input, and reject negative values for
uint types.
deps/device-protocol → 8ef74da (feat(ripple): memo + THORChain routing)
deps/python-keepkey  → bf870e6 (7.14.2: XRP memo + EVM depositWithExpiry + msg-signing)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant