|
|
Log in / Subscribe / Register

WireGuard bounces off FreeBSD—for now

WireGuard bounces off FreeBSD—for now

Posted Mar 24, 2021 20:30 UTC (Wed) by excors (subscriber, #95769)
In reply to: WireGuard bounces off FreeBSD—for now by bredelings
Parent article: WireGuard bounces off FreeBSD—for now

> looking at the blog post from Long, it looks like these assertions (i.e. random sleeps to fix race conditions) were not made with respect to specific lines of code, and Long believes that they are false.

From the imported Netgate code (https://cgit.freebsd.org/src/commit/sys/dev/if_wg?id=2338...), I think the "random sleep" are the 'pause("link_down", hz/4)' etc. And they were explicitly added to avoid race conditions (https://reviews.freebsd.org/D26137#611017). wg_allowedip_valid is a "validation functions that just returned true". __chacha20poly1305_decrypt looks like "random printf statements deep in crypto code". (The commented-out WARN_ON calls are sloppy but probably don't count).

That doesn't look as terrible as Donenfeld implies, but his points seem basically true, and those are all quite obvious issues that suggest the code was merged without being reviewed to a high standard. Those specific issues could have been fixed with some iterations of reviewing and patching, but it seems hard to have much confidence that there aren't a lot of more subtle bugs that will slip past all those reviews, since it doesn't look like the code was developed with a particularly security-oriented mindset from the start.

It may have been developed and reviewed to the same standards as a lot of kernel code, and maybe that's good enough to probably avoid any major security bugs (so Netgate is not wrong in claiming there are no exploitable vulnerabilities), but Donenfeld appears to deliberately set higher quality standards for WireGuard implementations. It seems he views it as a brand, where a bad implementation on one OS will hurt the overall brand and will discourage users from using it on other OSes where it has been implemented well; it's important to ensure every implementation is not just technically compatible with the protocol but is also implemented to a high standard. But few kernel developers have the same standards, and that leads to some stepping on toes.


The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:

Note: you can avoid this step in the future by logging into your LWN account.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds