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

Fix #45: Unable to initialize device with injected key #50

Merged
merged 2 commits into from
May 27, 2023
Merged

Conversation

gl-sergei
Copy link
Owner

  1. Change inject_key.py to preserve this flash storage layout:

    • 1KiB attestation certificate and key
    • 1KiB device key
    • 1KiB auth counter
  2. Change cert/gen.sh and friends to produce the same flash layout as above

1. Change inject_key.py to preserve this flash storage layout:
   - 1KiB attestation certificate and key
   - 1KiB device key
   - 1KiB auth counter

2. Change cert/gen.sh and friends to produce the same flash layout
   as above
u2f_attestation_cert_initialize instantiated temporary buffer
to hold "struct attestation_cert". After struct size was padded
to 1KiB, this code started to led to stack overrun.

Fix is to separate certificate header (length and pointers) from
the data and instantiate only header.
@gl-sergei gl-sergei merged commit 8e0afd9 into master May 27, 2023
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