Skip to content

Commit 9b0cf78

Browse files
joerchancarlescufi
authored andcommitted
[nrf fromtree] Bluetooth: controller: Check length field of scan ...
... response data Check the length field of the scan response data. Signed-off-by: Joakim Andersson <[email protected]> (cherry picked from commit 95e359d) Signed-off-by: Joakim Andersson <[email protected]>
1 parent d120ab1 commit 9b0cf78

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

subsys/bluetooth/controller/ll_sw/ull_adv.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1572,6 +1572,10 @@ uint8_t ull_scan_rsp_set(struct ll_adv_set *adv, uint8_t len,
15721572
struct pdu_adv *pdu;
15731573
uint8_t idx;
15741574

1575+
if (len > PDU_AC_DATA_SIZE_MAX) {
1576+
return BT_HCI_ERR_INVALID_PARAM;
1577+
}
1578+
15751579
/* update scan pdu fields. */
15761580
prev = lll_adv_scan_rsp_peek(&adv->lll);
15771581
pdu = lll_adv_scan_rsp_alloc(&adv->lll, &idx);

0 commit comments

Comments
 (0)