From c6ffe1ae2cec4adfd829db15a50a96de1f226772 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Tue, 31 Oct 2023 15:33:33 -0700 Subject: [PATCH] [mac] validate received ack frame PSDU in `ProcessEnhAckSecurity()` (#9565) --- src/core/mac/mac.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/mac/mac.cpp b/src/core/mac/mac.cpp index fe41b62b9da..559d53137de 100644 --- a/src/core/mac/mac.cpp +++ b/src/core/mac/mac.cpp @@ -1659,6 +1659,8 @@ Error Mac::ProcessEnhAckSecurity(TxFrame &aTxFrame, RxFrame &aAckFrame) VerifyOrExit(aAckFrame.GetSecurityEnabled(), error = kErrorNone); VerifyOrExit(aAckFrame.IsVersion2015()); + SuccessOrExit(aAckFrame.ValidatePsdu()); + IgnoreError(aAckFrame.GetSecurityLevel(securityLevel)); VerifyOrExit(securityLevel == Frame::kSecurityEncMic32);