Android security tags, read closely by Lightrion

CVE-2025-22405 AI-generated analysis

platform/packages/modules/Bluetooth, system/stack (AVCT, BNEP, HID device, 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 (6 corrections). Verify against the commit before relying on it.

At nine Bluetooth stack call sites in eight files, the failure log after L2CA_DataWrite() no longer reads the BT_HDR buffer that was passed to that call (the commit message says such a buffer may already be freed). The length is now saved in a local variable before the call or recomputed from existing pointers.

Root cause

At each affected site the code calls L2CA_DataWrite(cid, p_buf). Per the commit message, in exceptional cases the buffer may have been freed by that call. When the call does not return L2CAP_DW_SUCCESS, the log::warn("Unable to write L2CAP data ...") statement read p_buf->len (or hd_cb.pending_data->len, p->len, p_msg->len) from a buffer that may already be freed. This is a read use-after-free in the warning path.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to March 2025 · Findings