NASReplayLab: An Experimental Analysis of Downlink NAS Replay Protection in the srsRAN 4G UE
Abstract
Once NAS security is active, LTE signalling between a device (UE) and the Mobility Management Entity (MME) is integrity protected, and the receiver should accept each NAS COUNT value only once. We tested whether srsUE, the UE in the open-source srsRAN 4G stack, enforces this for downlink messages. We ran srsUE, srsENB and srsEPC over ZeroMQ loopback on one host, added logging to the UE's NAS receive path that records delivery, integrity verification, dispatch and drops, and modified the EPC to resend recorded NAS messages. We compared four cases: a normal attach, a repeated plaintext Authentication Request before security, a repeated integrity-protected EMM Information in the same session, and an EMM Information from one session sent into another. The UE rejected the message from the other session but accepted the repeated protected message: both copies passed the integrity check, the handler ran twice, and the stored receive COUNT went from 3 back to 2. The cause is in nasbase::integritycheck, which builds the COUNT from the received sequence number and stores it after any MAC match without checking that it is newer than COUNT values already accepted. The same root cause was reported for srsUE's 5G NAS in a public srsRAN issue; because the 4G and 5G NAS classes share this function, our results independently confirm it on the 4G EPS path, with packet-level evidence and a cross-context control. Source inspection shows the same code on the current master branch. Each case was run once with null ciphering, and EMM Information does not change registration state.
Create a lesson
Metadata
- Categories
- cs.CR, cs.NI
- Comments
- 5 pages, 3 figures, 4 tables. Code: https://github.com/saadkabiruddin/NASReplayLab
Related papers
Signals, Not Verdicts: Stateful Runtime Protection for Tool-Using Agents
Shared title terminologycs.CRTiancheng Zhu, Mingjie Chen, Mingxue Zhang et al.
Re-Grading Prompt-Injection Benchmarks by Replay: Check Defects, Grader Choice, and the Decisions Built on Them
Shared title terminologycs.CRJie Pan, Weicheng Wang
Recovering Weights and Activations in TEE-Offloaded Models: Checkpoint Fitting and Replay Geometry
Shared title terminologycs.CRGuoxiao Liu, Menghui Zhang, Chunhuan Zhao et al.
SABER: Semantics-Anchored Prompt Obfuscation Optimizer Toward Practical LLM Privacy and IP Protection
Shared title terminologycs.CRYaxin Li, Pai Zheng, Jiayu Li et al.