Android security tags, read closely by Lightrion

CVE-2026-49885 AI-generated analysis

platform/system/nfc (Android 14/15) and platform/packages/modules/Nfc libnfc-nci (Android 16/17), NFC Type 4 Tag reader/writer (rw_t4t.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.

Adds a check in rw_t4t_set_ber_tlv() that p_t4t->max_update_size is larger than the ODO/DDO data header before computing data_length = max_update_size - data_header (in both realignment branches), and makes the caller rw_t4t_update_file() free the C-APDU GKI buffer when rw_t4t_set_ber_tlv() fails.

Root cause

In src/nfc/tags/rw_t4t.cc rw_t4t_set_ber_tlv(), when the write has to be realigned to the tag's maximum update size (p_t4t->max_update_size), the code sets length = max_update_size and computes data_length = p_t4t->max_update_size - data_header, where data_header = RW_T4T_ODO_DDO_HEADER_MIN_LENGTH + length_size. Nothing checked that max_update_size is larger than data_header, so a max_update_size that is too small could make this subtraction underflow (the commit message calls this a potential underflow). The same pattern was in both the length == 0 branch and the length != 0 branch. Separately, rw_t4t_update_file() returned the result of rw_t4t_set_ber_tlv() directly, so a false return left the allocated p_c_apdu GKI buffer unfreed.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to October 2026 · Findings