srsRAN_4G icon indicating copy to clipboard operation
srsRAN_4G copied to clipboard

Problem where EPC sets an algorithm that UE does not support as the selected security algorithm

Open pangmin-kim opened this issue 1 year ago • 0 comments

Issue Description

When executing srsepc, select the preferred encryption algorithm in "epc.conf". However, when a UE that does not support the corresponding encryption algorithm sends an attach procedure message, epc selects the algorithm that the UE does not support as the NAS security algorithm and transmits a Security Mode Command (SMC) message. The UE that received this SMC message sends a reject message with “UE security capabilities mismatch” as the cause.

Setup Details

e.g. Network configuration, Operation System, Hardware, RF front-end, library and driver versions srsran release 23.04 / ZMQ virtual radio / Modify the “encryption_algo” field in epc.conf to an algorithm(e.g. EEA2) other than the default algorithm.

Expected Behavior

EPC should transmit SMC messages by selecting the algorithm supported by UE rather than the preferred algorithm set in the configuration file.

Actual Behaviour

Only the algorithm set as epc's preferred algorithm is selected as the NAS security algorithm.

Steps to reproduce the problem

  1. Set encrpytion_algo in epc.conf to "EEA2".
  2. Set eea in ue's configuration file to 0,1 (does not support eea2).
  3. EPC selects eea2, which is not supported by UE and is set as the preferred algorithm, as the nas security algorithm.

Additional Information

In the part where epc parses the encryption algorithm, it parses only one algorithm. parse_encryption_algo The UE supports eea0 and eea1 as encryption algorithms in the attach request message.

EPC selects the algorithm (EEA2) that the UE does not support.

Our Idea

  1. Write preferred algorithms in epc.conf as a list (e.g., encryption_algo=EEA2,EEA1,EEA3,EEA0)
  2. EPC should select the algorithm that is supported by UE by referring to the preference list. (e.g., If UE can support EEA0 and EEA1, EPC should select EEA1 as the encryption algorithm.)

pangmin-kim avatar Jan 08 '24 13:01 pangmin-kim