{"id":"CVE-2026-10665","aliases":["CVE-2026-10665"],"related":[],"kind":"vulnerability","state":"published","title":"Heap buffer overflow on WireGuard receive path via unbounded incoming packet length","summary":"In Zephyr's WireGuard subsystem (subsys/net/lib/wireguard), wg_process_data_message() in wg_crypto.c linearizes an inbound transport-data payload into a fixed pool buffer of CONFIG_WIREGUARD_BUF_LEN bytes before decryption. The call net_buf_linearize(buf->data, data_len, pkt->buffer, ..., data_len) passed the attacker-derived data_len as both the destination capacity and the copy length, defeating the function's internal len = min(len, dst_len) bound. data_len is derived from the received UDP datagram length and is only lower-bounded by wg_ctrl_recv() (no upper bound). When data_len exceeds CONFIG_WIREGUARD_BUF_LEN — e.g. when the buffer length is lowered below the link MTU, on links with MTU above the buffer size, or via reassembled IPv4/IPv6 fragments that exceed it — the underlying memcpy writes past the end of the pool buffer, an out-of-bounds write (CWE-787). The overflow occurs before the Poly1305 authentication check, so it requires only a valid receiver session index rather than a valid authenticator, and is reachable by a malicious or compromised peer (or an on-path attacker driving an established session) over the network, yielding remote memory corruption and at minimum a reliable denial of service. The defect was present in the WireGuard implementation shipped in Zephyr 4.4.0. The fix adds an explicit data_len > CONFIG_WIREGUARD_BUF_LEN rejection and corrects the linearize call to pass net_buf_max_len(buf) as the destination capacity.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In Zephyr's WireGuard subsystem (subsys/net/lib/wireguard), wg_process_data_message() in wg_crypto.c linearizes an inbound transport-data payload into a fixed pool buffer of CONFIG_WIREGUARD_BUF_LEN bytes before decryption. The call net_buf_linearize(buf->data, data_len, pkt->buffer, ..., data_len) passed the attacker-derived data_len as both the destination capacity and the copy length, defeating the function's internal len = min(len, dst_len) bound. data_len is derived from the received UDP datagram length and is only lower-bounded by wg_ctrl_recv() (no upper bound). When data_len exceeds CONFIG_WIREGUARD_BUF_LEN — e.g. when the buffer length is lowered below the link MTU, on links with MTU above the buffer size, or via reassembled IPv4/IPv6 fragments that exceed it — the underlying memcpy writes past the end of the pool buffer, an out-of-bounds write (CWE-787). The overflow occurs before the Poly1305 authentication check, so it requires only a valid receiver session index rather than a valid authenticator, and is reachable by a malicious or compromised peer (or an on-path attacker driving an established session) over the network, yielding remote memory corruption and at minimum a reliable denial of service. The defect was present in the WireGuard implementation shipped in Zephyr 4.4.0. The fix adds an explicit data_len > CONFIG_WIREGUARD_BUF_LEN rejection and corrects the linearize call to pass net_buf_max_len(buf) as the destination capacity.","source":"cvelist"},{"lang":"es","text":"En el subsistema WireGuard de Zephyr (subsys/net/lib/wireguard), wg_process_data_message() en wg_crypto.c linealiza una carga útil de datos de transporte entrante en un búfer de grupo fijo de CONFIG_WIREGUARD_BUF_LEN bytes antes del descifrado. La llamada net_buf_linearize(buf  ->  data, data_len, pkt  ->  buffer, ..., data_len) pasó el data_len derivado del atacante como la capacidad de destino y la longitud de copia, anulando el límite interno de la función len = min(len, dst_len). data_len se deriva de la longitud del datagrama UDP recibido y solo está limitado inferiormente por wg_ctrl_recv() (sin límite superior). Cuando data_len excede CONFIG_WIREGUARD_BUF_LEN - por ejemplo, cuando la longitud del búfer se reduce por debajo de la MTU del enlace, en enlaces con MTU superior al tamaño del búfer, o a través de fragmentos IPv4/IPv6 reensamblados que lo exceden - el memcpy subyacente escribe más allá del final del búfer de grupo, una escritura fuera de límites (CWE-787). El desbordamiento ocurre antes de la verificación de autenticación Poly1305, por lo que solo requiere un índice de sesión de receptor válido en lugar de un autenticador válido, y es alcanzable por un par malicioso o comprometido (o un atacante en la ruta que controla una sesión establecida) a través de la red, lo que produce corrupción de memoria remota y como mínimo una denegación de servicio confiable. El defecto estaba presente en la implementación de WireGuard distribuida en Zephyr 4.4.0. La solución añade un rechazo explícito de data_len > CONFIG_WIREGUARD_BUF_LEN y corrige la llamada de linealización para pasar net_buf_max_len(buf) como la capacidad de destino.","source":"nvd"}],"published":"2026-07-12T16:16:49.648Z","modified":"2026-11-05T19:37:16.457Z","severity":{"scorer":"zephyr","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H","score":7.4,"rating":"HIGH"},"severities":[{"scorer":"zephyr","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H","score":7.4,"rating":"HIGH"}],"cwes":["CWE-787"],"affected":[{"ranges":[{"type":"semver","introduced":"4.4.0","fixed":"4.4.2","status":"affected"}],"vendor":"zephyrproject","product":"zephyr","package":"zephyr","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.4.0","fixed":"4.4.2"}],"vendor":"zephyrproject","product":"zephyr","cpe":"cpe:2.3:o:zephyrproject:zephyr:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/zephyrproject-rtos/zephyr/commit/6d8bb28dc9064e05e52b5a00b2998ecc663e38cb","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-3wqm-wgx2-9367","tags":["exploit","patch","vendor-advisory"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"zephyr","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-07-13T15:48:45.958Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-10665","url":"https://www.cve.org/CVERecord?id=CVE-2026-10665","licence":"CVE Terms of Use","modified":"2026-11-04T04:58:41.277Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-10665","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-10665","licence":"Public domain","modified":"2026-11-05T19:37:16.457Z"}],"updatedAt":"2026-11-25T22:59:27.761Z","epss":{"score":0.00442,"percentile":0.40159,"date":"2026-12-01T12:00:22.000Z"}}