Skip to content

Commit 50280c6

Browse files
cvinayaknashif
authored andcommitted
Bluetooth: Controller: Ignore PDU with RFU field set
Ignore received Extended Advertising PDU with RFU field set in the Common Extended Advertising Payload Format of the PDU. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 41ed5b2 commit 50280c6

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

subsys/bluetooth/controller/ll_sw/pdu.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,9 @@ struct pdu_adv_ext_hdr {
251251
uint8_t aux_ptr:1;
252252
uint8_t sync_info:1;
253253
uint8_t tx_pwr:1;
254-
uint8_t rfu1:1;
254+
uint8_t rfu:1;
255255
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
256-
uint8_t rfu1:1;
256+
uint8_t rfu:1;
257257
uint8_t tx_pwr:1;
258258
uint8_t sync_info:1;
259259
uint8_t aux_ptr:1;

subsys/bluetooth/controller/ll_sw/ull_scan_aux.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,15 @@ void ull_scan_aux_setup(memq_link_t *link, struct node_rx_hdr *rx)
245245
}
246246

247247
h = (void *)p->ext_hdr_adv_data;
248+
249+
/* Regard PDU as invalid if a RFU field is set, we do not know the
250+
* size of this future field, hence will cause incorrect calculation of
251+
* offset to ACAD field.
252+
*/
253+
if (h->rfu) {
254+
goto ull_scan_aux_rx_flush;
255+
}
256+
248257
ptr = h->data;
249258

250259
if (h->adv_addr) {

0 commit comments

Comments
 (0)