OpenBSD collaboration/peer-review request

Zack Newman zack at philomathiclife.com
Tue Oct 6 17:31:31 UTC 2026


On 10/6/26 10:02 AM, Jason A. Donenfeld wrote:
> Hi Zack,
> 
> Oh, darn, that's really too bad. I'm CC'ing Matt on the thread; he was
> supposed to be in charge of keeping things sane. I don't like
> throw-it-over-the-fence coding.
> 
> Have you witness insane things happening in the code base? Or are you
> just worried about the churn, in theory, going bad?
> 
> Jason

Hi Jason,

I'm not a C nor kernel developer, and I don't keep track of actual code 
changes. I can't speak about "insane things"; thus I would say I'm 
worried about churn going bad. I also don't want to come off as 
sensationalist. I would be surprised if anything were found that 
constituted as a security issue. I imagine the bugs that exist are 
reliability and compatibility ones.

I can also be idyllic, so perhaps my expectations were unrealistic. I 
understand why you and the team care about how WireGuard is implemented 
because it can give it a bad name when it's done poorly, but I also 
understand the hesitation projects, especially relatively small projects 
like OpenBSD, have of requiring your team's involvement. The idealist in 
me likes code to be peer reviewed and collaboration to occur when 
possible. While I think the quality of code in general is rather high 
for OpenBSD, I don't subscribe to the idea that I should "just trust the 
developers".

You can grok the OpenBSD mail archives and find issues over the last 
five years related to WireGuard. The biggest problems were kernel panics 
caused by mbuf mishandling. What ensued was what I'd personally consider 
a series of hodepodge patches hoping the bugs would be fixed. This is 
pure speculation, but I imagine the devs were hesitant to touch too much 
of the WireGuard code out of fear of mishandling it. Despite being 
somewhat concerned with how these WireGuard issues were handled, I 
selfishly/lazily ignored it since I wasn't obviously impacted (e.g., I 
never experienced kernel panics).

Eventually one of the mbuf experts decided to take a more thorough 
attempt at fixing these issues, and he seemingly fixed the mbuf 
mishandling. Unfortunately by his own admission, he doesn't really use 
WireGuard; and his patch removed the padding "clamp" that would cause 
the MTU to be exceeded. I was affected by this bug and took days to 
figure out what was the culprit. After raising the issue, it was 
suggested to add the clamp when the plaintext was less than or equal to 
the MTU; but no special handling was suggested when the plaintext 
already exceeded the MTU.

Unconvinced by this patch, I consulted the Linux implementation to see 
how it handles that situation and found that it indeed handles that 
situation specially. An LLM-Claude Opus 5.5 if that's relevant-also 
suggested that while Linux consistently uses the same MTU in the 
WireGuard code as the networking stack does when passing the plaintext 
to WireGuard, OpenBSD unconditionally uses the interface's MTU in the 
WireGuard code even though, like Linux, its networking stack uses the 
routing MTU. This causes yet another difference in padding behavior.

Anyway, this is all to say that I personally would have preferred this 
been handled differently. Namely instead of putting off these bugs for a 
more legitimate fix, collaborate with the WireGuard team to ensure 
everything looks good while letting the mbuf experts handle what they're 
comfortable with. For whatever reason it appears no attempts were made 
to collaborate with your team though.

Zack


More information about the WireGuard mailing list