Are all BSDs created equally? A survey of BSD kernel vulnerabilities [video]
media.ccc.de
media.ccc.de
You may or may not be aware, but FreeBSD runs your movies on Netflix, your games on PlayStation, your files on FreeNAS and ZFS, your friends on WhatsApp and OpenBSD runs everywhere else as OpenSSH. ;)
So, you may or may not know that, but you need FreeBSD and OpenBSD and they also need you! Every cent counts and so does every contributor, that helps the foundations keep their non-profit status.
Also, you CAN be the change, if you specify what you'd like your donation to be used for (like more secure defaults for the OS or towards code review and bugs fixing).
Does it really bother you that much if your $10 of donation will benefit yourself, myself, other ordinary people and some companies at the same time, enough to stop you from donating?
I personally can't understand that, because when I donate my money or my code, it's yours then and you're free to do with it as you please, and wether you make $1000000 off it or not, it's not my concern anymore.
The idea that at some point in the future I might want to use FreeBSD is definitely a better motivator. However this same argument applies to a million other projects that are in need of donations. My donation fund is limited, and so arguments that apply to pretty much every project don't make these BSD projects stand out.
In practice there are projects which I'm already actively using, and they get the majority of my donations. However I do occasionally donate to projects with future potential that I haven't benefited from yet.
I'm not against donating, even to projects which I don't directly use. I'm just saying that the fund raising pitch here is very weak. Not to belittle the BSD projects, but to point out that the situation can be greatly improved. Although yes I also understand that most open source project people want to work on their personal pet features and not deal with things like marketing, sales, image building.
It's much simpler to get a connection this way and some interest from the end user, who otherwise wouldn't have heard about FreeBSD and wouldn't ever thought on donating the money to a project that he wouldn't have know is running so many things he enjoys and or relies on.
We're aware everyone has limited funds and lots of people have better use for their resources than to donate, but this is exactly why we are asking kindly, we are not demanding nor trying to impose our point of view in such donation request and most importantly, we're not judging regardless of the donation decision :)
We are grateful even for discussion such as this one, that may spread out the knowledge and familiarity of the FreeBSD project and in result perhaps drive even more donations or - better yet - new project members!
Just to point out, that DTrace and ZFS are (were) not BSD features, and were not invented by a Open Source BSD.
It just happened that they were open sourced by a GPL incompatible license (CDDL) which makes it impossible to directly merge it into the mainline Linux kernel.
EDIT
Just also to point out that had ZFS been a BSD licensed tech, it's very likely that ZoL would have been just as good an option as ZFS on FreeBSD.
so... let us get that straight.
* Netflix had a revenue of 8.83 billion dollars USD last year.
* Sony had a revenue of 68 fucking billion dollars.
* WhatsApp is owned by facebook which will have around 40 billion dollar revenue this year it seems
and all these guys put together aren't arsed to contribute enough for paying for a few full-time devs, in addition to keeping a part of their modifications to the BSD source closed, but us, the users, should additionnally roll out some bucks to help these companies make even more money ? What's wrong with you people ?
What next ? Should we also donate to tanenbaum to help Intel (59 billion $ revenue) conceal its next iteration of the management engine better ?
Second thing is that's its much easier to ask open source aware HN reader for $50 than a huge megacorp hive mind for 50c. Not to mention every 'end user dollar' is worth much more for the foundation given the regulations, where to keep the tax status we need to show up numbers supporting in people, rather than businesses.
And finally, many of these companies do give us money and code, some in the open, some anonymously due to the reasons known only to them.
Just a food for thought for you when you'll be thinking about these donations :)
I do donate to FreeBSD regularly - in fact, I have a matching paycheck donation set up. But that's because I personally use it in my projects. When it comes to Netflix, I already pay for Netflix, so the notion that I should also pay to FreeBSD because it makes Netflix possible is kinda ridiculous.
[1] https://www.freebsdfoundation.org/donors/
[2] https://people.freebsd.org/~rrs/asiabsd_tls_improved.pdf
All of this free, open, etc. software works in part because of a "pay it forward" approach to the community. If people shame big users for not "paying back" enough, rather than finding more productive means of encouragement, the whole system of free tools becomes less tenable because future users will pick other tools that don't have PR risk attached.
That's the free rider problem, one that the GPL (and the AGPL) was designed to avoid.
It's true that many of those companies which use FreeBSD wouldn't touch a GPL codebase (and all the more so an AGPL codebase), but that't the point - while some chose FreeBSD because it's fast/stable (NF and WhatsApp), others chose it because they don't have to contribute back.
Nothing they've built in their stack would translate to an Xorg driver, beyond the kernel shim (the smallest and simplest portion of the code, in most video drivers).
I am a Free Software Foundation (FSF) member because I believe that end-user freedoms are becoming increasingly under threat as of late and they appear to be among the few that are taking the problem seriously.
The relevance of the original code can be taken away, for example by hijacking a standard or through control of APIs and/or hardware. Will anyone be able to buy hardware in 10 years time that will not be under the full control of a corporation?
One is that the users of *BSD's aren't donating to the development, despite enjoying its fruits. GPL will never help here.
The other is about not having to give your changes to the project itself back (bug fixes or features). GPL helps here. However, your examples do not apply to this bucket: Sony's fancy graphics driver can just be a closed-source out-of-tree driver, which would be perfectly compliant with GPL. This is why we have closed-source graphics drivers on Linux.
I personally love open source, and greatly dislike GPL. I prefer the Apache licenses (open but legally explicit), but am completely okay with BSD/MIT.
And yet, having Linux being GPL must have given incentive at some point to give code back since nowadays both Intel and AMD have very good GPL'ed drivers.
Having open source drivers grant Intel and AMD at least the following:
1. Free work on their drivers. Who wouldn't benefit from bug fixes and improvements to the graphics drivers of extremely popular graphics cards? In other words, it reduces cost.
2. Good marketing. There is only a very small group of people who are twisted enough to think that open source is a bad thing. There is a much larger group that see it as a positive thing (and then there's the group that doesn't care at all). In other words, it increases sales.
3. Greater ability to mold the Linux kernel to better accommodate their drivers and needs. Even though a company can send patches to the kernel that would help their closed-source drivers, if they only help closed-source drivers, they are very unlikely to be accepted. On the other hand, any sane change that would help an in-tree driver would be accepted without question. In other words, it increases flexibility.
None of this relates to GPL (the drivers are probably only GPL because GPL forces the in-tree drivers to be GPL), and the same logic applies to *BSD's. The reason we don't have good graphics drivers on BSD is likely because it takes a lot of effort to write one. If it isn't going to affect revenue, Intel and AMD are unlikely to care.
By the way, amdgpu does not appear to be GPL, just GPL compatible. https://github.com/wkennington/linux-firmware/blob/master/LI...
This is a loophole with the GPL, not the way it is intended to be used. It is far from clear if this is even legal. The Linux developers are split on the issue, but no one seems to care enough to press charges.
If having GPL-licensed code execute non-GPL binary components violates the license, then it would be a license violation to execute any binary that is not GPL-licensed on such an operating system running a GPL-licensed kernel. Such a limitation would be absurd.
From a high-level, project-agnostic perspective, there is no difference between a kernel module and an application binary—they are both external binary blobs with the intention to extend the functionality of the initial project (in this case the Linux kernel). The differences are low-level and kernel-specific (kernel- vs. user-mode, API availability, intended functionality). The GPL does not distinguish between a printer driver or a calculator application.
Another aspect would be the use of a GPL-licensed header file. However, coming to the conclusion that using an untouched header-file (which usually only contains an API surface) from a GPL-licensed project taint code to require GPL-license for compliance would have huge consequences. Many projects would be rendered in violation overnight. This would likely hurt GPL.
There is nothing wrong with porting from Linux.
We have a compatibility layer for Linux drivers in the kernel (LinuxKPI), so the GPU drivers are not modified that much. A lot of work on LinuxKPI has been sponsored by Mellanox, by the way :) since it's also used for their network drivers (mlx4/5).
And it works fine, I'm currently writing this from a PC with an RX 480 running FreeBSD 12-CURRENT. DRI3, Wayland, Vulkan — everything works.
Also, the Sony driver would've been completely irrelevant to desktop systems. It supports one specific GPU model, Sony proprietary APIs, probably nothing in terms of KMS/DRM/GBM/EGL!
https://openconnect.netflix.com/en/software/ "All code improvements, feature additions, and bug fixes are contributed directly back to the open source community via the FreeBSD committers on our team. We also strive to stay at the front of the FreeBSD development process, allowing us to have a tight feedback loop with other community and partner developers."
WhatsApp has also contributed monetarily and with software. You need to know that Facebook only recently bought WhatsApp.
Coming up on almost 4 years now since the WhatsApp acquisition was announced (Feb 2014) and over 3 years since the acquisition closed (Oct 2014). [1] [2]
I wouldn't call either date "recently"
[1] http://money.cnn.com/2014/02/19/technology/social/facebook-w...
[2] https://www.bloomberg.com/news/articles/2014-10-28/facebook-...
Have you considered improving your boilerplate spiel?
* https://news.ycombinator.com/item?id=16011478
Reminding me that these huge corporations are donating so little that you still need to ask for donations on HN makes me want to donate less, not more.
I already give Netflix money, and I think Facebook (and thus by extension WhatsApp) are total scum.
Again, why should I give you money so that they can leech off my donation?
Why aren't these companies that allegedly rely so heavily on FreeBSD making you financially stable?
What's scummy about Facebook is the way Zuckerberg pushes the message that privacy is dead while using the money he made selling my privacy to buy all the mansions around his so that he can protect his own privacy.
But that's for another thread: I'm interested in why FreeBSD isn't receiving the financial support it seems to require from the corps that are leeching off volunteers to pad their profit margins.
Turns out the BSDs have just as many bugs as Linux. (He found dozens over the course of 3 months.) OpenBSD has less bugs than FreeBSD (presumably because they have removed a lot of old code) and FreeBSD has less bugs than NetBSD.
After reporting the bugs he noticed that OpenBSD handles bugs really well, NetBSD less well and FreeBSD in many cases not at all. (By handling the bugs I mean fixing them in current and providing patches/advisories for the latest release.)
He said he reported them a few months back and checked if they were fixed a few days before congress. 3 were fixed, the other ~20 weren't.
I am not sure about others but I have never considered what is reported at http://www.netbsd.org/support/security/ as comprehensive.
I like to think the majority of NetBSD users either track -current, compile their own custom kernels or can learn to do as much. The project certainly makes it easy enough.
The flipside of the "many eyes" argument is that the Linux kernel has substantial financial backing and teams of paid developers behind it. NetBSD is relatively small and most contributors are not paid. I think they do an admirable job considering the number of active contributors and maintainers they have. (That is really an understatement but I do not want to appear too biased.) This is not the first time I have seen them immediately fix stuff when it is reported1.
1 http://bulk.fefe.de/scalability/
Unfortunately, even though the presenter mentioned loc several times, he did not try to calculate a bugs:loc ratio. Having a highly educational "history of BSD UNIX" and a large quantity of source code that allows hobbyists to run old hardware in their tree makes NetBSD not only unique and useful but also an easy target for any contemporary security researcher.
I only wish more would take on the challenge. Because sometimes things get fixed fast when this happens.
But comparing one project that has SVR4 compatibilty code to another project that has no such compat code, is that really an apt comparison? The old code is there for a reason. IMO, it does not imply many users will ever need it, that every user is actively using it, or that any user should have it in their kernel if they do not need it.
It is very easy for NetBSD users to compile kernels without code that will not be used, e.g., compatibility code. Easier than in any other OS I have tried. IMO, by making custom kernels so effortless to create (incl. best cross-compilation experience, IMO), it encourages users to compile smaller kernels without the drivers, compat code and other stuff they do not need.
But the presenter here was focused only on the assumption of a "default" kernel config. Not the potential to create small custom kernels with minimal attack surface.
Also: When the presenter was discussing filesystems, I wondered if he knew about rump. I think NetBSD was the first to have a such an innovative, safe way to mount filesystems using kernel drivers in userspace, without risk of crashing the kernel.
very few people ever bother to change them unless a specific, user visible problem is occuring
due to the first point, non-defaults receive little or no testing, and are highly likely to be broken, and stay broken because the catch 22 of nobody cares so its broken, and because its broken nobody cares.
Off by default is very much the status of mitigation technologies in FreeBSD atm, its a shame that the author did not touch on this as its one area OpenBSD is miles ahead of FreeBSD in particular (mitigations on by default, breakage exposed and fixed due to it, they remain mostly unusable on FreeBSD due to them).
a lot of former netbsd developers are still hanging around and contributing to pkgsrc while using it on OS X or linux, I don't think that's a thing to be ashamed of.
https://news.ycombinator.com/item?id=10298512
(Not quite "docs", but hopefully better than nothing!)
I would bet that this is not the case for NetBSD users. I'm pretty sure most of them change the defaults and have a pretty good of what's running where. I'm not insinuating that all of them are security researchers, but to the very least are above-average UNIX users.
The comparison I like to use, though not completely fair, is that the linux kernel is now at what... 14mil+ loc, while minix is at more like 14k loc. As we have seen with the intel ME debacle... minix is production ready. This is also why I still think a microkernel is going to be the future.
GNU+HURD and half-life 3 release on the same day I think though.
They can be protected after the fact with "You thought there were enough eyes, but there actually weren't." and "You thought the code was simple, but it actually wasn't."
Many eyes would make many bugs shallow if there only were said eyes.
The problem is that very few people lift a pinky to help audit & secure the software they use. Nobody reads the code. And then when disaster strikes a particular well known & widely used project and people start paying attention, they notice the code is full of low-hanging fruit that anyone could've fixed (nobody did).
Even when people read code and find bugs (as I often do), they're too busy to actually report let alone fix them.
It's so comfortable to pretend that someone else must've audited the code for you because it's open sauce. So you don't have to :-)
Many projects are stable only because the massive numbers of users that find bugs by running the software.
On the other hand there are virtually zero-fault small projects that no one is interested in because they are finished, bug-free and the author/maintainer would like to keep it that way.
Interesting that this statement did not trigger the usual mindless, meme-like HN syllogisms:
"Software is never finished."
"All software has bugs."
They try to discredit the truth that such small projects exist and might have something to offer.
I generally run the newest snapshot of the current NetBSD release (currently 7.1.1). I've had really good luck with the snapshots.
it does have an issue with making advisories, though.
https://media.defcon.org/DEF%20CON%2025/DEF%20CON%2025%20pre...
$ wget --timeout=60 https://media.defcon.org/DEF%20CON%2025/DEF%20CON%2025%20presentations/DEFCON-25-Ilja-van-Sprundel-BSD-Kern-Vulns.pdf
--2017-12-31 17:15:23-- https://media.defcon.org/DEF%20CON%2025/DEF%20CON%2025%20presentations/DEFCON-25-Ilja-van-Sprundel-BSD-Kern-Vulns.pdf
Resolving media.defcon.org (media.defcon.org)... 162.222.171.207
Connecting to media.defcon.org (media.defcon.org)|162.222.171.207|:443... connected.
Unable to establish SSL connection.HN is fond of blaming C, but seldom has any awareness of why almost everything does use C. This is not to say that C is perfect, but replacing it needs deep expertise in the fields in which C is still dominant.