7 Handling of unknown, unforeseen, and erroneous protocol data
24.5013GPPNon-Access-Stratum (NAS) protocol for 5G System (5GS)Release 18Stage 3TS
7.1 General
The procedures specified in the present document apply to those messages which pass the checks described in this subclause.
This subclause also specifies procedures for the handling of unknown, unforeseen, and erroneous protocol data by the receiving entity. These procedures are called "error handling procedures", but in addition to providing recovery mechanisms for error situations they define a compatibility mechanism for future extensions of the protocols.
Subclauses 7.1 to 7.8 shall be applied in order of precedence.
Detailed error handling procedures in the network are implementation dependent and may vary from PLMN to PLMN. However, when extensions of this protocol are developed, networks are assumed to have the error handling which is indicated in this subclause as mandatory ("shall") and that is indicated as strongly recommended ("should").
Also, the error handling of the network is only considered as mandatory or strongly recommended when certain thresholds for errors are not reached during a dedicated connection.
For definition of semantical and syntactical errors see 3GPP TS 24.007 [11], subclause 11.4.2.
7.2 Message too short or too long
7.2.1 Message too short
When a message is received that is too short to contain a complete message type information element, that message shall be ignored, cf. 3GPP TS 24.007 [11].
7.2.2 Message too long
The maximum size of a NAS message for NR connected to 5GCN is specified in 3GPP TS 38.323 [29].
The maximum size of a NAS message for E-UTRA connected to 5GCN is specified 3GPP TS 36.323 [25].
The maximum size of a NAS message for non-3GPP access connected to 5GCN is specified in 3GPP TS 24.502 [18]
7.3 Unknown or unforeseen procedure transaction identity or PDU Session identity
7.3.1 Procedure transaction identity
The following network procedures shall apply for handling an unknown, erroneous, or unforeseen PTI received in a 5GSM message:
a) In case the network receives a PDU SESSION MODIFICATION COMPLETE, a PDU SESSION RELEASE COMPLETE message or a PDU SESSION MODIFICATION COMMAND REJECT message in which the PTI value is an assigned or unassigned value that does not match any PTI in use, the network shall respond with a 5GSM STATUS message including 5GSM cause #47 "PTI mismatch".
b) In case the network receives a PDU SESSION AUTHENTICATION COMPLETE message or a SERVICE-LEVEL AUTHENTICATION COMPLETE message in which the PTI value is an assigned value, the network shall respond with a 5GSM STATUS message including 5GSM cause #81 "invalid PTI value".
c) In case the network receives a PDU SESSION ESTABLISHMENT REQUEST message, a PDU SESSION MODIFICATION REQUEST message or a PDU SESSION RELEASE REQUEST message in which the PTI value is an unassigned value, the network shall respond with a 5GSM STATUS message including 5GSM cause #81 "invalid PTI value".
d) In case the network receives a 5GSM message in which the PTI value is a reserved value, the network shall ignore the message.
The following UE procedures shall apply for handling an unknown, erroneous, or unforeseen PTI received in a 5GSM message:
a) In case the UE receives a PDU SESSION MODIFICATION COMMAND message or a PDU SESSION MODIFICATION REJECT message in which the PTI value is an assigned value that does not match any PTI in use:
1) if the UE detects that this PDU SESSION MODIFICATION COMMAND message is a network retransmission of an already accepted request (see subclause 6.3.2.3), the UE shall respond with a PDU SESSION MODIFICATION COMPLETE message;
2) if the UE detects that this PDU SESSION MODIFICATION COMMAND message is a network retransmission of an already rejected request (see subclause 6.3.2.4), the UE shall respond with a PDU SESSION MODIFICATION COMAND REJECT message; or
3) otherwise, the UE shall respond with a 5GSM STATUS message including 5GSM cause #47 "PTI mismatch".
b) In case the UE receives a PDU SESSION RELEASE COMMAND message or a PDU SESSION RELEASE REJECT message in which the PTI value is an assigned value that does not match any PTI in use:
1) if the UE detects that this PDU SESSION RELEASE COMMAND message is a network retransmission of an already accepted request (see subclause 6.3.3.3), the UE shall respond with a PDU SESSION RELEASE COMPLETE message; or
2) otherwise, the UE shall respond with a 5GSM STATUS message including 5GSM cause #47 "PTI mismatch".
c) In case the UE receives a PDU SESSION ESTABLISHMENT ACCEPT message or a PDU SESSION ESTABLISHMENT REJECT message in which the PTI value is an assigned value that does not match any PTI in use:
1) the UE shall respond with a 5GSM STATUS message including 5GSM cause #47 "PTI mismatch".
d) In case the UE receives a PDU SESSION AUTHENTICATION COMMAND message, a PDU SESSION AUTHENTICATION RESULT message or a SERVICE-LEVEL AUTHENTICATION COMMAND message in which the PTI value is an assigned value, the UE shall respond with a 5GSM STATUS message including 5GSM cause #81 "invalid PTI value".
e) In case the UE receives a PDU SESSION ESTABLISHMENT ACCEPT message, a PDU SESSION ESTABLISHMENT REJECT message, a PDU SESSION MODIFICATION REJECT message or a PDU SESSION RELEASE REJECT message in which the PTI value is an unassigned value, the UE shall ignore the message.
f) In case the UE receives a 5GSM message in which the PTI value is a reserved value, the UE shall ignore the message.
7.3.2 PDU Session identity
The following network procedures shall apply for handling an unknown, erroneous, or unforeseen PDU session identity received in the header of a 5GSM message (specified as the header of a standard L3 message, see 3GPP TS 24.007 [11]):
a) If the network receives a PDU SESSION MODIFICATION REQUEST message which includes an unassigned or reserved PDU session identity value, the network shall respond with a PDU SESSION MODIFICATION REJECT message including 5GSM cause #43 "invalid PDU session identity".
b) If the network receives PDU SESSION RELEASE REQUEST message which includes an unassigned or reserved PDU session identity value, the network shall respond with a PDU SESSION RELEASE REJECT message including 5GSM cause #43 "invalid PDU session identity".
c) Upon receipt of an UL NAS TRANSPORT message, the network takes the following actions:
1) If the Request type IE is set to "initial request" or "initial emergency request" and the message includes a reserved PDU session identity value, the network shall respond with a DL NAS TRANSPORT message with 5GMM cause #90 "payload was not forwarded";
2) otherwise, if the message includes an unassigned or reserved PDU session identity value, the network shall respond with a DL NAS TRANSPORT message with 5GMM cause #90 "payload was not forwarded".
d) If the network receives a 5GSM message other than those listed in items a) through c) above in which the message includes a reserved PDU session identity value or an assigned value that does not match an existing PDU session, the network shall ignore the message.
The following UE procedures shall apply for handling an unknown, erroneous, or unforeseen PDU session identity received in the header of a 5GSM message:
a) If the UE receives a 5GSM message which includes an unassigned or reserved PDU session identity value, the UE shall ignore the message.
b) If the UE receives a 5GSM message which includes a PDU session identity belonging to any PDU session in state PDU SESSION INACTIVE in the UE, the UE shall respond with a 5GSM STATUS message including 5GSM cause #43 "invalid PDU session identity".
7.4 Unknown or unforeseen message type
If UE receives a 5GMM message or 5GSM message with message type not defined for the extended protocol discriminator (EPD) or not implemented by the receiver, it shall return a status message (5GMM STATUS or 5GSM STATUS depending on the EPD) with cause #97 "message type non-existent or not implemented".
If the network receives a 5GMM or 5GSM message with message type not defined for the EPD or not implemented by the receiver in a protocol state where reception of an unsolicited message with the given EPD from the UE is not foreseen in the protocol, the network actions are implementation dependent. Otherwise, if the network receives a message with message type not defined for the EPD or not implemented by the receiver, it shall ignore the message except that it should return a status message (5GMM STATUS or 5GSM STATUS depending on the EPD) with cause #97 "message type non-existent or not implemented".
NOTE: A message type not defined for the EPD in the given direction is regarded by the receiver as a message type not defined for the EPD, see 3GPP TS 24.007 [11].
If the UE receives a message not compatible with the protocol state, the UE shall return a status message (5GMM STATUS or 5GSM STATUS depending on the EPD) with cause #98 "message type not compatible with protocol state".
If the network receives a message not compatible with the protocol state, the network actions are implementation dependent.
7.5 Non-semantical mandatory information element errors
7.5.1 Common procedures
When on receipt of a message,
a) an "imperative message part" error; or
b) a "missing mandatory IE" error
is diagnosed or when a message containing:
a) a syntactically incorrect mandatory IE;
b) an IE unknown in the message, but encoded as "comprehension required" (see 3GPP TS 24.007 [11]); or
c) an out of sequence IE encoded as "comprehension required" (see 3GPP TS 24.007 [11]) is received,
the UE shall proceed as follows:
If the message is not one of the messages listed in the UE procedures in subclause 7.5.3, item a), b) or c), the UE shall return a status message (5GMM STATUS or 5GSM STATUS depending on the EPD) with cause #96 "invalid mandatory information";
the network shall proceed as follows:
If the message is not one of the messages listed in the network procedures in subclause 7.5.3, item a), b) or c), the network shall either:
1) try to treat the message (the exact further actions are implementation dependent); or
2) ignore the message except that it should return a status message (5GMM STATUS or 5GSM STATUS depending on the EPD) with cause #96 "invalid mandatory information".
7.5.2 5GS mobility management
No exceptional cases are described for 5GS mobility management messages.
No semantical or syntactical diagnosis other than presence and length shall be performed on the EPS NAS message container information element in the REGISTRATION REQUEST message.
7.5.3 5GS session management
The following UE procedures shall apply for handling an error encountered with a mandatory information element in a 5GSM message:
a) If the message is a PDU SESSION ESTABLISHMENT ACCEPT, the UE shall initiate PDU session release procedure by sending a PDU SESSION RELEASE REQUEST message with 5GSM cause #96 "invalid mandatory information".
b) Void.
c) If the message is a PDU SESSION RELEASE COMMAND, a PDU SESSION RELEASE COMPLETE message with 5GSM cause #96 "invalid mandatory information" shall be returned.
The following network procedures shall apply for handling an error encountered with a mandatory information element in a 5GSM message:
a) If the message is a PDU SESSION ESTABLISHMENT REQUEST, a PDU SESSION ESTABLISHMENT REJECT message with 5GSM cause #96 "invalid mandatory information" shall be returned.
b) If the message is a PDU SESSION MODIFICATION REQUEST, a PDU SESSION MODIFICATION REJECT message with 5GSM cause #96 "invalid mandatory information" shall be returned.
c) If the message is a PDU SESSION RELEASE REQUEST, a PDU SESSION RELEASE REJECT message with 5GSM cause #96 "invalid mandatory information" shall be returned.
7.6 Unknown and unforeseen IEs in the non-imperative message part
7.6.1 IEIs unknown in the message
The UE shall ignore all IEs unknown in a message which are not encoded as "comprehension required" (see 3GPP TS 24.007 [11]).
The network shall take the same approach.
7.6.2 Out of sequence IEs
The UE shall ignore all out of sequence IEs in a message which are not encoded as "comprehension required" (see 3GPP TS 24.007 [11]).
The network should take the same approach.
7.6.3 Repeated IEs
If an information element with format T, TV, TLV, or TLV-E is repeated in a message in which repetition of the information element is not specified in clause 8 and clause 9 of the present document, the UE shall handle only the contents of the information element appearing first and shall ignore all subsequent repetitions of the information element. When repetition of information elements is specified, the UE shall handle only the contents of specified repeated information elements. If the limit on repetition of information elements is exceeded, the UE shall handle the contents of information elements appearing first up to the limit of repetitions and shall ignore all subsequent repetitions of the information element.
The network should follow the same procedures.
7.7 Non-imperative message part errors
This category includes:
a) syntactically incorrect optional IEs; and
b) conditional IE errors.
7.7.1 Syntactically incorrect optional IEs
The UE shall treat all optional IEs that are syntactically incorrect in a message as not present in the message.
The network shall take the same approach.
7.7.2 Conditional IE errors
When upon receipt of a 5GMM or 5GSM message the UE diagnoses a "missing conditional IE" error or an "unexpected conditional IE" error, or when it receives a 5GMM or 5GSM message containing at least one syntactically incorrect conditional IE, the UE shall ignore the message and shall return a status message (5GMM STATUS or 5GSM STATUS depending on the EPD) with cause #100 "conditional IE error".
When the network receives a message and diagnoses a "missing conditional IE" error or an "unexpected conditional IE" error or when it receives a message containing at least one syntactically incorrect conditional IE, the network shall either:
a) try to treat the message (the exact further actions are implementation dependent); or
b) ignore the message except that it should return a status message (5GMM STATUS or 5GSM STATUS depending on the EPD) with cause #100 "conditional IE error".
7.8 Messages with semantically incorrect contents
When a message with semantically incorrect contents is received, the UE shall perform the foreseen reactions of the procedural part of the present document (i.e. of clauses 5, 6). If, however no such reactions are specified, the UE shall ignore the message except that it shall return a status message (5GMM STATUS or 5GSM STATUS depending on the EPD) with cause #95 "semantically incorrect message".
The network should follow the same procedure except that a status message is not normally transmitted.