Android security tags, read closely by Lightrion

CVE-2025-0074 AI-generated analysis

platform/packages/modules/Bluetooth, SDP client (system/stack/sdp/sdp_discovery.cc)

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.

Two log::warn statements in system/stack/sdp/sdp_discovery.cc read p_cmd->len / p_msg->len after a failed L2CA_DataWrite. They now log the locally computed length (p - p_start), so the buffer that may have been freed is no longer dereferenced.

Root cause

In sdp_snd_service_search_req and process_service_search_attr_rsp, the outgoing SDP PDU buffer (p_cmd / p_msg) is passed to L2CA_DataWrite. When L2CA_DataWrite does not return L2CAP_DW_SUCCESS, the code emits a log::warn whose arguments read p_cmd->len / p_msg->len. The commit message says that in exceptional cases the preceding call has already freed that structure, so the log statement reads freed memory.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to March 2025 · Findings