Skip to content

Commit

Permalink
fix vulnerability in BLE cordio
Browse files Browse the repository at this point in the history
  • Loading branch information
fireknight-hJ committed Dec 3, 2023
1 parent 1a036c2 commit b87e148
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion connectivity/FEATURE_BLE/source/cordio/stack_adaptation/hci_tr.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,18 @@ void hciTrSerialRxIncoming(uint8_t *pBuf, uint8_t len)
hdrLen = HCI_EVT_HDR_LEN;
break;
default:
/* invalid packet type */
/**
* invalid packet type
*
* fix: Simply employing WSF_ASSERT in the event of
* an "invalid packet type" is not reasonable.
* Instead, it is advisable to discard this data packet,
* exit the packet processing function,
* and adjust the stateRx back to HCI_RX_STATE_IDLE.
*/
stateRx = HCI_RX_STATE_IDLE;
WSF_ASSERT(0);
return;
break;
}

Expand Down

0 comments on commit b87e148

Please sign in to comment.