News for hackers. Stuff that matters.
Re:FreeBSD Core Team Statement on FreeBSD Development Processes by tgbugs on Monday March 29, 2021 @11:50AM (#26623636)
Here is a writeup that provides a good review of the context for this [0].

0. https://arstechnica.com/gadgets/2021/03/buffer-overruns-lice...

Re:FreeBSD Core Team Statement on FreeBSD Development Processes by generalizations on Monday March 29, 2021 @11:57AM (#26623748)
Honestly, the criticism of the freebsd code review process seems way overblown. To me, it looks like a smaller team that works well together in a less formal manner, and someone exploited that.

They caught it, the person has lost trust, they all moved on. Big whup.

Re:FreeBSD Core Team Statement on FreeBSD Development Processes by ajross on Monday March 29, 2021 @12:35PM (#26624389)
Well, it's not the end of the world (and I feel much more sympathy for this guy's poor tenants than I do for pfSense customers), but...

Bad code going unreviewed from a single author into a main branch from which people build production systems is definitely beyond "Big whup" severity. The equivalent would be if one person pushed an unreviewed driver into Fedora Rawhide or an Ubuntu Beta, say. It's a clear violation of the principles behind the service the distro is supposed to be providing for you.

There are a zillion ways to make sure code gets reviewed before merge. Linux does it informally via Signed-off-by headers and a tree structure of trusted maintainers. Services like github provided automated tooling to enforce review. FreeBSD needs to just pick one. It's 2021, for goodness sake. A fixed COMMITTERS list just isn't going to cut it.

Re:FreeBSD Core Team Statement on FreeBSD Development Processes by anticristi on Monday March 29, 2021 @03:59PM (#26627389)
>In December 2020, development of the base system migrated from Subversion to Git.

Call me mean, but I don't associate FreeBSD with a project that is quick to adopt modern development practices.

I remember the time that FreeBSD moved from CVS to SVN, and it was hailed as revolutionary. The world was already embracing Git, which, despite its flaws back then, was perceived as a bliss compared to SVN.

Re:FreeBSD Core Team Statement on FreeBSD Development Processes by jjav on Monday March 29, 2021 @05:11PM (#26628223)
That's not mean, it is a compliment. Although the phrase "modern development practices" makes it a loaded statement.

There is much value in not constantly hopping onto every hypetrain that comes along. For a reliable project, I want to see engineering practices that favor remaining on proven stable technologies as long as possible. Let all the hypes die down, don't go down with them.

Re:FreeBSD Core Team Statement on FreeBSD Development Processes by colejohnson66 on Monday March 29, 2021 @05:59PM (#26628773)
I don't see how code review is "modern development practices" (in a bad way). It's common sense.

An analogy would be lawyers. They don't represent family because they may overlook something they think is meaningless, but a "fresh pair of eyes" would say is very important. With code, it's the same way: your eyes are biased towards your own code which can cause you to miss a bug.

Re:FreeBSD Core Team Statement on FreeBSD Development Processes by unethical_ban on Monday March 29, 2021 @12:09PM (#26623939)
The items they discuss, like more rigor on MRs, static analysis, etc. seem like no-brainers from five years ago. I'm not knocking them, I don't know the scope of their limitations. And they're doing the improvements now, so good on them. Just seems odd some things weren't being done previously.
Re:FreeBSD Core Team Statement on FreeBSD Development Processes by oblio on Tuesday March 30, 2021 @04:53AM (#26632415)
My guess, after lurking around the internet for the past few decades and keeping an eye on what BSDs generally do, it's a mix of NIH/people that don't want to change their existing workflows and lack of financial resources. It's hard to say what the percentages are for the two.
Re:FreeBSD Core Team Statement on FreeBSD Development Processes by gmueckl on Monday March 29, 2021 @12:13PM (#26624021)
Even if you trust your team members to do a good job, another pair of eyes on the code before it goes in rarely hurt. Everybody slips up once in a while and a review has at least a chance of catching the worst mistakes early. Team size doesn't matter. You just need to bring a little discipline to the process.
Re:FreeBSD Core Team Statement on FreeBSD Development Processes by Voline on Monday March 29, 2021 @05:31PM (#26628417)
This weekend I came across an interesting comment on the Netgate WireGuard fiasco from a former FreeBSD Core team member David Chisnall. He does consider it a failure of FreeBSD's process.

https://lobste.rs/s/sh2kcf/buffer_overruns_license_violation...

Re:FreeBSD Core Team Statement on FreeBSD Development Processes by kevans91 on Monday March 29, 2021 @11:55AM (#26623723)
FWIW, "good review" is pretty debatable (source: was involved) -- it provides a decent overview, but you should read it with the thought in mind that the author did some pretty heavy cherry-picking to support their arguments. Also, this indeed is not "Kernel Debugging Quarterly."
Re:FreeBSD Core Team Statement on FreeBSD Development Processes by mbreese on Monday March 29, 2021 @12:00PM (#26623776)
I thought the Ars article was a pretty good overview for the context of this current issue and why there needs to be a statement on FreeBSD development practices at all. I don't expect Ars to get into too many kernel specifics, so won't knock them for that. But as far as bringing more attention to how the mess started in the first place (and was dealt with), I think the Ars article is a pretty good place to start.

I mean, the question of how the rough-draft Wireguard implementation made it into the kernel in the first place without sufficient review is a pretty big question.

I'm happy the FreeBSD team is addressing it directly.

Re:FreeBSD Core Team Statement on FreeBSD Development Processes by kevans91 on Monday March 29, 2021 @12:16PM (#26624067)
Yeah, sorry, I'm mostly lamenting that there's not a more objective overview. This whole situation is pretty tiring at this point, so it's unlikely that one will surface except as a post-mortem down the road.
Re:FreeBSD Core Team Statement on FreeBSD Development Processes by busterarm on Monday March 29, 2021 @12:54PM (#26624687)
I think that unfortunately a lot of people can't separate "this code is bad" from "this person is bad".

We all have times when we don't ship our best work. Life happens. It's also worth noting to the readers that Donenfeld's criticism of bad code is completely dispassionate and that he isn't above criticising himself. He seems to be genuinely among the nicest people in the community.

This seems unfortunate for mmacy and unfortunately exacerbated by the behavior of Netgate.

Re:FreeBSD Core Team Statement on FreeBSD Development Processes by loeg on Monday March 29, 2021 @01:20PM (#26625131)
> It's also worth noting to the readers that Donenfeld's criticism of bad code is completely dispassionate and that he isn't above criticising himself.

Er, what? Donenfeld's hyperbole and wild characterizations are part of what fanned the flames and made this a tech-press mess instead of some quiet collaboration and bug reports.[0]

> The first step was assessing the current state of the code the previous developer had dumped into the tree. It was not pretty. I imagined strange Internet voices jeering, “this is what gives C a bad name!” There were random sleeps added to “fix” race conditions, validation functions that just returned true, catastrophic cryptographic vulnerabilities, whole parts of the protocol unimplemented, kernel panics, security bypasses, overflows, random printf statements deep in crypto code, the most spectacular buffer overflows, and the whole litany of awful things that go wrong when people aren’t careful when they write C.

While some details are based in reality, the paragraph goes well beyond the realm of truth. It makes totally unnecessarily jabs at Macy as "the previous developer." He is (broadly) a competent C/kernel developer. Yes, he did an inadequate job here. No, some Greek chorus isn't jeering about the C code just because stylistically it differs from how Donenfeld would write it.

To my knowledge:

* There was only a single "validation function that returned true," and it involved validating an ip address internal to a validated and decoded message from a wg peer. The message is already cryptographically verified; only peers that are part of the same mesh could spoof IPs outside of their configured range. (Donenfeld described this as validation functions, plural.)

* Donenfeld's only ever found a single real buffer overflow. It's the one where Jumbo frames can cause heap overflow. His other buffer overflow claims are not realistic due to other constraints on the inputs. Mostly they seem to reflect stylistic preferences about using mallocarray(a, n) instead of malloc(a * n). So the claims of "spectacular" buffer overflow(s), plural, feels disingenuous. (I don't know what "spectacular" is supposed to mean in a cold technical critique, either.)

Maybe this is "dispassionate," but it seems unnecessarily careless with the facts when writing technical criticism.

To be clear, Netgate's press response to this was totally inappropriate and also just a dumb move. The public narrative would be more in their favor if they had been totally silent instead of posting the angry screed they did.

Ars takes Donenfeld's hyperbole and runs with it, fact-checking only the easily verified claims. And there is some truthiness to it! Unfortunately, it's the rest of the communication that leaves something wanting.

Anyway, I love wireguard and what Donenfeld has accomplished. I just wish the guy would be a bit more considerate and less colorful when writing sensitive emails.

[0]: https://lists.zx2c4.com/pipermail/wireguard/2021-March/00649...

Re:FreeBSD Core Team Statement on FreeBSD Development Processes by kaliszad on Monday March 29, 2021 @11:22PM (#26630971)
If a security product/ supposedly trusted projects code loses some company's secrets or hurts somebody, nobody cares whether it was a single bad day, a mishap if you will or something that could have been forseen. The data is now in bad hands, peoples lives are disturbed. Everything else is basically just talk until _proven_ otherwise. FreeBSD really dodged the ball at the last minute here.

Would you employ somebody for work on a security product that obviously behaved as a maniac, basically robbed his own family of savings and landed together with his wife in prison for years? Is this person that good that there was literally nobody else to ask? It seems, Donenfeld at al. did a good job in 1-2 weeks porting code to FreeBSD, it may be better quality than the Macy's quasi-original developed over months of work. (Some of the code seems to have been rather similar to a differently licensed code elsewhere.)

* Ok, so Donenfeld maybe is right, maybe he just dropped an extra s in an _email_. * The buffer overflow was quite spectacular. A network professional in a security product should handle jumbo frames. Maybe there are other less obvious and maybe less spectacular overflows elsewhere. This one just hit Jim Salters eye (grep).

Btw. how would you feel about somebody basically doing your trademark (Wireguard in this case) a bad reputation? I could understand it, if Donenfeld took it personally. It seems though, he didn't. Macy on the other hand wouldn't admit to the poor quality of the software he wrote until pressured with clear evidence and even then he couldn't fully swallow his ego.

Ars Technica/ Jim Salter did some great journalism here. It goes way beyond the quality of the average article even at Ars and that is a very decent bar.

Yes, Wireguard is great, Donenfeld and friends have done a tremendous job over the years.

Re:FreeBSD Core Team Statement on FreeBSD Development Processes by wbl on Monday March 29, 2021 @04:56PM (#26628062)
Mallocarray exists for a very good reason. If you don't check for overflow you can allocate a much smaller buffer than needed. Mallocarray handles this case for you.
Re:FreeBSD Core Team Statement on FreeBSD Development Processes by loeg on Monday March 29, 2021 @05:23PM (#26628342)
I understand what mallocarray does and why it is preferable. In these cases, the multiplied values happen to be constrained such that overflow is not possible. Given that precondition, the two patterns are functionally equivalent.

For what it's worth, I tend to advocate for using mallocarray and would use mallocarray in the same places Donenfeld does here. But unless overflow can actually happen, it's stylistic rather than "bug."

Re:FreeBSD Core Team Statement on FreeBSD Development Processes by loeg on Monday March 29, 2021 @12:54PM (#26624697)
I would suggest the LWN article instead: https://news.ycombinator.com/item?id=26572370
Re:FreeBSD Core Team Statement on FreeBSD Development Processes by Ericson2314 on Monday March 29, 2021 @12:18PM (#26624111)
Wow, evil landlords, C being bad. All my favorite things to discuss in one article!
Re:FreeBSD Core Team Statement on FreeBSD Development Processes by cryptonector on Monday March 29, 2021 @12:01PM (#26623793)
Wow. Thanks for that link.