News: 1712939830

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

OpenBSD 7.5 locks down with improved disk encryption support and syscall limitations

(2024/04/12)


The OpenBSD project's 56th release is arguably the most secure Unix-like OS to date.

OpenBSD's point releases are no less significant than any others, and as such, [1]OpenBSD 7.5 has some significant changes amid a lot of smaller ones. One of the biggies is very specific and quite niche, while the other is something that would be seen as a major improvement on more mainstream OSes, but which for this project barely merits a mention in the release notes.

The less significant of the major updates in this release is that now OpenBSD's relatively rudimentary and rather user-unfriendly installation program has a new option:

Added support in the installer to encrypt the root disk with a key disk.

OpenBSD has supported passphrase- and key-disk-based disk encryption during installation for a while, mainly as a fiddly manual process and then as a guided option (using a passphrase) since OpenBSD 7.3. Now, from 7.5, the guided installer will ask if you want to use a key disk, which in turn means, as per the release notes, the OS supports "disk encryption in unattended installations with autoinstall, both with a plaintext passphrase or a key disk." Which is handy.

Encrypting the root partition is the sort of function that consumer-facing OSes promote as a major improvement in system security. The Reg FOSS desk has worked in at least one company that mandates full-disk encryption for all staff computers, although our own personal perspective is more along the lines of [2]XKCD 538 .

[3]

OpenBSD has its own unique and complex partitioning system, as we mentioned when [4]we looked at version 7.1 . By default it creates multiple relatively small partitions, and splits the OS's files across them all. The result can be that, even though this is a small and lightweight Unix-like OS, it's quite easy to run out of disk space. This is because it applies complex sets of permissions on its different subsidiary file systems. For instance, only programs on certain partitions can be executed, so if a cracker managed to get write access to somewhere they shouldn't, the permissions on most of the mount points mean that they wouldn't be able to run a script.

[5]

[6]

OpenBSD 7.5's encryption approach creates a "softraid" virtual disk, and then encrypts everything within it. So it's more effective than it sounds. While more familiar OSes, such as Windows and most Linux distros, tend to keep all their files in one big partition, this way preserves OpenBSD's subdivided setup, while keeping the whole assemblage encrypted. Putting the option up front in the installer makes things easier for those setting up new systems.

The more significant change is the new [7]pinsyscalls() system call, which makes sure that all system calls can only be called from a specific place in memory, so a hijacked binary doesn't have easy access to the system's guts. This works alongside the existing pledge() , which places strict restrictions on which OS system calls a particular binary is allowed to access. The functionality builds upon the older [8]pinsyscall() which appeared in OpenBSD 7.3 a year ago.

[9]

For the technical details, project lead Theo de Raadt [10]posted the backstory in late 2023, with a [11]small update last January. It offers a measure of protection against [12]return-oriented programming attacks , as the [13]OpenBSD Journal explains . De Raadt also gave a talk at the [14]CanSecWest conference conference in 2023, and the [15]talk's slides [PDF] put pinsyscalls() in context as being a new layer of protection rather than a panacea.

It's controversial how much real-world protection will result from this. The snarky " [16]Is OpenBSD Secure? " site isn't impressed, and has published a [17]pinsyscall critique explaining why.

[18]PumpkinOS carves out a FOSS PalmOS-compatible runtime environment

[19]Virtually and actually, LXC 6 and Incus 6 are here – both LTS versions

[20]VMS Software prunes OpenVMS hobbyist program

[21]Canonical cracks down on crypto cons following Snap Store scam spree

There are other changes and refinements in this release, including tweaks to the pf firewall, refreshed graphics drivers imported from Linux 6.6.19, a new console font, IPv6 support over PPP, and improved performance on multicore computers.

As an experiment, we installed a copy on our testbed ThinkPad W500 machine. With the help of a handy [22]guide to dual booting , we managed to install into an existing primary partition. The installer booted successfully from an [23]existing Ventoy USB key , and while it detected the machine's Intel IWN 5000 Wi-Fi card, it warned us that it didn't include the necessary firmware and wouldn't work until we installed it. It's a [24]known issue and once installed, it proved very easy to fix. Post-install, we just ran fw_update -a . This command [25]finds and installs missing firmware and after that the interface worked fine, picking up the WLAN configuration info we entered during installation.

The one thing that didn't happen on its own was installing a bootloader. We had to [26]manually add a few lines to a GRUB2 config file to chainload OpenBSD's own bootloader. (We found various more complex ways, such as copying the OpenBSD bootloader to a Linux partition, but the method in the link above was the simplest and it worked fine.) OpenBSD is not really intended to dual-boot with anything else. If you want to experiment, we suggest dedicating a machine to the job … but it can be done.

[27]

OpenBSD 7.5 with the default FVWM and trusty Firefox: Minimal, but it works – click to enlarge

