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 nas_base::integrity_check, 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.
翻译:暂无翻译