Android security tags, read closely by Lightrion

CVE-2025-22403 AI-generated analysis

platform/packages/modules/Bluetooth, SDP discovery (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 (7 corrections). Verify against the commit before relying on it.

Replaces two log::warn arguments in system/stack/sdp/sdp_discovery.cc. They read p_cmd->len / p_msg->len after the buffer had been passed to L2CA_DataWrite, which per the commit message may have freed it in exceptional cases. The fix logs the locally computed length p - p_start instead.

Root cause

In sdp_snd_service_search_req and process_service_search_attr_rsp, the outgoing SDP buffer (p_cmd / p_msg) is passed to L2CA_DataWrite. The commit message says that in exceptional cases the preceding call may have freed that buffer. When L2CA_DataWrite returned something other than L2CAP_DW_SUCCESS, the failure log statement dereferenced the same buffer (p_cmd->len / p_msg->len) to print the length, which could read freed memory.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to March 2025 · Findings