The result is as Spartan as one might expect. This OS is not really intended to be a graphical desktop. Even so, it managed to compare favorably to the other BSDs we've tried. Unlike FreeBSD, it (optionally) configures graphics support straight from the setup program. It installs the [28]Xenocara X11 server , a graphical login screen and a very basic window manager. Unlike NetBSD, it started successfully from [29]Ventoy , which is the OS-hopper's friend. We were able to install Firefox with a single command – pkg_add firefox – and get online.

There are a few installation guides out there that may help, such as this one from [30]Keith Burnett and this from [31]Martin Chang . We can only agree with the conclusion of the second of those:

OpenBSD is surprisingly usable. There's less magic in it. Which is a good thing. That means I have more control over what my system looks like and is doing.

We also like this [32]summary :

Pros: htop only fills half of your terminal, and you know exactly what each process does because you put them there. A few well-written man pages are the complete documentation of the system. The whole thing is run by a handful of shell scripts.

Cons: exactly the same text, but read with a different tone.

The original idea behind Unix was that it was small and simple enough to understand everything on your computer – what it was there for, why, and what it did. OpenBSD still is pretty close to that ideal: one writeup [33]called it "cozy" . And if you like a more complete desktop, [34]this release includes KDE Plasma 5 . ®

Editor's note: This article was revised to clarify the timeline of changes to OpenBSD's disk encryption support.

Get our [35]Tech Resources



[1] https://www.openbsd.org/75.html

[2] https://xkcd.com/538/

[3] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/oses&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2Zhmu9mNYAFNNiIQjz-FPHAAAABQ&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0

[4] https://www.theregister.com/2022/04/22/openbsd_71_released_including_apple/

[5] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/oses&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44Zhmu9mNYAFNNiIQjz-FPHAAAABQ&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[6] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/oses&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33Zhmu9mNYAFNNiIQjz-FPHAAAABQ&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0

[7] https://man.openbsd.org/pinsyscalls.2

[8] https://man.openbsd.org/OpenBSD-7.4/pinsyscall

[9] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/oses&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44Zhmu9mNYAFNNiIQjz-FPHAAAABQ&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[10] https://marc.info/?l=openbsd-tech&m=170205367232026&w=2

[11] https://marc.info/?l=openbsd-tech&m=170647326029909&w=2

[12] https://ctf101.org/binary-exploitation/return-oriented-programming/

[13] https://undeadly.org/cgi?action=article;sid=20230222064027

[14] https://www.secwest.net/

[15] https://www.openbsd.org/papers/csw2023.pdf

[16] https://isopenbsdsecu.re/about/

[17] https://isopenbsdsecu.re/mitigations/pinsyscall/

[18] https://www.theregister.com/2024/04/11/pumpkin_os_foss_palmos/

[19] https://www.theregister.com/2024/04/10/lxc_6_and_incus_6/

[20] https://www.theregister.com/2024/04/09/vsi_prunes_hobbyist_prog/

[21] https://www.theregister.com/2024/03/28/canonical_snap_store_scams/

[22] http://geodsoft.com/howto/dualboot/openbsd.htm

[23] https://www.theregister.com/2021/12/10/friday_foss_fest/

[24] https://www.mail-archive.com/bugs@openbsd.org/msg17723.html

[25] https://man.openbsd.org/OpenBSD-5.5/fw_update.1

[26] https://www.kariliq.nl/openbsd/grub2.html

[27] https://regmedia.co.uk/2024/04/12/openbsd-75.jpg

[28] https://xenocara.org/

[29] https://www.ventoy.net/en/index.html

[30] https://sohcahtoa.org.uk/openbsd.html

[31] https://clehaxze.tw/gemlog/2022/05-12-first-time-installing-openbsd-and-stuff-i-did.gmi

[32] https://news.ycombinator.com/item?id=38917023

[33] https://btxx.org/posts/OpenBSD_is_a_Cozy_Operating_System/

[34] https://www.theregister.com/2024/01/15/kde_6_kde_5_openbsd/

[35] https://whitepapers.theregister.com/



aerogems

Not to be overly pedantic, but I thought the *BSDs could legitimately call themselves Unix. It was Linux and Minix and probably a few others, that have no direct ancestry, that are the Unix-likes.

UNIX Trademark

mevets

IIRC, UNIX is a trademark of the Open Group, and in order to use the UNIX trademark, you must be certified by them via their single unix specification.

MacOS was a while ago, but I don't know if they bother maintaining it. That word isn't as powerful as it once was.

Re: UNIX Trademark

PM.

Yeah, for "kids" UNIX is this Linux-like thing .. :-/

Re: UNIX Trademark

Liam Proven

They do.

https://www.opengroup.org/openbrand/register/brand3705.htm

Anonymous Coward

OpenBSD is fantastic. It is the only OS I actually enjoy using. Feels clean and "boring" in the best of ways. Xenocara is great. Having a *clean* Xorg in base is the way to go; it simplifies package management so much.

