Skip to content

Commit b87e148

Browse files
committed
fix vulnerability in BLE cordio
1 parent 1a036c2 commit b87e148

File tree

1 file changed

+11
-1
lines changed
  • connectivity/FEATURE_BLE/source/cordio/stack_adaptation

1 file changed

+11
-1
lines changed

connectivity/FEATURE_BLE/source/cordio/stack_adaptation/hci_tr.c

+11-1
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,18 @@ void hciTrSerialRxIncoming(uint8_t *pBuf, uint8_t len)
170170
hdrLen = HCI_EVT_HDR_LEN;
171171
break;
172172
default:
173-
/* invalid packet type */
173+
/**
174+
* invalid packet type
175+
*
176+
* fix: Simply employing WSF_ASSERT in the event of
177+
* an "invalid packet type" is not reasonable.
178+
* Instead, it is advisable to discard this data packet,
179+
* exit the packet processing function,
180+
* and adjust the stateRx back to HCI_RX_STATE_IDLE.
181+
*/
182+
stateRx = HCI_RX_STATE_IDLE;
174183
WSF_ASSERT(0);
184+
return;
175185
break;
176186
}
177187

0 commit comments

Comments
 (0)