[srslte-users] UL NAS: Authentication Failure MAC code failure
Andrea Valori
avalori at gmail.com
Wed Sep 15 14:01:53 UTC 2021
Adding some details from the log... thanks to whoever may be able to help..
I triple checked the opc and ki... I am pretty sure they are correct. Maybe
I messed with the
# AMF: Authentication management field, stored in hexadecimal
# SQN: UE's Sequence number for freshness of the authentication
13:25:18.461255 [NAS ] [I] Attach request -- IMSI: 901700000044987
13:25:18.461285 [NAS ] [I] Attach request -- eNB-UE S1AP Id: 3
13:25:18.461303 [NAS ] [I] Attach request -- Attach type: 2
13:25:18.461320 [NAS ] [I] Attach Request -- UE Network Capabilities
EEA: 11100000
13:25:18.461343 [NAS ] [I] Attach Request -- UE Network Capabilities
EIA: 01100000
13:25:18.461353 [NAS ] [I] Attach Request -- MS Network Capabilities
Present: true
13:25:18.461363 [NAS ] [I] PDN Connectivity Request -- EPS Bearer
Identity requested: 0
13:25:18.461372 [NAS ] [I] PDN Connectivity Request -- Procedure
Transaction Id: 2
13:25:18.461398 [NAS ] [I] PDN Connectivity Request -- ESM Information
Transfer requested: true
13:25:18.461401 [NAS ] [I] Attach Request -- Found previously attached
UE.
13:25:18.461416 [MME GTPC] [I] Sending GTP-C Delete Session Request
request. IMSI 901700000044987
13:25:18.461424 [MME GTPC] [E] Could not find GTP-C context to remove
13:25:18.461428 [S1AP ] [E] UE is not ECM connected. No send context
release command. MME UE S1AP Id 1
13:25:18.461434 [S1AP ] [I] Released UE ECM Context.
13:25:18.461441 [S1AP ] [I] Deleted UE Context.
13:25:18.461456 [NAS ] [D] NAS Context Initialized. MCC: 0xf001, MNC
0xff01
13:25:18.461462 [HSS ] [D] Generating AUTH info answer
13:25:18.461483 [HSS ] [D] User Key :
0000: 83 32 18 d6 15 b1 10 70 6d b6 e7 fd 69 22 2b e9
13:25:18.461600 [HSS ] [D] User OPc :
0000: d0 c4 1e d0 7d fe 2f 9b b0 db 08 3e 5e 34 7f 5e
13:25:18.461610 [HSS ] [D] User Rand :
0000: bf 3f 7c 1b 7f a6 ab 1d ef 97 50 61 98 ae a5 a9
13:25:18.461612 [HSS ] [D] User XRES:
0000: e0 28 7c ce a0 f2 01 53
13:25:18.461615 [HSS ] [D] User CK:
0000: 28 bd e8 b8 a2 2c f6 1c 51 27 f9 7e c7 10 c9 bb
13:25:18.461617 [HSS ] [D] User IK:
0000: 30 4f 7f ce fd c2 43 f4 c9 eb db 7c 84 16 14 5e
13:25:18.461618 [HSS ] [D] User AK:
0000: 8c 15 ee 2b 0a c3
13:25:18.461622 [HSS ] [D] User SQN :
0000: 00 00 00 00 00 a5
13:25:18.461624 [HSS ] [D] User MAC :
0000: 03 38 a6 db b5 45 59 b6
13:25:18.461643 [HSS ] [D] User MCC : f001 MNC : ff01
13:25:18.461644 [HSS ] [D] User k_asme :
0000: 97 d1 48 11 b4 21 2d 28 97 df 96 d5 6a c7 e6 1b
0010: 7b 1f 15 74 c3 3c 78 1a 74 cd 45 1c 4d a0 c3 24
13:25:18.461646 [HSS ] [D] User AUTN:
0000: 8c 15 ee 2b 0a 66 90 00 03 38 a6 db b5 45 59 b6
13:25:18.461649 [HSS ] [D] Incremented SQN -- IMSI: 901700000044987
13:25:18.461650 [HSS ] [D] SQN:
0000: 00 00 00 00 00 c6
13:25:18.461653 [S1AP ] [D] Saved UE context corresponding to IMSI
901700000044987
13:25:18.461655 [S1AP ] [D] Saved UE context corresponding to MME UE S1AP
Id 2
13:25:18.461657 [S1AP ] [D] Added UE with MME-UE S1AP Id 2 to eNB with
association 12
13:25:18.461658 [NAS ] [I] Packing Authentication Request
13:25:18.461662 [S1AP ] [D] Sending message to eNB with SCTP association
12. MME UE S1AP ID 2, eNB UE S1AP ID 3
13:25:18.461678 [S1AP ] [D] Transmitting S1AP PDU. eNB SCTP association
Id: 12
13:25:18.461777 [NAS ] [I] Downlink NAS: Sending Authentication Request
13:25:18.461804 [S1AP ] [D] Waiting for S1-MME or S11 Message
13:25:18.501129 [S1AP ] [I] Received S1AP msg. Size: 49
13:25:18.501251 [S1AP ] [I] Received Initiating PDU
13:25:18.501267 [S1AP ] [I] Received Uplink NAS Transport Message.
13:25:18.501271 [S1AP ] [D] Received uplink NAS and found UE NAS context.
MME-UE S1AP id: 2
13:25:18.501278 [S1AP ] [I] UL NAS: sec_hdr_type:
LIBLTE_MME_SECURITY_HDR_TYPE_PLAIN_NAS, mac_vaild: no, msg_encrypted: no
13:25:18.501279 [S1AP ] [I] UL NAS: Authentication Failure
13:25:18.501312 [NAS ] [I] Received Authentication Failure
13:25:18.501327 [NAS ] [I] MAC code failure
13:25:18.501333 [S1AP ] [D] Waiting for S1-MME or S11 Message
13:25:38.154173 [SPGW ] [D] Message received at SPGW: SGi Message
13:25:38.154199 [GTPU ] [D] Received SGi PDU. Bytes 48
13:25:38.154202 [GTPU ] [I] IPv6 not supported yet.
13:25:48.460306 [S1AP ] [I] Received S1AP msg. Size: 25
13:25:48.460359 [S1AP ] [I] Received Initiating PDU
13:25:48.460362 [S1AP ] [I] Received UE Context Release Request Message.
13:25:48.460364 [S1AP ] [I] Received UE Context Release Request. MME-UE
S1AP Id: 2
13:25:48.460462 [S1AP ] [I] UE is not ECM connected. No need to release
S1-U. MME UE S1AP Id 2
13:25:48.460472 [S1AP ] [D] Waiting for S1-MME or S11 Message
13:26:58.026194 [SPGW ] [D] Message received at SPGW: SGi Message
13:26:58.026227 [GTPU ] [D] Received SGi PDU. Bytes 48
13:26:58.026230 [GTPU ] [I] IPv6 not supported yet.
13:27:13.257931 [S1AP ] [D] SCTP Notification 32773
13:27:13.257950 [S1AP ] [I] SCTP Association Shutdown. Association: 12
13:27:13.257992 [S1AP ] [I] Deleting eNB context. eNB Id: 0x19b
13:27:13.258012 [S1AP ] [I] Releasing UE context. IMSI: 901700000044987,
UE-MME S1AP Id: 2
13:27:13.258053 [S1AP ] [D] Waiting for S1-MME or S11 Message
13:27:15.683096 [S1AP ] [I] Deleting UE EMM context. IMSI: 901700000044987
On Tue, 14 Sept 2021 at 16:15, Andrea Valori <avalori at gmail.com> wrote:
> Hello everyone,
> I am puzzled by the issue below, where the SIM seems not authenticated.
> I successfully authenticated some Sysmocom SIMs in the past, but now,
> doing apparently exactly the same thing (although with a newer version of
> both pysim and SRS) no.
> The older programmed SIMs still work…
> Any help? I checked 100s of time Ki and Op in the users_db… Thanks.
>
> Initial UE message: LIBLTE_MME_MSG_TYPE_ATTACH_REQUEST
>
> Received Initial UE message -- Attach Request
>
> Attach request -- IMSI: 901700000044986
>
> Attach request -- eNB-UE S1AP Id: 1
>
> Attach request -- Attach type: 2
>
> Attach Request -- UE Network Capabilities EEA: 11100000
>
> Attach Request -- UE Network Capabilities EIA: 01100000
>
> Attach Request -- MS Network Capabilities Present: true
>
> PDN Connectivity Request -- EPS Bearer Identity requested: 0
>
> PDN Connectivity Request -- Procedure Transaction Id: 1
>
> PDN Connectivity Request -- ESM Information Transfer requested: true
>
> Downlink NAS: Sending Authentication Request
>
> UL NAS: Authentication Failure
>
> MAC code failure
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.srsran.com/pipermail/srsran-users/attachments/20210915/96dd21eb/attachment.htm>
More information about the srsran-users
mailing list