Android security tags, read closely by Lightrion

CVE-2024-49714 AI-generated analysis

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

Replaces an insufficient CHECK-based size assertion in avrc_vendor_msg (system/stack/avrc/avrc_opt.cc) with a bound that accounts for the BT_HDR, AVCT_MSG_OFFSET, the 3 AVRC header bytes and the 3 company_id bytes before vendor_len. The function now returns nullptr instead of aborting when the composed command would not fit in the AVRC_META_CMD_BUF_SIZE buffer.

Root cause

avrc_vendor_msg allocates a fixed buffer of AVRC_META_CMD_BUF_SIZE bytes with osi_calloc. It then writes starting at (p_cmd + 1) + AVCT_MSG_OFFSET: one byte ctype, one byte subunit, one byte AVRC_OP_VENDOR, three bytes company_id, and finally a memcpy of p_msg->vendor_len bytes from p_msg->p_vendor_data. The pre-fix guard was CHECK(AVRC_META_CMD_BUF_SIZE > (AVRC_MIN_CMD_LEN + p_msg->vendor_len)). It used AVRC_MIN_CMD_LEN rather than the fixed overhead the fix introduces, sizeof(BT_HDR) + AVCT_MSG_OFFSET + 6. Per the commit title (OOB write), a vendor_len that passed the old check could make the write go past the end of the allocated buffer. The guard was also a CHECK (process abort) rather than an error return.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to September 2025 · Findings