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] Fix 1kB ping crash #83

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

szszszsz
Copy link

@szszszsz szszszsz commented Jul 7, 2018

Following patch should fix #67 (crash on 1kB ping message). Changes:

  • Do not handle PING as a custom command (only on FINAL stage firmware).
  • Add new command for the Python client: ping.

Porting fix from Nitrokey/nitrokey-fido-u2f-firmware, where it was tested. Not tested on U2F-Zero hardware. For solution-related questions please ask @adamglozik directly.

WIP prefix added, since the build (tested on Simplicity Studio v3 / Keil v9.53, ATECC_SETUP_DEVICE not defined) is blocked due to an unrelated compilation error for u2f_printx disabling macro (see TOFIX prefixed commit), which needs correction (ideally by removing TOFIX commit and applying chosen approach with the macros).

Edit 20180709: added missing brace and removed TOFIX commit.

Fixes #67

CC: @adamglozik @jans23

adamglozik and others added 5 commits July 7, 2018 12:23
Continuation U2F HID packets with a sequence number equal to a custom command code are mistakenly processed as a custom command which leads to corrupted ping response and unwanted custom command execution.
The current bugfix corrects this issue, the firmware works well now with any size of ping commands.
Signed-off-by: Szczepan Zalega <[email protected]>
Signed-off-by: Szczepan Zalega <[email protected]>
@szszszsz
Copy link
Author

szszszsz commented Jul 9, 2018

I have added missing brace and removed TOFIX commit.

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.

U2F Zero crashes on 1KiB ping message
2 participants