Menu

Before authentication: three bugs in Mullvad's gotatun
📰

Before authentication: three bugs in Mullvad's gotatun

DEV Community: rust·zerox80·10 days ago
#whiyll93
#devtorust#devto#dev#datagram#receive
Reading 0:00
15s threshold

WireGuard is known for staying silent towards packets it can't authenticate. But a userspace implementation has to receive a UDP datagram before it can decide whether to ignore it. That receive path is attack surface too.

I found three bugs there in gotatun , Mullvad's userspace WireGuard implementation in Rust. All three trigger before WireGuard authentication, and all three are fixed.

1. An empty datagram kills the Linux receive task

GHSA-6gxq-8xp9-742r · High (CVSS 7.5) · fixed in 0.10.1

On Linux, gotatun receives datagrams in batches with recvmmsg . For each result it took the payload like this:

result .iovs () .next () .expect ( "we create exactly one IoSlice" )

Enter fullscreen mode

Exit fullscreen mode

For an empty datagram, the iterator returns None , and expect panics. That panic ends the receive task that all peers on the device share. One zero-length UDP datagram to the listening port, and inbound traffic stops for every peer until the device is restarted or reconfigured.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.