{"id":"CVE-2026-144412","aliases":["EUVD-2026-144506","GHSA-fc57-wfhg-7c2w"],"status":"published","title":"GotaTun: Oversized UDP datagram can stop default Windows Device reception","description":"GotaTun is a userspace WireGuard implementation in Rust. Prior to 0.10.0, an unauthenticated sender can deliver a UDP datagram larger than the default 4096-byte PacketBufPool to a Windows Device using the built-in non-windows-gro transport. In gotatun/src/device/mod.rs, Connection::set_up passes that pool to BufferedUdpReceive, and gotatun/src/udp/socket/windows.rs propagates the resulting WSAEMSGSIZE receive error. The producer task exits, the channel closes after queued packets drain, and DeviceState::handle_incoming returns successfully without recording a fatal error or restarting reception, stopping inbound handshakes and data for all peers. Source inspection indicates that reception remains stopped until the application rebuilds the connection, although recovery by rebuilding was not tested. This issue is fixed in version 0.10.0.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"cna","from":"cve"},"buzz":{"score":0.5,"authors":1},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true,"poc_reported":true},"cwes":["CWE-755"],"published":"2026-12-04T17:30:10Z","modified":"2026-12-04T22:09:26Z","fixes":[{"ecosystem":"crates.io","package":"gotatun","fixed_in":["0.10.0"],"sources":["ghsa"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"gotatun","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"0.9.2"},{"fixed":"0.10.0"}]}]}],"products":[{"vendor":"mullvad","product":"gotatun"}],"references":[{"url":"https://github.com/mullvad/gotatun/security/advisories/GHSA-fc57-wfhg-7c2w","tags":["x_refsource_CONFIRM","exploit","advisory"]},{"url":"https://github.com/mullvad/gotatun/pull/200","tags":["x_refsource_MISC","fix"]},{"url":"https://github.com/mullvad/gotatun/commit/891e2137bb4b42e50b6af59dfffe51de6494f55c","tags":["x_refsource_MISC","fix"]},{"url":"https://github.com/mullvad/gotatun/releases/tag/v0.10.0","tags":["x_refsource_MISC","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-144412","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-fc57-wfhg-7c2w"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/144xxx/CVE-2026-144412.json","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2026-144412","title":"GotaTun: Oversized UDP datagram can stop default Windows Device reception","description":"GotaTun is a userspace WireGuard implementation in Rust. Prior to 0.10.0, an unauthenticated sender can deliver a UDP datagram larger than the default 4096-byte PacketBufPool to a Windows Device using the built-in non-windows-gro transport. In gotatun/src/device/mod.rs, Connection::set_up passes that pool to BufferedUdpReceive, and gotatun/src/udp/socket/windows.rs propagates the resulting WSAEMSGSIZE receive error. The producer task exits, the channel closes after queued packets drain, and DeviceState::handle_incoming returns successfully without recording a fatal error or restarting reception, stopping inbound handshakes and data for all peers. Source inspection indicates that reception remains stopped until the application rebuilds the connection, although recovery by rebuilding was not tested. This issue is fixed in version 0.10.0.","status":"published","published":"2026-12-04T17:30:10.36Z","modified":"2026-12-04T18:04:46.805Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-755"],"ssvc":{"exploitation":"poc","automatable":"yes","technical_impact":"partial","date":"2026-12-04"},"updated_at":"2026-12-04T18:11:17.59739Z"}],"euvd":[{"id":"EUVD-2026-144506","description":"GotaTun is a userspace WireGuard implementation in Rust. Prior to 0.10.0, an unauthenticated sender can deliver a UDP datagram larger than the default 4096-byte PacketBufPool to a Windows Device using the built-in non-windows-gro transport. In gotatun/src/device/mod.rs, Connection::set_up passes that pool to BufferedUdpReceive, and gotatun/src/udp/socket/windows.rs propagates the resulting WSAEMSGSIZE receive error. The producer task exits, the channel closes after queued packets drain, and DeviceState::handle_incoming returns successfully without recording a fatal error or restarting reception, stopping inbound handshakes and data for all peers. Source inspection indicates that reception remains stopped until the application rebuilds the connection, although recovery by rebuilding was not tested. This issue is fixed in version 0.10.0.","status":"published","published":"2026-12-04T17:30:10Z","modified":"2026-12-04T18:04:46Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-12-04T18:41:48.315937Z"}],"ghsa":[{"id":"GHSA-fc57-wfhg-7c2w","title":"GotaTun: Oversized UDP datagram can stop default Windows Device reception","description":"### Summary\n\nAn unauthenticated sender able to deliver a UDP datagram larger than 4096 bytes to a Windows Device using the built-in transport without `windows-gro` can stop inbound processing for all peers on that Device. Source inspection indicates that the outage lasts until the application rebuilds the connection. A native Windows loopback test reproduced the receive error.\n\n### Details\n\nIn GotaTun 0.9.2, `Connection::set_up` in `gotatun/src/device/mod.rs` passes the default 4096-byte `PacketBufPool` to `BufferedUdpReceive`. The non-GRO receiver in `gotatun/src/udp/socket/windows.rs` receives directly into that buffer.\n\nLocked Mio 1.1.1 documents `WSAEMSGSIZE` when a Windows datagram exceeds the receive buffer, and its source preserves the error. Locked Tokio 1.50.0 retries `WouldBlock` but propagates other errors. GotaTun's default `UdpRecv::recv_many_from` propagates this error to `BufferedUdpReceive::new` in `gotatun/src/udp/buffer.rs`, which returns from its producer task. Once queued packets drain, the closed channel becomes a consumer error.\n\n`DeviceState::handle_incoming` ends its receive loop and returns `Ok(())`, before the offending input reaches packet verification. That successful exit bypasses fatal-error registration and does not restart reception.\n\nThe optional `windows-gro` Device path uses a 65535-byte batch buffer. Linux uses a different receive implementation. Network filtering can prevent delivery. The affected production paths are unchanged between the v0.9.2 tag and the reviewed revision. Earlier affected versions and a fixed release have not been established.\n\n### Proposed fix\n\nThe proposed patch is included below for private review. It discards datagrams that produce `WSAEMSGSIZE` and continues receiving, yielding between retries. Both direct Windows receive methods share this handling. The existing receive-buffer size and source-address mapping are preserved; the optional GRO batch path is unchanged.\n\nThe patch changes only `gotatun/src/udp/socket/windows.rs`. Other receive errors continue to propagate as before.\n\n### Patch validation\n\nOn Windows, an oversized UDP datagram can make the first receive call return `WSAEMSGSIZE` (10040). The socket remains usable, but the buffered receive worker exits on that error, interrupting packet delivery to its consumer. Native Windows 11 loopback tests reproduced this behavior and confirmed that the patch allows the next packet to be received.\n\nAn additional test on native Windows 11 exercised two peered GotaTun Devices with real loopback UDP sockets and in-process TUN channels. Baseline traffic succeeded in both builds. After a single 8192-byte datagram was sent to one Device’s UDP port, the unpatched build failed to deliver a subsequent packet to that Device within five seconds. With only the Windows receive patch applied, traffic continued in both directions. This covers the Device data path; a VPN product and recovery by rebuilding the Device were not tested.\n\n### Source reference\n\nRepository: `mullvad/gotatun`\nReviewed revision: `3e25b63e197d2754f7ca37d55faf1980e033b80a`\n\n- `gotatun/src/udp/socket/windows.rs:166–176` — Windows receive error\n- `gotatun/src/device/mod.rs:179–197` — Device receiver setup\n- `gotatun/src/packet/pool.rs:20–25` — default buffer size\n- `gotatun/src/udp/mod.rs:84–96` — default batch receive\n- `gotatun/src/udp/buffer.rs:135–147` — producer termination\n- `gotatun/src/udp/buffer.rs:171–178` — closed-channel error\n- `gotatun/src/device/mod.rs:626–639` — receive before verification\n- `gotatun/src/device/mod.rs:752–757` — successful task exit\n- `gotatun/tests/udp_oversized_datagram.rs:24–33` — Windows coverage excluded\n\n\u003cdetails\u003e\n\u003csummary\u003eProposed patch\u003c/summary\u003e\n\n```diff\ndiff --git a/gotatun/src/udp/socket/windows.rs b/gotatun/src/udp/socket/windows.rs\nindex c031d67..9170003 100644\n--- a/gotatun/src/udp/socket/windows.rs\n+++ b/gotatun/src/udp/socket/windows.rs\n@@ -163,16 +163,32 @@ impl UdpSend for super::UdpSocket {\n     }\n }\n \n+impl super::UdpSocket {\n+    async fn recv_datagram(\u0026self, pool: \u0026mut PacketBufPool) -\u003e io::Result\u003c(Packet, SocketAddr)\u003e {\n+        let mut buf = pool.get();\n+        loop {\n+            match self.socket().recv_from(\u0026mut buf).await {\n+                Ok((n, src)) =\u003e {\n+                    buf.truncate(n);\n+                    return Ok((buf, self.map_src(src)));\n+                }\n+                // Winsock discards the remainder of an oversized datagram. The socket\n+                // remains usable; never pass its truncated contents to the protocol.\n+                Err(err) if err.raw_os_error() == Some(WinSock::WSAEMSGSIZE) =\u003e {\n+                    tokio::task::yield_now().await;\n+                }\n+                Err(err) =\u003e return Err(err),\n+            }\n+        }\n+    }\n+}\n+\n #[cfg(not(feature = \"windows-gro\"))]\n impl UdpRecv for super::UdpSocket {\n     type RecvManyBuf = ();\n \n     async fn recv_from(\u0026mut self, pool: \u0026mut PacketBufPool) -\u003e io::Result\u003c(Packet, SocketAddr)\u003e {\n-        let mut buf = pool.get();\n-        let (n, src) = self.socket().recv_from(\u0026mut buf).await?;\n-        buf.truncate(n);\n-        let src = self.map_src(src);\n-        Ok((buf, src))\n+        self.recv_datagram(pool).await\n     }\n }\n \n@@ -210,11 +226,7 @@ mod gro {\n             \u0026mut self,\n             pool: \u0026mut PacketBufPool,\n         ) -\u003e io::Result\u003c(Packet, SocketAddr)\u003e {\n-            let mut buf = pool.get();\n-            let (n, src) = self.socket().recv_from(\u0026mut buf).await?;\n-            buf.truncate(n);\n-            let src = self.map_src(src);\n-            Ok((buf, src))\n+            self.recv_datagram(pool).await\n         }\n \n         async fn recv_many_from(\n```\n\n\u003c/details\u003e\n\n### Proof of concept\n\nA loopback-only test on native Windows 11 sent an 8192-byte UDP datagram followed by a short marker to a 4096-byte receive buffer. On the unpatched direct path, the first receive returned `WSAEMSGSIZE` (10040); a second receive still obtained the queued marker. In the buffered path, the producer exited on the first error, and the marker never reached the consumer. With the patch, the first direct receive and buffered consumer received complete markers.\n\n### Impact\n\nProposed High severity: persistent loss of inbound handshakes and data for every peer on the affected Device, conditional on delivery and the source-derived Windows behavior. This is not a claim of process-wide failure, code execution, decryption, or key disclosure. Application-driven rebuilding can restore service. The scope is the library configuration described above; exposure of any particular deployed VPN product has not been established.","status":"published","published":"2026-12-04T22:09:24Z","modified":"2026-12-04T22:09:26Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-755"],"updated_at":"2026-12-04T22:29:34.61237Z"}],"nvd":[{"id":"CVE-2026-144412","description":"GotaTun is a userspace WireGuard implementation in Rust. Prior to 0.10.0, an unauthenticated sender can deliver a UDP datagram larger than the default 4096-byte PacketBufPool to a Windows Device using the built-in non-windows-gro transport. In gotatun/src/device/mod.rs, Connection::set_up passes that pool to BufferedUdpReceive, and gotatun/src/udp/socket/windows.rs propagates the resulting WSAEMSGSIZE receive error. The producer task exits, the channel closes after queued packets drain, and DeviceState::handle_incoming returns successfully without recording a fatal error or restarting reception, stopping inbound handshakes and data for all peers. Source inspection indicates that reception remains stopped until the application rebuilds the connection, although recovery by rebuilding was not tested. This issue is fixed in version 0.10.0.","status":"published","published":"2026-12-04T18:17:29.91Z","modified":"2026-12-04T18:17:29.91Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-755"],"ssvc":{"exploitation":"poc","automatable":"yes","technical_impact":"partial","date":"2026-12-04"},"updated_at":"2026-12-04T18:27:05.658162Z"}],"osv":[{"id":"CVE-2026-144412","title":"GotaTun: Oversized UDP datagram can stop default Windows Device reception","description":"GotaTun is a userspace WireGuard implementation in Rust. Prior to 0.10.0, an unauthenticated sender can deliver a UDP datagram larger than the default 4096-byte PacketBufPool to a Windows Device using the built-in non-windows-gro transport. In gotatun/src/device/mod.rs, Connection::set_up passes that pool to BufferedUdpReceive, and gotatun/src/udp/socket/windows.rs propagates the resulting WSAEMSGSIZE receive error. The producer task exits, the channel closes after queued packets drain, and DeviceState::handle_incoming returns successfully without recording a fatal error or restarting reception, stopping inbound handshakes and data for all peers. Source inspection indicates that reception remains stopped until the application rebuilds the connection, although recovery by rebuilding was not tested. This issue is fixed in version 0.10.0.","status":"published","published":"2026-12-04T17:30:10.36Z","modified":"2026-12-04T19:45:36.270237242Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-755"],"updated_at":"2026-12-04T19:23:17.075225Z"}]}}
