NAS MAC verification failed

Hi, Free5gc Team,

The free5gc in testing is of version 3.0.4, which is a upgrade from version 3.0.2. We run two machines, one for a free5gc with n3iwf (configuration file: runfree5gc.tar (10 KB) ) and the other for an UE (configuration file:runue.tar (10 KB) ).

We first ran the free5gc and then the UE. A NAC MAC verification failure occurred. Mainly, the following messages show.

2020-11-06T09:43:28+08:00 [WARN][AMF][NAS] NAS MAC verification failed(received: 0x6582a425, expected: 0x992991ad)
2020-11-06T09:43:28+08:00 [INFO][AMF][Gmm] [AMF] Handle Security Mode Complete
2020-11-06T09:43:28+08:00 [ERRO][AMF][Gmm] NAS message integrity check failed

The detailed logs are in the following.

We also notice that the nas security part in version 3.0.2 is set to false by default in the nas security.go file. It may have something to do with amfcfg.conf.

Therefore, we tried to set different values of security parameters such as cipheringOrder and integrityOrder. Yet, it did not work.

Since UE runs Non3GPP test to enable the UE function, we also doubted the amfcfg.conf at UE side matters. That is, we also varied the values of cipheringOrder and integrityOrder.

Did you have any experience on addressing such an issue?


Did you manage to solve this? Iḿ having the same issue here. If you have any recommendation I would really appreciate it.