[mac] reject unsecured Enh-Ack carrying IEs in response to a secured transmission - #13417
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request strengthens the MAC layer security in OpenThread by ensuring that secured IEEE 802.15.4-2015 frames are only acknowledged by secured Enhanced Acks. Previously, unsecured Acks were incorrectly accepted, which could lead to security vulnerabilities and incorrect neighbor link information. The changes include a validation check in the MAC processing logic and a comprehensive regression test to ensure future compliance. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request ensures that unsecured Enhanced Acknowledgments (Enh-Acks) are rejected for secured IEEE 802.15.4-2015 transmissions in Mac::ProcessEnhAckSecurity(). This prevents silent data loss and unverified radio metadata from affecting neighbor link info. It also introduces a test-only ACK interception hook in the Nexus simulation platform and adds a regression test to verify this behavior. There are no review comments, so I have no feedback to provide.
Library files
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13417 +/- ##
==========================================
+ Coverage 70.26% 74.05% +3.78%
==========================================
Files 711 710 -1
Lines 99339 96814 -2525
==========================================
+ Hits 69804 71694 +1890
+ Misses 29535 25120 -4415
🚀 New features to boost your workflow:
|
abtink
left a comment
There was a problem hiding this comment.
The change LGTM. Thanks @aussinfosec
One suggestion about the test.
62be1e5 to
811723b
Compare
…transmission This commit updates `Mac::ProcessEnhAckSecurity()` to reject an unsecured Enh-Ack that carries IEs in response to a secured version-2015 transmission. Unsecured acks remain accepted in all other cases: unsecured transmissions, IE-less unsecured Enh-Acks, and Imm-Acks (which cannot carry IEs).
811723b to
c38d356
Compare
abtink
left a comment
There was a problem hiding this comment.
Thanks for all the changes. LGTM. 👍
Per the Thread specification, in response to a transmitted MAC-secured Frame Version 0b10 frame a device MUST accept either an Enh-Ack frame that is MAC-secured, or an Enh-Ack frame that is not MAC-secured and does not carry any IEs (thanks @abtink for the precise reference).
Mac::ProcessEnhAckSecurity()currently accepts ANY unsecured ack for a secured version-2015 transmission via the earlykErrorNonereturn, including an unsecured Enh-Ack carrying IEs, which falls outside both acceptable categories. Such an ack then reachesProcessEnhAckProbing(), which parses its Link Metrics probing IE with no security gate (unlikeProcessCsl(), which requires key ID mode 1 security).This change rejects an unsecured Enh-Ack that carries IEs in response to a secured version-2015 transmission, and continues to accept all other unsecured acks: unsecured transmissions, IE-less unsecured Enh-Acks (as the specification requires), and Imm-Acks (which cannot carry IEs).