WireGuard Merged into OpenBSD
marc.info
marc.info
Hope to release wireguard on FreeBSD soon as well.
In order pfSense to include it: https://redmine.pfsense.org/issues/8786
Available as a Port / package:
* https://www.freshports.org/net/wireguard/
* https://www.freshports.org/net/wireguard-go/
Running it in a jail for further compartmentalization:
* https://genneko.github.io/playing-with-bsd/networking/freebs...
Was satisfied with the state of affairs before but genuinely excited about this development.
It is important to remember though that it is not the number of users but but the value of the compromise that determines how compelling the O/S is. There are like vintage mainframe O/Ses for which folks are actively developing compromises because some government or telco hasn’t migrated off. Then again, those teams aren’t going to waste a exploit on somebody’s home Usenet archive.
TL;DR: nevermind. I am too busy arguing with myself to be coherent.
Here's an excellent talk (in website form) on the subject: https://isopenbsdsecu.re/about/
Quite frankly it reads like someone with an axe to grind against openbsd.
Here's a material example: OpenBSD has expended considerable effort into removing ROP gadgets from their compilation products[1].
As the website documents[2], these efforts haven't made a single exploit harder to write.
GCC even removed their (mostly equivalent) ROP mitigation approach, documenting it as "fairly ineffective" and "lur[ing] developers to the land of false security"[3].
(Another good example is PID randomization: OpenBSD added this over 20 years ago as part of their "randomize anything that can be randomized" approach. It's never had any real positive security impact, and has made other PID-based vulnerabilities more viable.)
[1]: https://www.openbsd.org/papers/eurobsdcon2018-rop.pdf
[2]: https://isopenbsdsecu.re/mitigations/rop_removal/
[3]: https://patchwork.ozlabs.org/project/gcc/patch/CAFULd4ZL-wa3...
That being said, I think Linux’s guts get far more attention than OpenBSD’s do, and that the (fewer) mitigations that Linux chooses to implement are much better supported by both information on real-world attacks and by the literature. Given that, I have a slight preference for Linux. But that shouldn’t be taken as praise.
After a while, mktemp got more usage (which is good) and $RANDOM became available for scripts and so forth, but the situation was quite bad 20+ years ago as far as vendor installation scripts went.
Perhaps exactly noone was saved on OpenBSD because few installed linux-compat Netscape 1.1N for i386 with a bad installation script while having adversarial users logged in, but there is no reason to be equally bad as the then-more-popular OSes who did see /tmp races being won by users.
At any rate, I think some people may forget what stock Linux distros or even a commercial *nix install used to look like at the default install, before people like the OpenBSD folks raised awareness of some of these issues. In the late 90s I recall default installs elsewhere that had a bunch of ports open and no firewall right out of the box in a default install. In the same timeframe OpenBSD was making a bit of a PR-ish stink about a secure default install. In the same timeframe OpenSSH came on the scene.
But honestly, there are a few things that OpenBSD is only really just starting to get really right in the last few years. syspatch and pkg_add-able binary updates in the stable branch are two that come to mind. Also sysupgrade; I used to dread upgrading OpenBSD [xkcd had the joke about it leading to shark attacks], but now it's really simple.
I especially like the part where it lists people who helped but it's all redacted. All of this "research" came from google and twitter. I'd like to see some bypasses to OpenBSD's mitigations and perhaps some ideas and/or code to help improve them or implement ones that these folks say work better. If they're all so bad then it shouldn't be hard for someone like the author or so called security experts he quoted to do these things. Yeah, maybe no one is going to pay for that work to be done... that seems to always be the response when someone asks for proof, code, etc. No one has the time. They sure spend enough time making websites, blog posts, and tweeting about it though.
I personally feel that OpenBSD is more secure for my use case, but I’m happy that people bring up points like this as humans make mistakes and not even OpenBSD is perfect.
I don't think OpenBSD has perfect security and I'm not sure why that needs to be said. I don't see anyone involved in the project making that claim either. What I'm saying is this talk/website is just as dubious as some of y'all think OpenBSD mitigations are and if that's not obvious from looking at the sources I'm not sure what else to say here.
Just as a guide telling you to "chmod 600 webserver.key" doesn't really state anymore that it tries to protect non-webserver access to the https key, because it is implied that removing random access to the key (or to non-useful syscalls in the case of pledge) means the threat was unexpected reads of the key by someone who shouldn't be allowed to do just that. No assessments would be found to say "chmod'ing 600 removes 56% of the unexpected read attempts, Posix ACLs 9% more, apparmor another 14%, and correct SELinux tags will stop upto 96% of the keyfile reads by the wrong user". If my wildly invented numbers were right would anyone suggest only using SELinux and leave keyfiles at chmod 777?
One can then put up an angry webpage claiming people who chmod their keys are crap at security, it is uneffective, no listing of what it even was meant to protect against and of course no hard numbers to it. But 0600 would help you the day some junior admin turned off selinux on the webserver because random HOWTO said colorls works better with it off.
Does that improve security? By how much? What exploitation would it have prevented? At what cost? If you're not measuring the impact then it's pretty much voodoo security.
> Just as a guide telling you to "chmod 600 webserver.key" doesn't really state anymore that it tries to protect non-webserver access to the https key, because it is implied that removing random access to the key (or to non-useful syscalls in the case of pledge) means the threat was unexpected reads of the key by someone who shouldn't be allowed to do just that.
Then that guide is of little practical use. On a multi-user server that chmod makes sense. Inside a single-user container/VM, it's completely pointless. If the guide isn't telling you what the threat model is, you have no idea whether the mitigations you're applying are relevant or not.
> No assessments would be found to say "chmod'ing 600 removes 56% of the unexpected read attempts, Posix ACLs 9% more, apparmor another 14%, and correct SELinux tags will stop upto 96% of the keyfile reads by the wrong user". If my wildly invented numbers were right would anyone suggest only using SELinux and leave keyfiles at chmod 777?
Yes! Of course. Would you not?
> But 0600 would help you the day some junior admin turned off selinux on the webserver because random HOWTO said colorls works better with it off.
If you think that's a real danger then include it in your threat model. Maybe SELinux is harder to understand, or configure, or too many people have access to its settings. Maybe it's the opposite (I've seen junior admins chmodding everything to 777 many times, I've yet to see one turn SELinux off). Either way, you need to explain that so that people understand it, otherwise you're encouraging people to cargo cult their security practices.
Some snippets:
> OpenBSD believes in strong security. Our aspiration is to be NUMBER ONE in the industry for security (if we are not already there). Our open software development model permits us to take a more uncompromising view towards increased security than most vendors are able to. We can make changes the vendors would not make. Also, since OpenBSD is exported with cryptography, we are able to take cryptographic approaches towards fixing security problems.
> ASLR: OpenBSD 3.4 [Nov 2003] was the first widely used operating system to provide it by default.
> W^X: First used for sparc, sparc64, alpha, and hppa in OpenBSD 3.3. Strictly enforced by default since OpenBSD 6.0: a program can only violate it if the executable is marked with PT_OPENBSD_WXNEEDED and it is located on a filesystem mounted with the wxallowed mount(8) option.
> Kernel relinking at boot: the .o files of the kernel are relinked in random order from a link-kit, before every reboot. This provides substantial interior randomization in the kernel's text and data segments for layout and relative branches/calls. Basically a unique address space for each kernel boot, similar to the userland fork+exec model described above but for the kernel. Theo de Raadt, June 2017.
BIG citation needed.
> Not sure it makes a difference over Linux
It doesn't.
Edit: listen, I understand that people are religious about their operating system kernel, but please make a reply to these points if you have one to refute.
https://vez.mrsk.me/freebsd-defaults.html
On Linux, I won't even start on the policy on most distros.
> BIG citation needed.
While it may be debatable how much of an effect the OpenBSD security culture has on real world security outcomes, it is pretty obvious to most people I think that OpenBSD has a culture of security (or a focus on it) that Linux simply does not have. Security is practically the entire branding of the project. Just go to its home page, literally the first sentence is an advertisement for its security record. The culture is very much there, regardless of results.
Now, if you did want to argue that the security culture does not necessarily result in better outcomes, 1) that intention should probably be made more clear, and 2) why not at least provide an argument or some amount of evidence for it?
* https://www.cvedetails.com/vulnerability-list.php?vendor_id=...
And then look at the same number of security advisories for the Linux kernal during the same time:
* https://www.cvedetails.com/vulnerability-list.php?vendor_id=...
And then remember that NOBODY uses OpenBSD.
Literally no big-time company uses OpenBSD. Who uses OpenBSD??? Literally nobody.
In aggregate they will serve/distribute 34 GB/s.
This is a business-critical workload.
Would you put this on OpenBSD? And if so, who would you call when it breaks?
Would you put this on FreeBSD? And if so, who would you call when it breaks?
We put this on Linux. And we can Red Hat when it breaks.
It has broken for us in the past. And we get absolutely top-notch Linux kernel TCP experts on the phone to help us fix the issues in no time.
FreeBSD: https://www.xinuos.com
OpenBSD: https://www.openbsd.org/support.html
NetBSD: https://www.netbsd.org/gallery/consultants.html
Oh and load-balancer..Jupiter OS is based on FreeBSD, pfsense and Opnsense(HardenedBSD), Netflix, Cisco, Sophos, Stormshield and so on:
https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/n...
PS: If you serve 34GB/s you should probably have your own 'top notch' TCP experts ;)
Personally I see this as the most exciting thing to happen to linux in the past 2 - 3 years.
I'm really pleased to see ongoing Wireguard integration in all the big platforms.
The setup is so simple, I route all my personal traffic through a simple cloud based WG + Pihole setup.
If wireguard doesn't meet your requirements, don't use it, but its kind of rediculous to complain it doesn't do X when doing X would defeat the point of the software.
The OpenBSD kernel module is also written in C: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/net/if_wg.c...
But the code looks quite different from https://git.zx2c4.com/wireguard-linux/tree/drivers/net/wireg...
That goal may be antithetical to a single codebase supporting multiple (possibly very dissimilar) operating systems.
It's interesting to compare this approach to the approach taken by OpenSSH (and its openssh-portable variant). One has code specific to each OS, the other one has one canonical codebase for one OS + patches addressing compatibility with other OSes. IMHO mostly due to the difference in complexity of each project.