Open-source 4G phone software accepts a replayed message

In short

What does "replay protection" mean?

A replay attack records a genuine message and sends it again later. If the receiver only checks that the message is correctly signed, the copy passes, because it is an exact copy.

Control messages between a phone and the mobile core network are called NAS (non-access stratum) messages. In 4G (LTE) the core network element is the Mobility Management Entity (MME). Once security is active, each NAS message carries a 32-bit integrity code (MAC) and an 8-bit sequence number. Each side also keeps a running 24-bit counter, NAS COUNT, per direction, and the receiver rebuilds the full COUNT from its own state plus the received sequence number.

The authors cite the 3GPP specification (TS 24.301 section 4.4.3.2): for a given security context, a COUNT value shall be accepted at most once, and only if integrity verifies. That is the replay rule. In plain terms (our wording), the counter must only move forward.

What did the researchers test?

The authors, Saad Kabir Uddin (independent researcher, Dhaka) and Raihan Islam Arnob (University of Lynchburg, USA), ran srsUE, the eNodeB (base station) srsENB and the core srsEPC over ZeroMQ loopback on one host. ZeroMQ stands in for the radio, so nothing was transmitted over the air. They added logging to the phone's receive path and modified the EPC to resend recorded messages. The setup used EIA1 integrity and null (EEA0) ciphering, and a synthetic subscriber identity and keys.

The table's wording of the results is ours, built from the paper's Table 3.

What happened when the message was replayed?

In T2 the repeated 51-byte message appeared as identical payloads in S1AP frames 12 and 13. The phone logged an integrity pass and ran the EMM Information handler for each. The duplicate's record showed the receive COUNT moving from 3 to 2. The message from another session (T3) was rejected, which the authors say fits a different key rather than a counter mismatch.

Where is the bug?

The authors trace it to nas_base::integrity_check. The function builds an estimated COUNT from the stored high bits and the received sequence number, checks the MAC with it, and, if the MAC matches, stores the estimate whenever it differs from the current value, "including when count_est is smaller". Nothing compares it with COUNT values already accepted.

In the T2 run the original message carried sequence number 2 and was checked with COUNT 2, after which the handler advanced the counter to 3. The duplicate carried the same number, so the estimate was 2, the MAC matched, and the counter was set from 3 back to 2 before the handler ran again and returned it to 3. The authors stress that 3 to 2 is the integrity event, not the final counter of the run.

The source comment cites TS 24.301 section 4.4.3.3, which does require the receiver to replace its stored COUNT after a successful check. The authors say the code implements that step but not the rules around it.

Is this new?

Partly. The paper says an srsRAN issue filed on 17 November 2026 (#1580) reports the same root cause for srsUE's 5G NAS, including a receive COUNT rolling back from 3 to 2. Because the 4G and 5G NAS classes inherit from the same base class and call the same function, the authors say their result "independently" confirms it on the 4G path, with packet-level evidence and a cross-session control. They also inspected, but did not build or run, srsRAN 4G master as of 2 December 2026 (commit 9d2aac7d) and say the logic is unchanged.

What is not shown

Terms in plain English

Where things stand

This is a v1 preprint submitted to arXiv on 3 December 2026 (cs.CR). The authors plan to test a fix, add their 4G evidence to the upstream report, repeat with ciphering on, try messages that change registration state, and release the modified EPC. That patch is not yet released, and raw captures stay private because they contain subscriber material. The testbed configuration, runner, logging patch and analysis tools are on GitHub (saadkabiruddin/NASReplayLab).

Sources

Sources

Related stories

More from Wi-Fi Wizards

All stories from Wi-Fi Wizards