This uses skb_pull_data to check the LE Advertising Report events received have the minimum required length.
Showing the changes to include (1 of 2 files). Show all
Unified · Split
| @@ -2445,13 +2445,18 @@ struct hci_ev_le_conn_complete { · 2444 unmodified lines | |||
| 2445 | 2445 | ||
| 2446 | #define HCI_EV_LE_ADVERTISING_REPORT 0x02 | 2446 | #define HCI_EV_LE_ADVERTISING_REPORT 0x02 |
| 2447 | struct hci_ev_le_advertising_info { | 2447 | struct hci_ev_le_advertising_info { |
| 2448 | __u8 evt_type; | 2448 | __u8 type; |
| 2449 | __u8 bdaddr_type; | 2449 | __u8 bdaddr_type; |
| 2450 | bdaddr_t bdaddr; | 2450 | bdaddr_t bdaddr; |
| 2451 | __u8 length; | 2451 | __u8 length; |
| 2452 | __u8 data[]; | 2452 | __u8 data[]; |
| 2453 | } __packed; | 2453 | } __packed; |
| 2454 | 2454 | ||
| 2455 | struct hci_ev_le_advertising_report { | ||
| 2456 | __u8 num; | ||
| 2457 | struct hci_ev_le_advertising_info info[]; | ||
| 2458 | } __packed; | ||
| 2459 | |||
| 2455 | #define HCI_EV_LE_CONN_UPDATE_COMPLETE 0x03 | 2460 | #define HCI_EV_LE_CONN_UPDATE_COMPLETE 0x03 |
| 2456 | struct hci_ev_le_conn_update_complete { | 2461 | struct hci_ev_le_conn_update_complete { |
| 2457 | __u8 status; | 2462 | __u8 status; |