Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[mac] select proper key based on key index #13343

Copy link
Copy link

Description

@abtink
Issue body actions

Submitting this issue to address key selection in MAC security processing.

In SubMac::ProcessTransmitSecurity(void), the AES key is set using mTransmitFrame.SetAesKey(GetCurrentMacKey());. This hardcodes the transmission to always use the current active MAC key.

While this works in most scenarios, it fails during retransmissions (such as indirect frame retx). In these cases, the key index (Key ID) of the original transmission attempt is saved and reapplied to the frame. If that original attempt occurred right before a key rotation, the required key index actually points to the previous MAC key (Key Sequence - 1), but the code will incorrectly force the new, current key.

The same issue is present in Mac::ProcessTransmitSecurity(TxFrame &aFrame) when processing TREL frames.

Proposed Solution

Instead of defaulting to GetCurrentMacKey(), read the key index directly from the frame's headerand use that index value to resolve and apply the correct key.

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

Morty Proxy This is a proxified and sanitized view of the page, visit original site.