Vendor: free5gc (https://free5gc.org)
Affected Product: free5gc AMF (Access and Mobility Management Function)
Affected Version: <= v4.1.0
Vulnerability Type: Buffer Overflow
Impact: Denial of Service (DoS)
Attack Vector: Remote (requires gNB connection)
A buffer overflow vulnerability exists in the AMF component of free5gc when processing a crafted UplinkRANConfigurationTransfer NGAP message. An attacker-controlled gNB can send a message with missing/malformed TargetRANNodeID fields or non-existent RAN context references, causing a nil pointer dereference and AMF process crash.
The PoC script connects to the AMF over SCTP and sends a malicious NGAP message to trigger the crash. See poc.py for details.
The crash log (see log) shows a panic due to invalid memory address dereference in handleUplinkRANConfigurationTransferMain.
Upgrade to free5gc > v4.1.0. Developers have acknowledged the issue (see reference).