GHSA-V6W5-38CF-PCV8

Vulnerability from github – Published: 2026-11-20 00:20 – Updated: 2026-11-20 00:20
VLAI
Summary
Aether Project amf: panic on an unrecovered NGAP goroutine
Details

Summary

HandlePathSwitchRequest guards the UESecurityCapabilities IE for presence but never for length, and the extensible APER type silently yields an empty bit string, so six unguarded index-zero reads panic on an unrecovered goroutine and terminate the AMF. The AMF is the control-plane entry point for a 5G core, so terminating it drops mobility management for every subscriber. Confirmed at HEAD daed5a2 (present in v3.1.5).

The defect

ngap/handler.go:

if uESecurityCapabilities != nil {                                                                              // line 3267, PRESENCE only
    amfUe.UESecurityCapability.SetEA1_128_5G((uESecurityCapabilities.NRencryptionAlgorithms.Value.Bytes[0] & 0x80) >> 7)   // line 3268
    ... (five more Bytes[0] reads, lines 3269-3273)
}

Six index-zero reads, all guarded only by a nil check on the containing IE. Why the bit string can be empty: the field is declared aper:"sizeExt,sizeLB:16,sizeUB:16". Because the type is EXTENSIBLE, parseBitString DISCARDS the SIZE(16) constraint when the peer sets the extension bit, and then if rawLength == 0 { return bitString, nil } returns a bit string with an empty Bytes slice and NO ERROR. So the decoder hands the handler a well-formed, error-free value whose Bytes has length zero, and the handler indexes it. The length guarantee the maintainers rely on comes from an ASN.1 SIZE constraint that the encoder rules legitimately waive on the extension path.

Verification

Proven dynamically, not by reading. Eight crafted bytes (40 00 80 00 80 00 80 00) decode cleanly through the REAL APER decoder, and the handler's exact expression then panics with "index out of range [0] with length 0". Panic discipline was checked first: the NGAP receive path has NO recover() (the only recover in the package is on SendToRan, the transmit path), so this is a genuine process kill and the AMF terminates.

Attacker model, stated conservatively: a rogue or compromised gNB on the N2 interface, which additionally needs one registered UE's AMF-UE-NGAP-ID. This is NOT reachable by a bare over-the-air UE; the realistic scenario is a compromised or malicious base station, the threat model N2 security exists to address.

Suggested fix

Check the length of Bytes before indexing, in all six places, and treat a short or empty bit string as a malformed IE with a PathSwitchRequestFailure rather than proceeding. More durably: since the SIZE constraint is waived on the extension path by design, no aper-decoded bit string can be assumed non-empty, so the same check is needed anywhere else a decoded bit string is indexed. Deduplicated against all eleven existing omec advisories and against hardening commit 030fe7c, which enumerated its sites and MISSED this handler.

Tooling

AI assistance was used while investigating. The panic was reproduced by driving the real APER decoder with crafted bytes and then the handler's exact expression, and the absence of recover() on the receive path was verified by enumeration rather than assumed. The reporter separately confirmed the six unguarded index-zero reads behind a presence-only check at HEAD.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/omec-project/amf"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.7.1-0.20260725031321-d28042aaaea0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-102945"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-125",
      "CWE-1284",
      "CWE-248"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-11-20T00:20:38Z",
    "nvd_published_at": "2026-11-19T21:17:40Z",
    "severity": "MODERATE"
  },
  "details": "## Summary\n\nHandlePathSwitchRequest guards the UESecurityCapabilities IE for presence but never for length, and the extensible APER type silently yields an empty bit string, so six unguarded index-zero reads panic on an unrecovered goroutine and terminate the AMF. The AMF is the control-plane entry point for a 5G core, so terminating it drops mobility management for every subscriber. Confirmed at HEAD daed5a2 (present in v3.1.5).\n\n## The defect\n\nngap/handler.go:\n\n```go\nif uESecurityCapabilities != nil {                                                                              // line 3267, PRESENCE only\n    amfUe.UESecurityCapability.SetEA1_128_5G((uESecurityCapabilities.NRencryptionAlgorithms.Value.Bytes[0] \u0026 0x80) \u003e\u003e 7)   // line 3268\n    ... (five more Bytes[0] reads, lines 3269-3273)\n}\n```\n\nSix index-zero reads, all guarded only by a nil check on the containing IE. Why the bit string can be empty: the field is declared `aper:\"sizeExt,sizeLB:16,sizeUB:16\"`. Because the type is EXTENSIBLE, parseBitString DISCARDS the SIZE(16) constraint when the peer sets the extension bit, and then `if rawLength == 0 { return bitString, nil }` returns a bit string with an empty Bytes slice and NO ERROR. So the decoder hands the handler a well-formed, error-free value whose Bytes has length zero, and the handler indexes it. The length guarantee the maintainers rely on comes from an ASN.1 SIZE constraint that the encoder rules legitimately waive on the extension path.\n\n## Verification\n\nProven dynamically, not by reading. Eight crafted bytes (40 00 80 00 80 00 80 00) decode cleanly through the REAL APER decoder, and the handler\u0027s exact expression then panics with \"index out of range [0] with length 0\". Panic discipline was checked first: the NGAP receive path has NO recover() (the only recover in the package is on SendToRan, the transmit path), so this is a genuine process kill and the AMF terminates.\n\nAttacker model, stated conservatively: a rogue or compromised gNB on the N2 interface, which additionally needs one registered UE\u0027s AMF-UE-NGAP-ID. This is NOT reachable by a bare over-the-air UE; the realistic scenario is a compromised or malicious base station, the threat model N2 security exists to address.\n\n## Suggested fix\n\nCheck the length of Bytes before indexing, in all six places, and treat a short or empty bit string as a malformed IE with a PathSwitchRequestFailure rather than proceeding. More durably: since the SIZE constraint is waived on the extension path by design, no aper-decoded bit string can be assumed non-empty, so the same check is needed anywhere else a decoded bit string is indexed. Deduplicated against all eleven existing omec advisories and against hardening commit 030fe7c, which enumerated its sites and MISSED this handler.\n\n## Tooling\n\nAI assistance was used while investigating. The panic was reproduced by driving the real APER decoder with crafted bytes and then the handler\u0027s exact expression, and the absence of recover() on the receive path was verified by enumeration rather than assumed. The reporter separately confirmed the six unguarded index-zero reads behind a presence-only check at HEAD.",
  "id": "GHSA-v6w5-38cf-pcv8",
  "modified": "2026-11-20T00:20:38Z",
  "published": "2026-11-20T00:20:38Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/omec-project/amf/security/advisories/GHSA-v6w5-38cf-pcv8"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-102945"
    },
    {
      "type": "WEB",
      "url": "https://github.com/omec-project/amf/pull/767"
    },
    {
      "type": "WEB",
      "url": "https://github.com/omec-project/amf/commit/d28042aaaea0221c5ea93c3e069a1dd5e7436f4c"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/omec-project/amf"
    },
    {
      "type": "WEB",
      "url": "https://github.com/omec-project/amf/releases/tag/v3.1.6"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Aether Project amf: panic on an unrecovered NGAP goroutine"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.