hci_event ignores hci_event_hdr_t.length: per-spec bound for all variable-length events dropped (root cause)
Summary
hci_event(:163-176): m_copydata hdr{type,event,length}(:168) but NEVER reads validates or propagates hdr.length. hdr.length is HCI-specified total byte count of event params = natural upper bound for every variable-length sub-parser(num_compl_pkts pairs inquiry/rssi arrays command_complete return params). Dropped -> each sub-parser trusts separate in-band count with no cross-check or relies on KKASSERT panic-on-short. Root cause enabler for DF-0558/0559/0560. Fix: validate hdr.length<=pkthdr.len-sizeof(hdr), pass down, cap variable loops by remaining length.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-0561 Β· 1 files| File | Type | Description | Size | |
|---|---|---|---|---|
| manifest.json | file | 387 B | view raw |
Fix verification
not_testablerecommended fix identified; fix.diff not authored/validated in this batch
recommended fix identified; fix.diff not authored/validated in this batch
Confirmed kernel references
β
Detail
Exploit chain
none (Info severity)
Evidence (decisive lines)
Source-confirmed at sys/netbt/hci_event.c:163: hci_event ignores hci_event_hdr_t.length (per-spec bound dropped)
Verified recommended fix
Source-confirmed at sys/netbt/hci_event.c:163: hci_event ignores hci_event_hdr_t.length (per-spec bound dropped)
Verdict
Source-confirmed at sys/netbt/hci_event.c:163: hci_event ignores hci_event_hdr_t.length (per-spec bound dropped)
No comments yet.