Skip to content

Commit

Permalink
[trel] bugfix for MAC security failure on key sequence change (openth…
Browse files Browse the repository at this point in the history
…read#9371)

In multi-radio scenarios, any key sequence change currently resets the
MAC frame counter for the PHY link over which the first frame (with
new keyId and frame counter) is received. Since the neighbor key
sequence is already modified, any subsequent frame received over the
alternate PHY would have match the neighbor key sequence, but
potentially smaller frame counter, which leads to drops due to
security failure.
  • Loading branch information
sarveshkumarv3 authored and Karol Witusik committed Aug 27, 2023
1 parent fd0d347 commit b6942c1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/mac/mac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1603,6 +1603,7 @@ Error Mac::ProcessReceiveSecurity(RxFrame &aFrame, const Address &aSrcAddr, Neig
{
aNeighbor->SetKeySequence(keySequence);
aNeighbor->SetMleFrameCounter(0);
aNeighbor->GetLinkFrameCounters().Reset();
}

#if OPENTHREAD_CONFIG_MULTI_RADIO
Expand Down

0 comments on commit b6942c1

Please sign in to comment.