5G NR - SecurityModeFailure Message Explained
The SecurityModeFailure message is the UE’s explicit negative response to SecurityModeCommand in 5G NR. It tells the gNB that the requested AS security activation could not be completed successfully.
In simple terms, this is the UE saying: the requested RRC security setup did not work, so the normal protected RRC procedure cannot continue.
This page covers the NR RRC SecurityModeFailure message from 3GPP TS 38.331. It is part of the NR RRC security activation procedure, not NAS security signaling.
Why SecurityModeFailure matters
SecurityModeFailure is one of the most important bad-case checkpoints in the NR RRC security procedure.
It matters because it tells you:
- the UE did not complete AS security activation successfully
- the failure happened before normal protected follow-up signaling could continue
- later missing messages such as
RRCReconfigurationmay be missing because security activation already failed - the troubleshooting focus should shift to the security step, not only to later connected-mode procedures
If this message appears, the success path toward SecurityModeComplete has already failed.
Where SecurityModeFailure appears in the call flow
A common failure path is:
RRC Setupfrom gNB to UERRCSetupCompletefrom UE to gNBSecurityModeCommandfrom gNB to UESecurityModeFailurefrom UE to gNB- release, abort, or recovery handling instead of normal protected follow-up signaling
This means SecurityModeFailure is the explicit negative branch of the same security activation procedure that would otherwise produce SecurityModeComplete.
Call flow position
A compact NR signaling view is:
UE gNB
| |
|----- RRCSetupComplete ------->|
| |
|<---- SecurityModeCommand -----|
| |
|---- SecurityModeFailure ----->|
| |
|--- release or recovery -----> |
| |
This sequence shows the bad-case path:
SecurityModeCommandrequests AS security activationSecurityModeFailurereports that the UE could not complete it- normal protected follow-up signaling such as
RRC Reconfigurationis usually blocked or replaced by failure handling
For the broader procedure context, see:
Transport characteristics
For trace analysis, the transport profile is:
- Direction: UE to gNB
- Bearer: SRB1
- Logical channel: UL-DCCH
- RLC mode: AM
- Protocol layer: NR RRC
This is part of the connected-mode control path during the security activation stage.
What engineers should inspect first
When SecurityModeFailure appears, inspect in this order:
- Did it follow the expected
SecurityModeCommand? - Does the transaction identifier match?
- Did the UE fail explicitly with
SecurityModeFailureor was there also a silent timeout pattern? - What happened immediately after the failure: release, retry, or recovery?
- Does the surrounding trace point to integrity, algorithm, or context-consistency problems?
Practical troubleshooting guidance
This message is most useful when read together with:
SecurityModeCommandSecurityModeCompleteas the success-path comparisonRRC Reconfigurationto confirm what normal post-security signaling would have looked like
If the failure path is hit, the main engineering questions are:
- did the UE reject the commanded security activation or fail during verification?
- is the selected security configuration consistent with the UE and scenario?
- did the network abort immediately after the failure?
- is the root issue really AS security activation rather than a later RRC procedure?
Related message pages
5G NR - SecurityModeCommandfor the network-side command that triggers this failure path5G NR - SecurityModeCompletefor the successful alternative path5G NR - RRC Reconfigurationfor the later protected signaling that usually does not proceed in this failure branch
Summary
SecurityModeFailure is the UE-side indication that NR RRC AS security activation failed.
The key engineering points are:
- it is the explicit negative branch of the
SecurityModeCommandprocedure - it is a small procedural failure message, not a detailed root-cause container
- it is sent on SRB1 / UL-DCCH
- it usually blocks the normal path toward protected follow-up signaling
- troubleshooting depends on pairing it with the preceding command and the immediate recovery behavior
FAQ
What does SecurityModeFailure mean in 5G NR?
It means the UE could not successfully complete the AS security activation requested by SecurityModeCommand.
Who sends SecurityModeFailure?
The UE sends SecurityModeFailure to the gNB.
What comes before SecurityModeFailure?
SecurityModeCommand comes immediately before it in the failure branch.
What happens after SecurityModeFailure?
The network usually cannot continue normal protected RRC signaling and may release the connection or trigger recovery handling.
Does SecurityModeFailure explain the full reason in detail?
Usually no. Engineers often need surrounding trace context to understand the real root cause.
How is SecurityModeFailure different from SecurityModeComplete?
SecurityModeComplete confirms success, while SecurityModeFailure is the explicit UE-side failure path.
Summary
Uplink NR RRC message used by the UE to indicate that the commanded AS security activation could not be completed successfully.