Android security tags, read closely by Lightrion

CVE-2025-22412 AI-generated analysis

platform/packages/modules/Bluetooth, system/stack (AVCT, BNEP, HID device, RFCOMM, SDP client and server)

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

At nine Bluetooth stack call sites, the log::warn issued after a failed L2CA_DataWrite no longer reads the length from a BT_HDR buffer (p_buf->len, p->len, hd_cb.pending_data->len) that may already have been freed. The length is now captured before the call or taken from a pointer difference computed earlier.

Root cause

Several profiles send a BT_HDR with L2CA_DataWrite(cid, p_buf). When the call does not return L2CAP_DW_SUCCESS, they log the length by reading p_buf->len (or p->len, or hd_cb.pending_data->len) after the call. Per the commit message, these structures may in exceptional cases have been freed by the preceding call, so the log statement can read freed memory. Affected sites: avct_lcb_act.cc:avct_lcb_msg_ind (AVCT_REJ response), bnep_main.cc:bnep_congestion_ind (draining xmit_q), bnep_utils.cc:bnepu_check_send_packet, hidd_conn.cc:hidd_check_config_done (pending interrupt data), rfc_ts_frames.cc:rfc_send_buf_uih, rfc_utils.cc:rfc_check_send_cmd (draining cmd_q), sdp_discovery.cc:process_service_attr_rsp, and sdp_server.cc:process_service_search and process_service_attr_req.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to March 2025 · Findings