The relatively small community of developers has done such a great job. The hardware support is often better than much larger projects. Possibly suggesting that their preference of developers vs users has some merit to it.

My only gripe with OpenBSD is power management. apm and bsdfreqd are not quite enough these days, Intel or AMD make a big difference. 5W vs 11W. Likewise it seems bizarre that the Raspberry Pi doesn't have cpu freq scaling yet, I would have assumed the developers would have more interest in that platform. They do have working wifi on the Pi, so have FreeBSD beaten in some ways but just interest kind of stopped.

ChoHag

> Possibly suggesting that their preference of developers vs users has some merit to it.

"It works on my machine" done right.

I love OpenBSD

Rich 2

I used obsd fire years to run my server and laptop and my main reasons basically match the summary at the end of the article; it’s incredibly simple. The configuration is very obvious. Stuff isn’t hidden away. The base processes can be counted on a few fingers. It just works.

Unfortunately, I’ve been using Linux for the last …something… years now instead. All those attributes I mentioned above that I love? Yea - I miss all of them

And in case you are wondering (and I’m sure you’re not), the reason I started using Linux instead ….yea …. Why did I??

Oh, and as for the unfriendly installer. I never found any part of obsd unfriendly. It’s quite annoying to see this opinion persisting

Re: I love OpenBSD

karlkarl

> Oh, and as for the unfriendly installer. I never found any part of obsd unfriendly. It’s quite annoying to see this opinion persisting

Indeed. You can pretty much hold down the enter key without looking. You can't get more user-friendly!

The incorrect opinion must stem from people with a compulsion for a GUI. Well UNIX/Linux, etc will always be a disappointing experience for them.

Re: I love OpenBSD

Liam Proven

> Indeed. You can pretty much hold down the enter key without looking. You can't get more user-friendly!

This is patently untrue.

Here, try it on my test box. It has Win10, FreeBSD, and 6 Linux distros, spread across 2 SSDs, one shared global home partition and one shared global swap partition.

You show me OpenBSD installing successfully on that, including a bootloader.

Otherwise, I call BS.

It has zero, nothing whatsoever, to do with whether it has a GUI or not.

Re: I love OpenBSD

ChoHag

> > Indeed. You can pretty much hold down the enter key without looking. You can't get more user-friendly!

> This is patently untrue.

That is more or less how I install OpenBSD, except I press it discretely rather than holding it. Sometimes I want a custom partition table or encryption or something else that diverges from the defaults. VM and tin.

OpenBSD doesn't deal with dual booting. That is an external problem.

> Here, try it on my test box.

I'm game.

Re: I love OpenBSD

karlkarl

Did you try it?

Sure, it will blow away all the existing cruft you have on that machine but OpenBSD *will be installed*. The Windows 10 installer is also "user-friendly" and will do the same thing.

Easy. ;)

Re: I love OpenBSD

ChoHag

It's extremely user friendly, it's just that keeping with unix tradition it's picky about its friends.

Personally I find the existence and integration of /usr/src the most friendly part of all.

If you want a fancier desktop setup why run Open?

Anonymous Coward

OpenBSD trades pain and performance for a small footprint install that's hard out of the box. That, like Slackware on the Linux side, makes a great jumping off point for server images and VM's. (The new virtualized and encrypted disks you mention in 7.5 look nice for this). Add just what you need, build exactly what you want and noting more. My goto for VPN and SSH services. My preference for DNS and DHCP services. Handy as a ssh/sftp/tftp server for updating all the networking crap when it gets factory reset back to obsolete firmware.

What about the projects intentions makes it seem like a great choice for a desktop operating system? "Because I can" seems to be the most oft sited reason people try to desktop it. Pure masochism seems second. There are two other BSDs to chose from as well that offer an easier desktop experience, with broader hardware support and better performance. They aren't slouches on security either, and regularly steal non-crazy commits from Open.

The author gets a pass as it's their job to do this and write about it, as it is their job to point out little snippets like the bumps handling more complex partitioning of drives. I don't extend myself the same courtesy, even though I have done the same thing playing around with new releases. If I am loading an X server on OpenBSD, I know I am screwing around and I'm man enough to admit it. I think it's great the option is there, if for no other reason than to make it easier for new user to figure out how to get around in it.

For the rest of us using OpenBSD, strongly consider playing to it's strengths and leaving the GUI out of it. SSH onto it from something you can run your client side crap on, and don't even install a browser on your OpenBSD image. It doesn't need to be your only OS. It won't whine about being your side slice. It will just run workloads quietly and reliably for long periods of time without having to be futzed with.

If a person (a) is poorly, (b) receives treatment intended to make him better,
and (c) gets better, then no power of reasoning known to medical science can
convince him that it may not have been the treatment that restored his health.
-- Sir Peter Medawar, "The Art of the Soluble"