Android security tags, read closely by Lightrion

CVE-2026-49884 AI-generated analysis

platform/system/nfc (Android 14/15) and platform/packages/modules/Nfc libnfc-nci (Android 16/17), NFC reader/writer Mifare Classic tag handling (rw_mfc.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 (8 corrections). Verify against the commit before relying on it.

In rw_mfc_handle_read_op (Mifare Classic NDEF read), the fix snapshots p_mfc->ndef_length and p_mfc->ndef_start_pos before rw_nfc_decodeTlv, treats an inflated ndef_length as a failure, and rolls both fields back to their pre-decode values. This keeps the inflated length out of the control block.

Root cause

In rw_mfc.cc rw_mfc_handle_read_op, when work_offset == 0 the code calls rw_nfc_decodeTlv(data), which re-parses the NDEF TLV from the tag response and updates p_mfc->ndef_length and p_mfc->ndef_start_pos. The old code compared a local copy (saved_length) with the new p_mfc->ndef_length and set failed = true when the length grew. It did not restore the control block fields, so the inflated, tag-controlled values stayed in p_mfc. The copy loop writes p[offset] into p_mfc->p_ndef_buffer[p_mfc->work_offset] and is bounded only by p_mfc->ndef_length. Later use of that persisted length could therefore lead to writes past the end of p_ndef_buffer. The material does not show the exact sequence or the buffer size, so this part is inferred. The commit message calls it a heap buffer overflow in com.android.nfc during Mifare Classic NDEF reads.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to September 2026 · Findings