Android security tags, read closely by Lightrion

CVE-2024-0016 AI-generated analysis

platform/packages/modules/Bluetooth, system/stack BTM / BTU HCI event parsing (btm_ble_gap.cc, btu_hcif.cc)

AI-generated: written from the bulletin and the fixing diffs by claude-fable-5-1, then checked against the code by claude-opus-5-5 (7 corrections). Verify against the commit before relying on it.

Adds length validation to four HCI BLE event parsers in the Bluetooth stack (BIGInfo advertising report, LE advertising report, LE extended advertising report, LE data length change) so that fixed-size fields and per-report variable data are only read when the received packet actually contains them.

Root cause

Several HCI LE event handlers read fields with STREAM_TO_* macros without first checking the payload length. btm_ble_biginfo_adv_report_rcvd read 19 bytes of fixed fields with no check on param_len. btu_ble_data_length_change_evt read 8 bytes with no evt_len >= 8 check. btm_ble_process_adv_pkt and btm_ble_process_ext_adv_pkt read num_reports without checking data_len >= 1, and their per-report checks were pointer comparisons against data + data_len. The commit describes the result as missing bounds checks that could lead to out-of-bounds access.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to January 2024 · Findings