What every IT person needs to know about OpenBSD (2021)
nxdomain.no
nxdomain.no
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.
I don't want to re-iterate too much of it, but the gist was: "If Microsoft won't support DOS or Win16, why should the two part-time volunteers support it!?"
The OpenSSL team clearly did not have the time or budget to both maintain that many platforms and maintain the security of supported platforms.
If "some projects" or "some vendors" want to support esoteric platforms they can fork LibreSSL and add support at their own expense instead of at the expense of the larger community using SSL libraries at-scale on modern platforms for production workloads worth trillions of dollars to the economy.
I 100% agree with the BSD team's points and their approach, and whatever contrary argument you make has to also explain away Heartbleed, which was at the time the worst security vulnerability in history.
It's like arguing that: "Sure, the Wuhan Lab of Coronaviruses may have had some biosecurity lapses, but just because the world's biggest pandemic originated form there doesn't automatically mean those practices were a problem!"
(Or if you disagree with the lab-leak hypothesis, substitute unsanitary animal handling practices at the Wuhan Markets.)
Compatibility. OpenSSL is at its core a networking protocol library, and legacy versions of OpenSSL will not understand the only versions of the protocols accepted by modern systems.
It also doesn't work on Windows XP. OpenSSL does.
This is, unfortunately, still important for many users.
if (C) { do { /* THINGS */ } while (C); }
but on a puny compiler and/or CPU this seems like a fairly reasonable way to express that C is unlikely to be true, but if it happens to be we’re going to spend a while to turning it false. Whether such code belongs in a TLS implementation is a different question.(Cutting out inline assembly for rotation operations is even more obviously dependent on the presence of a modern, heavyweight compiler, as only those have—or can afford—an explicit list of idiomatic AST templates they match against your code.)
Too-clever tricks for tiny performance gains that interfere with readability are the polar opposite of what an SSL library ought to be doing.
Such libraries ought to never trust compilers because compilers are ever changing, untrusted things.
The right approach is clear readable high level code interspersed with inline assembly for critical sections such as constant-time operations.
Speaking of which: OpenSSL did that wrong too. They merged some AES NI optimisations without having the CPUs to test it on.
This lead to the one and only crash I’ve ever experienced due to a CPU upgrade!
Stop justifying what is clearly a trash fire.
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.
https://www.mimar.rs/blog/how-to-increase-openbsds-resilienc...
I noticed you're using a good quality SD card and wrote a couple times about flash wear, is there any reason you didn't opt for an mSATA SSD? It might be more resilient than SD.
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.)
However, yes, sometimes a badly timed power loss will break the filesystem in a way that requires a manual fsck.
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.
There are a few potential "gotchas" and changing your login shell (or especially root's login shell) or any other defaults in the login or other base configurations are things that you learn to to do very deliberately after getting burned a few times.
FWIW I think all the BSDs suffer from this. Not just OpenBSD.
> Patches for supported releases are also incorporated into the -stable branch, which is maintained for one year after release.
I actually think it's good that you're sort of forced to keep up, but it's something you need to be aware of in case that isn't practical for your planned use.
For example if you get too far behind you'll find that sysupgrade doesn't work anymore, because it will only upgrade from one release to the next, and if you're more than two releases behind the "next" release might not be on the mirrors anymore. In that case you'll have to go hunting for it or just do a new install of the current release and then copy/update all your local config.
That can happen with Linux too, but typically not as quickly. With OpenBSD, if you're much more than a year behind, upgrading will become increasingly problematic.
The difference I see is that OpenBSD is so well documented that one can judge wether or not any of the updates is needed. One can consider each release as a standalone environment. The change notes going forward can be monitored. Upgrades are only required for feature changes. There is no requirement to upgrade.
It's a documented system what more could one ask for.
(Yes I know some of these things have been ported, but aren't exactly as nice when "out of context".)
But by testing on OpenBSD, issues have been found that AIX and Linux would happily ignore.
"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.
They assume since it's your disk you best know how to partition it. One is free to edit the default save them to file for next time.
If one wants to manage the details of a computer system with documentation describing the implications of each decision OpenBSD is perfect.
There are plenty of other operating systems that will most do the right thing. How many operating systems do exactly what you tell it to?
Then it shall have some documentation on system requirements.
I tried to install Freebsd on a VM with UFS as a filesystem and the show ended with out of inodes when installing the ports system. This in 2020 is a bit sad.
What ports are you talking about? I'm using FreeBSD as my daily driver, never had a port core-dump due to this.
OpenBSD prohibits this except when code is run from a partition that permits it by means of a mount flag. Otherwise you get a core dump.
And all the partitions are largely an availability feature: if errant code fills up /var/log then /home is still usable.
I'm aware of that if no partitions are filled it causes an domino effect if not on its own partition. I have ZFS quotas configured so surely that mitigates the issue?
Handy to know though.
"On platform X, you must do A."
"Huh, weird, that's never affected me using (thing that only runs on platform B)."
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.
Yes, that happened. I was there. FreeBSD is great and we would have continued to use it, but as an aquisition, you can only push back on so much of the incumbent tech stack. Much of the team had experience at Yahoo and saw how hard it is for acquisitions to run in the same infrastructure if they're running a different OS, so we spent zero time asking to run FreeBSD at Facebook.
The hardware at Facebook was quite a bit different, so there was never an apples to apples comparison to say whether one OS (as tuned) was better than the other at the use case. They clearly both work, and I've got my opinions and other people have theirs, and that's fine.
[1]: https://en.wikipedia.org/wiki/Nintendo_Switch_system_softwar...
[2]: https://en.wikipedia.org/wiki/PlayStation_3_system_software
https://wiki.freebsd.org/Myths#FreeBSD_is_Just_macOS_Without...
https://developer.apple.com/library/archive/documentation/Da...
You have also had patches go from Apple straight into the FreeBSD tree with improvements they made on their side. So, yes, it certainly is not as easy a case as one would make for Sony’s forks, but the answer is certainly not a resounding “no”.
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 usually say to layman that they are different forks of unix from many years ago.
OpenBSD and Linux have a lot of the same tools to be sure but they are different enough that you have to learn them both if you are administering them.
You are also exposing your own severe ignorance.
And you are exactly the sort of person who needs to read the article.
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.
I suspect you are correct because newest and greatest typically solve a problem, and that's the focus for the devs. the more senior devs I know take an "optimistic but cautious" approach, while less experienced devs/non-devs typically just see an answer to their particular problem and want to use it, as defending the use and the few broken instances is typically easier than solving the issue without the latest and greatest. and I can get that easily
admins probably like old and trusted because boring is exciting for them; for a few of the systems I admin, it's great to have a few on debian/bsd where they've proven that I don't need to babysit these systems; they're never fully out of the equation when troubleshooting, but it comes up rarely, and if worst comes to worst, a reboot on these systems is typically so fast and non-disruptive that it's an easy decision, which often helps and then the issue never returns. sure it's not good that I had to reboot, but a down time of 10 seconds while I boot and it never comes up again is appealing.
Meanwhile qt6 is under active use and development, so I'm much more likely to find help and bug fixes, and developer interest. And it's less likely to say, stop building because cmake deprecated some ancient feature, or uses some ancient and now incompatible library.
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.
Nice things I want from a page that talk at length about obsd too but it seems I am wrong for wanting them.
Unlike my website, the page here is a static document. I see no information density issue showing a static document with generic mark-up. The page has no features at all, dense or otherwise. The page has no need for brand, it's just a document written by someone, and that person probably doesn't have a personal logo or corporate colours.
> it seems I am wrong for wanting them.
I never said that. What I said is that the browser is wrong for giving you an unsatisfactory experience with a generic web page.
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.