187 points · by todsacerdoti · 3y ago · 179 comments
Portable version exists and the Linux world should have replaced openssl by now, but for unknown reasons this is yet to happen.
I am hopeful someday one of the larger distributions such as Debian will have the courage to step forward.
>but for unknown reasons this is yet to happen.
The reasons are very known. It's because libressl is not in fact "highly compatible with openssl."
Alpine: https://lists.alpinelinux.org/~alpine/devel/%3CCA%2BT2pCGFeh... (read the whole thread)
Gentoo: https://wiki.gentoo.org/wiki/LibreSSL
OPNsense: https://old.reddit.com/r/OPNsenseFirewall/comments/t4e5cp/op...
How? Better/newer algorithms? Faster? Cleaner code? Better APIs?
The old code was littered with conditional compilation macros that made it virtually impossible to reason about or test. There are just too many forks in the tree of possible compile flags.
The style of "make this code work against every possible standard library" is broken and results in insane spaghetti code. Instead, the BSD team rewrote OpenSSL in terms of a modern, complete C standard library. Then instead of making their LibreSSL cryptography code have conditional flags in it, they wrote shims for the standard library so that it would work on platforms where there are missing functions.
This results in far cleaner code that can be reviewed and tested with much greater confidence.
I dug up a couple of presentations by the LibreSSL team 9 years ago. It's full of "Wat!?" moments, such as discovering the OpenSSL has its own implementation of malloc & free! Why? Because on one platform they nobody uses any longer, those functions were "slow"! So now they have a custom-developed poorly maintained heap full of security issues. Worse still, that custom heap does not benefit from the security features of modern allocators or analysis tools like valgrind.
Watch: https://www.youtube.com/watch?v=-4psTQ1sX7s
I love the bullet point list of insanity they cut out:
- Ebcdidc support
- DOS support
- MacOS Classic support (pre OS 10)
- Win16 support
- VM Support
- Big-endian AMD64 support (!?)
That last one is a story in and of itself...The OpenSSL codebase is a legacy codebase, for sure. That said, it's a pretty consistent one (even with all the macros). I don't actively hunt for bugs, but I know the codebase enough that when one or two exploit came out in the past, I knew the relative area where things were impacted.
Also, writing one's own memory allocation library isn't that far fetched, especially if you want to encapsulate platform quirks at a specific layer. I don't think it made the transition to Mozilla owned Firefox, but Navigator (the predecessor) had it's own encapsulation of memory management because, in part, all the platforms and architectures it would compile for.
It also doesn't work on Windows XP. OpenSSL does.
This is, unfortunately, still important for many users.
I’m massively regretting that choice due to the UFS root filesystem. Power outage? Hope you weren’t planning on your internet coming back up without manual intervention. Get ready to plug that keyboard in and type “fsck” manually at boot, and press “y” a few dozen times while it asks you questions about what to do with corrupted inodes. I hope none of that data is important to the correct operation of the system!
A filesystem lacking journaling support in 2023 is an absolute travesty given that the rest of the world has had this problem solved for 25 years or so.
But that’s, in my opinion, brain-dead stupid when it only exists to work around the idiocy of not having a journaled file system like ever other modern OS has had for the past 25 years. Having to up-front plan a size (and inevitably get it wrong) for half a dozen partitions, just to work around glaringly obvious weaknesses in the OS itself, is beyond stupid.
For network appliances, read-only root FS is probably the way to go anyway. (I'd say it's also worth doing it in general.)
(Disclaimer: avid fan of everything BSD, OpenBSD in particular.)
Really hope this lands in -current.
It was updated just last month (June).
The nxdomain.no version is tracker-free other than my rather short lived nginx log.
What every IT person needs to know about OpenBSD Part 3: That packet filter - https://news.ycombinator.com/item?id=29290663 - Nov 2021 (48 comments)
What every IT person needs to know about OpenBSD Part 3: That packet filter - https://news.ycombinator.com/item?id=29186042 - Nov 2021 (1 comment)
What every IT person needs to know about OpenBSD - https://news.ycombinator.com/item?id=28709505 - Sept 2021 (12 comments)
And this is why I test everything I write for use at work on OpenBSD, it has helped me find some issues with items I have written for use on an application hosted on AIX
FreeBSD is generally assumed to be the least painful, but I usually don't even bother with that these days. If someone cares they can do the work.
Also there is no "LTS" release. The prior release gets updates until the next release drops. So you need to plan on release updates every 6 months. Luckily "sysupgrade" is usually painless but you need to check the release notes and packages you have installed for potential extra work (e.g. if you're running Postgres and it got a major version bump, you'll probably need to upgrade your database).
As soon as you install packages you are going to be dealing with incompatibilities between OpenBSD releases and dealing with a lot of recompilation.
As an example I had installed fish from the packages as my default shell and after upgrading from 6.X to 6.x+1 I could not log in anymore because the compiled fish binary simply was not compatible anymore.
It is all by design and once you know these people things you can work around “quirks” like this.
> Patches for supported releases are also incorporated into the -stable branch, which is maintained for one year after release.
(Yes I know some of these things have been ported, but aren't exactly as nice when "out of context".)
"where it is possible to spot damage, fail hard".
-which means that
poorly written software will crash a lot more often on OpenBSD
than elsewhere."
In other words, testing software on OpenBSD -- is one great way to find some types of bugs and other incorrect software designs...
In other words, testing software on OpenBSD -- can be thought of as applying a higher degree of correctness, rigor, and discipline -- to Software Engineering...
Sort of like a 'lint', but for a runtime...
It's not the only software test, that's true, not by a long shot -- but testing on OpenBSD would make a valuable addition to any professional software test corpus...
>"That in itself should make the platform attractive to developers."
It is, and it does!
Can’t see myself switching to OpenBSD at this point, but I’d try it just for fun if the installation has improved enough.
In real life OS testing and evaluation, I don't get to dedicate whole machines to any OS. No OS is that special, that important, or that versatile.
I always dual-boot because that often uncovers weaknesses and assumptions in installers... just as the OpenBSD devels encourage people to fail hard, the OpenBSD installer itself fails hard in a multi-boot scenario.
Example, to recreate if you are curious enough:
0. Set up a new PC (or VM, it doesn't matter.)
1. Install Windows (say, v10 as it's easy.)
2. Add a random Linux distro. For best results, have separate /, /home and swap partitions.
3. Now, try to add OpenBSD to that.
For best results, do this by directing a friend who has never used Unix through the process, over the phone so you can't see the screen. ;-)
If that's too easy, partition the disk with MBR so you have to deal with logical partitions too.
Maybe it’s less hairy now.
If you don't need old school partition learn what you do need and move on. The documentation has always matched the experience with OpenBSD. I enjoy OpenBSD simply becuase I know where to find the documentation. Some OS's have so many variations that I'm overwhelmed.
Considering the goals of OpenBSD the partitioning is a feature and structural.
If you decide to put everything in one large partition (not really recommended), always make sure /usr/local is on its own partition. If you do not do that, some ports will core dump. If you use one big partition, you will need to disable an important security feature to allow the ports to run.
Really no idea why it insists on splitting it into 5 partitions when just a seperate /usr/local mounted with the wxallowed flag is mostly fine.
Other than that though it's mostly just hitting enter a bunch of times if you ever want to give it a shot again.
Because OpenBSD recommends having nosuid on everything that isn't /, /usr and /usr/local, and nodev on everything that isn't / (where /dev lives).
I just like the BSDs because they all maintain a single document that can get you from a single system host install to a supporting network installs DHCP->TFTP install.
I always go for either NetBSD "We install on anything" or OpenBSD "We are still just trying to get secure implementation of the 4.4 spec"
Unlike some other operating systems, OpenBSD encourages users to split their disk into a number of partitions, rather than just one or two large ones. Some of the reasons for doing so are:
• *Security: Some of OpenBSD's default security features rely on filesystem mount options such as nosuid, nodev, noexec or wxallowed.*
• *Stability: A user or a misbehaved program can fill a filesystem with garbage if they have write permissions for it. Your critical programs, which hopefully run on a different filesystem, do not get interrupted.*
• *fsck(8): You can mount partitions that you never or rarely need to write to as readonly most of the time, which will eliminate the need for a filesystem check after a crash or power interruption.*
[1]: https://www.openbsd.org/faq/faq4.html#Partitioningnot at all practical on a router with a underpowered cpu and little disk
apparently the developers have had a change of heart here (previously they didn't believe in providing binaries for security fixes)
Linux doesn't really offer that. Yeah it's got PACKAGES that offer web server solutions (apache, nginx, whatever else) but then I gotta maintain those. I find myself having to patch everything on my OpenBSD boxes way less if I stick to how it seems to be intended to be used - When all I've got to maintain are my own secure os installation + configuration, and my own software that I wrote myself, literally no packages, it's really cool.
Sometimes you have to think real simple.
WhatsApp also used a BSD IIRC but I imagine they’ve transitioned to Meta’s standard stack by this point.
but doesn't work against something the user is voluntarily injecting as the user is quite happy to run the offset pointer locating code
Where do I get this t-shirt?
First, it feels small enough that I understand what’s going on while still providing valuable services out of the box - a web server, load balancer/proxy, etc.
But more importantly the pieces all play together to make a unified system: the load balancer can do layer 3 by interacting with the system firewall, httpd works with the built in ACME client for TLS. All those pieces benefit from being part of the system as a whole, by having very consistent tooling and support - things are named very consistently and share flags across the system, and are backed by very high quality manpages.
Simply put it’s not perfect, nor revolutionary, but it gets a lot of things right.
I recall some heady weeks in 1998, attempting to enable IPSEC between my twin OpenBSD Apollo 425t systems. "hard and near impossible to debug from an almost-working to a fully working setup" is an understatement! I never got it to the almost-working stage!
First thing that we need to know - what is it? I had to look up on Wikipedia for information on what this is and what it's trying to solve.
So my takeaway is that not every IT person needs to know this since I've been in the field for over 20 years and worked at a wide range of tech companies (from Unicorns to academia to fortune 100 companies to FAANG or whatever the name is now)?
It's a shame when articles like this make so many assumptions about their audience. It reminds me of the RTFM days of tech that was dismissive, arrogant, and not all that helpful.
No it’s a BSD.
I absolutely agree. Such clickbait headlines are often strange. For a more macabre example, consider the headline "10 [things] you can't live without". This means that if you don't own these ten things, you will die.
I think OpenBSD will still be relevant outside of its own OS realm as long as people are still using software that comes from the project (openssh, tmux etc).
i can relate with the first part, but the second seems rather far fetched
the article is a call to get you comfortable picking/using BSD, and from my point of view it's reasonable to advertise its maturity.
For more than a decade, every single thing related to BSDs has been largely irrelevant. Every. Single. Thing.
Nobody cares about that, the only thing BSDs had was their license (vs. the GPL), and that's not entirely clear to have been good at all for the ecosystem (because, clearly, Linux has enjoyed a much greater development). Nowadays, even in embedded it's either Linux or RTOS, nothing like BSDs at all, so the GPL is clearly a non-issue.
I'm not talking about past pros, but current advantages.
FreeBSD has certainly received a lot more development hours compared to NetBSD.
It would be interesting to read a write-up one day where all the BSDs say what they grew since their initial releases.
https://old.reddit.com/r/openbsd_gaming/
Most recent post shows an older version of Minecraft running. And OpenBSD can be a perfectly usable general desktop OS with some configuration.
On the good side, the system is VERY predictable.
But my recording studio would probably bore you as I just run macOS for both graphics and sound work.
On that list, I think only the Loongson and Landisk architectures are in the not likely to ever be supported. The rest are all supported by LLVM and/or GCC with various efforts to support them in rust.
Surely a web page with utterly default style and zero layout should be a minimally cromulent experience on any device. It's just headings and paragraphs, with the occasional bullet point and indent. There's no stylesheet. There's no reference to millimetres, pixels or point sizes. Everything is defaults.
This is in stark contrast to sites that use the PRE tag and don’t wrap. Notably things like their mailing list archives.
Doesn't have a weird zoom or scrolling on the horizontal axis like some "mobile friendly" websites either.