Android security tags, read closely by Lightrion

CVE-2025-22408 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 (9 corrections). Verify against the commit before relying on it.

Across nine L2CAP send sites in eight Bluetooth stack files (AVCTP, BNEP, HID device, RFCOMM, SDP client and server), the failure-path log::warn no longer reads ->len from the BT_HDR buffer after L2CA_DataWrite. The length is now saved in a local before the call, or taken from the pointer difference already computed for it.

Root cause

At each affected site the code passes a BT_HDR* (p_buf, p_msg, p, hd_cb.pending_data) to L2CA_DataWrite. When the call does not return L2CAP_DW_SUCCESS, it logs `...->len` from that same buffer. Per the commit message, the preceding call may already have freed the buffer in exceptional cases, so the log statement reads 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