-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
FindLocalNodeFromDestionationId uses uninitialized IPKs #17940
Labels
Comments
Looks to be an off-by-one error with this fix:
|
msandstedt
added a commit
to msandstedt/connectedhomeip
that referenced
this issue
Apr 30, 2022
FindLocalNodeFromDestionationId is indexing 1 entry past the initialized IPK epoch keys, with the result that an all-zero key is accepted when one or two epoch-keys are installed. If three epoch keys are installed, this will reference out of bounds. This commit corrects the loop bound in this method to fix the problem. Testing: Manually tested with an initiator using an incorrect, all-zero key. Without the fix, CASE establishment succeeds. With the fix, the responder now correctly rejects the incoming establishment request. Fixes project-chip#17940
bzbarsky-apple
pushed a commit
that referenced
this issue
May 2, 2022
FindLocalNodeFromDestionationId is indexing 1 entry past the initialized IPK epoch keys, with the result that an all-zero key is accepted when one or two epoch-keys are installed. If three epoch keys are installed, this will reference out of bounds. This commit corrects the loop bound in this method to fix the problem. Testing: Manually tested with an initiator using an incorrect, all-zero key. Without the fix, CASE establishment succeeds. With the fix, the responder now correctly rejects the incoming establishment request. Fixes #17940
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
After AddNOC, we should have one valid IPK. However,
FindLocalNodeFromDestionationId
is considering uninitialized keys as candidates, meaning it will accept a match if the initiator uses an all-zero hmac(IPK) because uninitialized keys have this value.Proposed Solution
Make sure candidateDestinationIdSpan does not accept match against uninitialized IPK epoch keys.
The text was updated successfully, but these errors were encountered: