Android security tags, read closely by Lightrion

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

Across nine L2CA_DataWrite call sites in the Bluetooth stack (AVCT, BNEP, HID device, RFCOMM, SDP), the failure-path log::warn no longer dereferences the BT_HDR buffer that was passed to L2CA_DataWrite; instead the length is stored in a local before the call or recomputed from pointer arithmetic.

Root cause

Several stack layers call L2CA_DataWrite(cid, p_buf). When it returns something other than L2CAP_DW_SUCCESS, they log a warning that reads p_buf->len (or hd_cb.pending_data->len, p->len, p_msg->len). Per the commit message, the structures used in these log statements may, in exceptional cases, have been freed by the preceding call, so the log can read a field of freed memory. Affected functions: avct_lcb_msg_ind (avct_lcb_act.cc), bnep_congestion_ind (bnep_main.cc), bnepu_check_send_packet (bnep_utils.cc), hidd_check_config_done (hidd_conn.cc), rfc_send_buf_uih (rfc_ts_frames.cc), rfc_check_send_cmd (rfc_utils.cc), process_service_attr_rsp (sdp_discovery.cc), process_service_search and process_service_attr_req (sdp_server.cc).

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to March 2025 · Findings