Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: enable integer overflow checks for release builds #70

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ryankurte
Copy link
Contributor

integer overflow checks would be nice to have, however, these cause summary and ring operations to fail with what is either a mishandled panic or a stack related regression, resulting in an extremely cursed series of observations:

  • fault only exists in hw, this is not reproducible in speculos or local tests using -exactly the same- mnemonics and test vectors
    (if an integer overflow panic was the cause i would expect to see the same fault in speculos?)
  • USB transport reports zero length response / missing HID header
    (something has gone wrong at the OS level when attempting to respond, for example, attempting to panic while exceeding the stack pointer limitation?)
  • app continues to run and respond to user inputs following this failure
    (a panic should result in an abort, but this could be a failure of the nanos_sdk panic handler?)

reproduce by:

  • configuring a nanosplus with the test mnemonic (duck diamond ...) to match the test vectors
  • building and loading the firmware from this branch with make nanosplus-load
  • running the transaction test with cargo run --bin ledger-mob-tests -- --target hid tx --input tests/vectors/tx3.json

@ryankurte ryankurte requested a review from a team as a code owner July 5, 2023 00:26
@ryankurte ryankurte self-assigned this Jul 5, 2023
(this seems to cause a stack use regression...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants