Android security tags, read closely by Lightrion

CVE-2025-22406 AI-generated analysis

platform/packages/modules/Bluetooth, system/stack (avct, bnep, hid, rfcomm, sdp)

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.

At nine L2CAP send sites in eight Bluetooth stack files (AVCT, BNEP, HID device, RFCOMM, SDP), the log::warn on the failure path no longer reads the BT_HDR buffer after it has been passed to L2CA_DataWrite. The length is now saved in a local before the call or computed from pointers the code already has.

Root cause

At each patched site the code calls L2CA_DataWrite(cid, p_buf). When the call does not return L2CAP_DW_SUCCESS, it then logs p_buf->len (or hd_cb.pending_data->len, p->len, p_msg->len). The commit message says that in exceptional cases the buffer may already have been freed by the preceding call, so the log statement can read freed memory. The pattern was present in avct_lcb_msg_ind, bnep_congestion_ind, bnepu_check_send_packet, hidd_check_config_done, rfc_send_buf_uih, rfc_check_send_cmd, process_service_attr_rsp, process_service_search and process_service_attr_req.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to March 2025 · Findings