← Back to CVE Explorer

CVE-2026-10638

Full vulnerability record from the local CVENow database.

Description

subsys/net/ip/icmpv6.c reads the network interface from a net_pkt after that packet has been handed to net_try_send_data(). In icmpv6_handle_echo_request() and net_icmpv6_send_error(), the post-send statistics update calls net_pkt_iface(reply)/net_pkt_iface(pkt) on the just-sent packet. The send path (net_try_send_data -> net_if_tx) unreferences and may free the packet back to its memory slab before returning — synchronously in the RX thread when no TX queue is configured (CONFIG_NET_TC_TX_COUNT == 0), and asynchronously the driver/L2 may already have freed it otherwise. net_pkt_iface() therefore dereferences a freed (and possibly reused) net_pkt; with CONFIG_NET_STATISTICS_PER_INTERFACE the stale iface pointer is further dereferenced and written through (iface->stats.icmp.sent++), turning the use-after-free read into a write through an attacker-influenceable pointer. The core stack already documents this hazard in net_core.c ("do not use pkt after that call") and caches iface before sending; the ICMPv6 callers did not. An unauthenticated remote attacker triggers the flaw simply by sending an ICMPv6 Echo Request (ping) or an IPv6 packet that elicits an ICMPv6 error (unknown next header, fragment reassembly timeout, destination unreachable), leading to denial of service via crash and potential memory corruption. Affected: Zephyr networking with CONFIG_NET_NATIVE_IPV6, roughly v4.2.0 through v4.4.0. The fix caches the interface pointer before sending and uses it for all statistics updates; the sibling commit 86e21665d46 fixes the identical bug in ICMPv4.

Severity
HIGH
CVSS score
7.5 (v3.1)
Vulnerability status
Modified
Source identifier
Published
2026-06-16 15:16:34.097000
Last modified
2026-10-26 12:10:00.130000
View original CVE JSON
{
  "id": "CVE-2026-10638",
  "sourceIdentifier": "[email protected]",
  "published": "2026-06-16T15:16:34.097",
  "lastModified": "2026-10-26T12:10:00.130",
  "vulnStatus": "Modified",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "subsys/net/ip/icmpv6.c reads the network interface from a net_pkt after that packet has been handed to net_try_send_data(). In icmpv6_handle_echo_request() and net_icmpv6_send_error(), the post-send statistics update calls net_pkt_iface(reply)/net_pkt_iface(pkt) on the just-sent packet.\n\nThe send path (net_try_send_data -> net_if_tx) unreferences and may free the packet back to its memory slab before returning — synchronously in the RX thread when no TX queue is configured (CONFIG_NET_TC_TX_COUNT == 0), and asynchronously the driver/L2 may already have freed it otherwise. net_pkt_iface() therefore dereferences a freed (and possibly reused) net_pkt; with CONFIG_NET_STATISTICS_PER_INTERFACE the stale iface pointer is further dereferenced and written through (iface->stats.icmp.sent++), turning the use-after-free read into a write through an attacker-influenceable pointer.\n\nThe core stack already documents this hazard in net_core.c (\"do not use pkt after that call\") and caches iface before sending; the ICMPv6 callers did not.\n\nAn unauthenticated remote attacker triggers the flaw simply by sending an ICMPv6 Echo Request (ping) or an IPv6 packet that elicits an ICMPv6 error (unknown next header, fragment reassembly timeout, destination unreachable), leading to denial of service via crash and potential memory corruption. Affected: Zephyr networking with CONFIG_NET_NATIVE_IPV6, roughly v4.2.0 through v4.4.0.\n\nThe fix caches the interface pointer before sending and uses it for all statistics updates; the sibling commit 86e21665d46 fixes the identical bug in ICMPv4."
    },
    {
      "lang": "es",
      "value": "subsys/net/ip/icmpv6.c lee la interfaz de red de un net_pkt después de que ese paquete ha sido entregado a net_try_send_data(). En icmpv6_handle_echo_request() y net_icmpv6_send_error(), la actualización de estadísticas post-envío llama a net_pkt_iface(reply)/net_pkt_iface(pkt) en el paquete recién enviado. La ruta de envío (net_try_send_data - net_if_tx) desreferencia y puede liberar el paquete de vuelta a su bloque de memoria antes de regresar - sincrónicamente en el hilo RX cuando no hay cola TX configurada (CONFIG_NET_TC_TX_COUNT == 0), y asincrónicamente el controlador/L2 puede ya haberlo liberado de otra manera. net_pkt_iface() por lo tanto desreferencia un net_pkt liberado (y posiblemente reutilizado); con CONFIG_NET_STATISTICS_PER_INTERFACE el puntero iface obsoleto es desreferenciado y escrito a través (iface-stats.icmp.sent++), convirtiendo la lectura de uso después de liberación en una escritura a través de un puntero influenciable por el atacante. La pila central ya documenta este peligro en net_core.c (’no usar pkt después de esa llamada’) y almacena en caché iface antes de enviar; los llamadores de ICMPv6 no lo hicieron. Un atacante remoto no autenticado activa la falla simplemente enviando una solicitud de eco ICMPv6 (ping) o un paquete IPv6 que provoca un error ICMPv6 (encabezado siguiente desconocido, tiempo de espera de reensamblaje de fragmentos, destino inalcanzable), lo que lleva a denegación de servicio a través de un fallo y potencial corrupción de memoria. Afectado: redes Zephyr con CONFIG_NET_NATIVE_IPV6, aproximadamente de v4.2.0 a v4.4.0. La solución almacena en caché el puntero de interfaz antes de enviar y lo usa para todas las actualizaciones de estadísticas; el commit hermano 86e21665d46 corrige el error idéntico en ICMPv4."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "zephyrproject",
          "product": "zephyr",
          "defaultStatus": "unaffected",
          "collectionURL": "https://github.com/zephyrproject-rtos/zephyr",
          "packageName": "zephyr",
          "programFiles": [
            "subsys/net/ip/icmpv6.c"
          ],
          "versions": [
            {
              "version": "3.7.0",
              "lessThan": "4.3.1",
              "versionType": "semver",
              "status": "affected"
            },
            {
              "version": "4.4.0",
              "lessThan": "4.4.1",
              "versionType": "semver",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H",
          "baseScore": 5.9,
          "baseSeverity": "MEDIUM",
          "attackVector": "NETWORK",
          "attackComplexity": "HIGH",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "NONE",
          "integrityImpact": "NONE",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 2.2,
        "impactScore": 3.6
      },
      {
        "source": "[email protected]",
        "type": "Primary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
          "baseScore": 7.5,
          "baseSeverity": "HIGH",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "NONE",
          "integrityImpact": "NONE",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 3.9,
        "impactScore": 3.6
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-06-16T15:29:46.610373Z",
          "id": "CVE-2026-10638",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-416"
        }
      ]
    }
  ],
  "configurations": [
    {
      "nodes": [
        {
          "operator": "OR",
          "negate": false,
          "cpeMatch": [
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:zephyrproject:zephyr:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "4.2.0",
              "versionEndExcluding": "4.5.0",
              "matchCriteriaId": "B4B6E024-A0B6-48E0-A4F6-FF276949270A"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/zephyrproject-rtos/zephyr/commit/09c8578c66b517c5165cde53332ed5d8d8ef2cfc",
      "source": "[email protected]",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-m92g-94xv-wvw2",
      "source": "[email protected]",
      "tags": [
        "Broken Link"
      ]
    }
  ]
}