Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the vulnerabilty of #15462 issue #15474

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions connectivity/FEATURE_BLE/source/cordio/stack_adaptation/hci_tr.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +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);
break;
return;
0xc0170 marked this conversation as resolved.
Show resolved Hide resolved
}

/* see if entire header has been read */
Expand Down