[mac] verify that Security Level is correct in rx frame (#4905)
[mac] verify that Security Level is correct in rx frame (#4905)

This commit adds a check in `Mac::ProcessReceiveSecurity()` to verify
that the Security Level in the received frame is properly set to
`kSecEncMic32` before trying to decrypt and validate the frame. This
helps avoid performing AES-CCM when frame is invalid and also avoid
potentially reading beyond the frame length when checking MIC/footer.
chshu/openthread,bukepo/openthread,chshu/openthread,bukepo/openthread,bukepo/openthread,abtink/openthread,srickardti/openthread,chshu/openthread,lanyuwen/openthread,srickardti/openthread,srickardti/openthread,bukepo/openthread,chshu/openthread,jwhui/openthread,abtink/openthread,librasungirl/openthread,openthread/openthread,lanyuwen/openthread,openthread/openthread,librasungirl/openthread,abtink/openthread,lanyuwen/openthread,lanyuwen/openthread,jwhui/openthread,lanyuwen/openthread,chshu/openthread,abtink/openthread,librasungirl/openthread,chshu/openthread,jwhui/openthread,jwhui/openthread,srickardti/openthread,lanyuwen/openthread,librasungirl/openthread,openthread/openthread,openthread/openthread