Android security tags, read closely by Lightrion

CVE-2025-22404 AI-generated analysis

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

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.

Before each L2CA_DataWrite call, the fix saves the BT_HDR length (or uses pointer arithmetic), so the failure-path log::warn statements in AVCT, BNEP, HID device, RFCOMM and SDP no longer read a buffer that the call may already have freed.

Root cause

Nine call sites pass a BT_HDR* to L2CA_DataWrite. When the call returns something other than L2CAP_DW_SUCCESS, they log p_buf->len (or hd_cb.pending_data->len, p->len or p_msg->len). Per the commit message, in exceptional cases the preceding call has already freed the buffer, so the log statement reads freed memory. The affected sites are: avct_lcb_act.cc:avct_lcb_msg_ind, bnep_main.cc:bnep_congestion_ind, bnep_utils.cc:bnepu_check_send_packet, hidd_conn.cc:hidd_check_config_done, rfc_ts_frames.cc:rfc_send_buf_uih, rfc_utils.cc:rfc_check_send_cmd, 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