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

crypto/ccm: bugs in the implementation of CCM mode #8107

Closed
8 tasks done
cladmi opened this issue Nov 22, 2017 · 1 comment · Fixed by #13049
Closed
8 tasks done

crypto/ccm: bugs in the implementation of CCM mode #8107

cladmi opened this issue Nov 22, 2017 · 1 comment · Fixed by #13049
Assignees
Labels
Area: crypto Area: Cryptographic libraries Area: tests Area: tests and testing framework Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Type: tracking The issue tracks and organizes the sub-tasks of a larger effort

Comments

@cladmi
Copy link
Contributor

cladmi commented Nov 22, 2017

This issue summarize all the issues I have found when trying to add tests for #6706 for sys/crypto/modes/ccm.c

Issues shown in the PR:

  • Upper bound for auth_data_len should be 0xFEFF. https://tools.ietf.org/html/rfc3610 2.2 page
  • Wrong check for input plaintext message length against len encoding.
  • buffer overflow if auth_data_len is larger than 26

Problems found when adding tests:

  • In tests 'len_encoding' and 'mac_length' are hardwritten.
  • Tests do not support input_len >= 256
  • ccm code will break if length_encoding >= 4 (even with PR fix because of overflow).
  • Code is not saving enough bytes when saving plaintext_length (off by one limit)
  • CCM is broken with input_len >= 256 (so broken even when fixing previous point)

This is to track and fix all what was done in #7968.
The PRs will use and replace #6706

@cladmi cladmi added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: crypto Area: Cryptographic libraries Area: tests Area: tests and testing framework labels Nov 22, 2017
@cladmi cladmi self-assigned this Nov 22, 2017
@cladmi cladmi added the Type: tracking The issue tracks and organizes the sub-tasks of a larger effort label Sep 28, 2018
@cladmi cladmi added this to the Release 2019.01 milestone Oct 25, 2018
mtausig added a commit to mtausig/RIOT that referenced this issue Oct 2, 2019
mtausig added a commit to mtausig/RIOT that referenced this issue Oct 2, 2019
mtausig added a commit to mtausig/RIOT that referenced this issue Oct 2, 2019
mtausig added a commit to mtausig/RIOT that referenced this issue Oct 3, 2019
mtausig added a commit to mtausig/RIOT that referenced this issue Oct 9, 2019
mtausig added a commit to mtausig/RIOT that referenced this issue Oct 16, 2019
@fjmolinas fjmolinas added this to the Release 2020.01 milestone Dec 17, 2019
@fjmolinas
Copy link
Contributor

@aabadie can we check the 8bit/16bit point since #12645 is in?

mtausig added a commit to mtausig/RIOT that referenced this issue Jan 5, 2020
fjmolinas pushed a commit to fjmolinas/RIOT that referenced this issue Jan 7, 2020
fjmolinas pushed a commit to fjmolinas/RIOT that referenced this issue Jan 7, 2020
mtausig added a commit to mtausig/RIOT that referenced this issue Jan 7, 2020
mtausig added a commit to mtausig/RIOT that referenced this issue Jan 7, 2020
mtausig added a commit to mtausig/RIOT that referenced this issue Jan 7, 2020
fjmolinas pushed a commit to fjmolinas/RIOT that referenced this issue Jan 8, 2020
fjmolinas pushed a commit to fjmolinas/RIOT that referenced this issue Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: crypto Area: Cryptographic libraries Area: tests Area: tests and testing framework Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Type: tracking The issue tracks and organizes the sub-tasks of a larger effort
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants