9 ms·
What security does a default OpenBSD installation offer?
- stjo 6y ago> Pledge / unveil on userland This sounds very nice, is there anything similar on Linux? > SMT disabled Well, this is one way to deal with spectre and friends.
- lmohseni 6y agoAlso, it's not mentioned in TFA, but by default the kernel does not allow audio recording :).
- da_big_ghey 6y agoIndeed, the OpenBSD guys said early on that hyperthreading should just be disabled for security reasons. It took everyone else to catch up, but see Greg KH's comments that if users are untrusted, one should do so: https://www.youtube.com/watch?v=jI3YE3Jlgw8 https://www.youtube.com/watch?v=jI3YE3Jlgw8
- cyphar 6y ago> > Pledge / unveil on userland > This sounds very nice, is there anything similar on Linux? Seccomp is the closest thing we have to pledge, and it is used by some programs to restrict the set of operations they can do (but the most common use of seccomp profiles is containers -- pretty much all container runtimes apply a default seccomp profile to reduce kernel attack surface reachable by containers). As for unveil, you could implement it with mount namespaces (or an LSM like AppArmor -- which isn't actually that hard to set up, but unprivileged users may have to go through extra hoops) but most programs don't do that themselves. But in short, not really. Most security mechanisms in Linux are intended to be managed by administrators or system services rather than the program itself (with some exceptions, but even those exceptions end up being managed by system services in practice).
- gbrown_ 6y agoJust to add, pledge can be called repeatedly throughout the program to reduce the behaviors that are permitted unlike seccomp.
- cyphar 6y agoYou can do that with seccomp -- each filter is run along with the others and the most restrictive return value is used by seccomp. If a program in a seccomp sandbox couldn't add a new secxokp filter to itself, you wouldn't be able to run programs like OpenSSH inside containers (which you can).
- Sebb767 6y ago> Well, this is one way to deal with spectre and friends. Aren't these caused by speculative execution? How does turning off hyperthreading help there?
- ploxiln 6y agoThe kernel can pull "tricks" to mitigate speculative execution during context switches. But it can't do anything to prevent a process running on one hyperthread from using side-channel attacks against another process, or the kernel, or a secure enclave, running on the other hyperthread of the same core. That's right, if you don't have hyperthreading disabled right now, you are technically vulnerable. All the major players have decided that it's not worth the performance cost (or maybe just the feeling of loss of giving up that hyperthreading) for such a niche, difficult-to-exploit vulnerability. A popular idea is to only allow threads of the same process to run on hyperthreads of the same core (or of processes in the same "security domain"). Patches to do this for linux have been floating around for about 2 years, they might have been merged recently, I'm not sure. But the performance cost of the logic that enforces this is greater than the performance benefit of hyperthreading in most cases. IMHO either give up hyperthreading, or give up security against the "MDS" vulnerabilities. I leave it enabled for my gaming system, I think there are bigger problems if attackers have local execution on my system ;)
- Sebb767 6y agoThanks for the explanation! > IMHO either give up hyperthreading, or give up security against the "MDS" vulnerabilities. I leave it enabled for my gaming system, I think there are bigger problems if attackers have local execution on my system ;) I made a similar tradeoff for my non-critical systems. But maybe that's a reason to not pay the extra for a HT CPU for my servers :)
- throwaway888abc 6y agoI would add it's not sending telemetry/usage/typing suggestions/etc. data back to US/China company as other desktop / mobile operating systems.
- lmohseni 6y agoThe default OpenBSD ntpd config pings google, cloudflare, and quad9 by default. edit: looks like it only queries cloudflare.
- zdw 6y agoPervasive advertising surveillance is quite a bit different from ntp queries for "what time is it?" and confirming the time with HTTPS servers. Having multiple sources improves NTP and prevents a single distorted source from breaking things, and large companies have good security reasons to tell the truth about the time.
- deleted 6y ago[deleted]
- throwawayboise 6y agoAnd it's clear what servers it's querying, unlike say "pool.ntp.org"
- lmohseni 6y agoThat's interesting, and I completely agree. However, my comment was about whether the default OpenBSD install sends any data to any private US companies. NTP queries are a form of data :). Also, if it ever became profitable for some reason to give incorrect NTP results, then I doubt Google et al would continue to do so.
- owenmarshall 6y agoOpenBSD doesn’t send NTP queries to those sources - with the exception of Cloudflare’s NTP pool. It uses TLS timestamps to constrain the possible time values. This prevents spoofed NTP packets from changing the time. https://man.openbsd.org/ntpd.conf.5 https://man.openbsd.org/ntpd.conf.5 https://github.com/openbsd/src/blob/master/etc/ntpd.conf https://github.com/openbsd/src/blob/master/etc/ntpd.conf
- da_big_ghey 6y agoGood article. I would disagree with his assertion that keeping time synchronized is not a security feature; since everyone and his mother adopted TLS, it definitely is. I'd also recommend changing the title to, "What security does a default OpenBSD installation offer?" While it deviates from what the author wrote, I'm guessing English is not his first language and that is what he intended, and it makes it clearer for readers. As an aside, he mentions encrypted swap. Can any OpenBSD users comment on how that affects performance?
- lmohseni 6y agoI have FDE enabled on a laptop with an m.2 ssd, and I don't notice much (if any) slowness compared to an unencrypted install. but since the m.2 ssd's are so fast, YMMV on other media types.
- 867-5309 6y agomodern high class SSDs have a hardware encryption chip, sort of like Intel's AES-NI for CPUs, which greatly reduces the burden on the CPU. you only really notice a difference when accessing larger files and the SSD's internal buffer fills up and offloads
- tedunangst 6y agoOpenBSD doesn't use any on drive encryption features.
- chungus_khan 6y agoAnd for good reason considering some of them lie about actually encrypting the data, or are very bad about keeping it safe. https://www.tomshardware.com/news/bitlocker-encrypts-self-encrypting-ssds,40504.html https://www.tomshardware.com/news/bitlocker-encrypts-self-en...
- michaelmrose 6y agoThese rely on the vendors secret sauce and an analysis years back found these frequently horribly broken like my password is password levels of broken. Bitlocker by default on windows will happily depend on these broken implications in favor of actually secure options that are now and for years specifically accelerated by your cpu. They are also potentially worthless at protecting data in suspended laptops which for some is a machines condition 99% of the time when it is apt to be lost or stolen.
- _nickwhite 6y agoI'm old enough to remember back in 2002, Openbsd.org had a banner: "Five years without a remote hole in the default install!" Then, later that year OpenSSH had a critical, remotely exploitable vulnerability that allowed an attacker to gain remote root access. They changed the banner to: "One remote hole in the default install, in nearly 6 years!" It stayed that way almost 5 more years when in 2007 a flaw in IPv6 was discovered that resulted in a kernel-level buffer overflow, and the banner was updated to: "Only two remote holes in the default install, in a heck of a long time!" At some point, that slogan was removed, probably because of the fierce criticism and debate it sparked. Even still, OpenBSD pretty much designed the idea of "secure by default" and still to this day, probably lead all modern software OS in this ideology. I can't think of any other major software distribution where I can count exploits on a single hand after many, many years.
- hellcow 6y agoopenbsd.org still has the banner, and it still lists just 2 remote holes 13 years later.
- _nickwhite 6y agoIndeed it does, I see it now: "Only two remote holes in the default install, in a heck of a long time!" My old greybeard eyes completely missed the red text, centered right under the top banner.
- staticassertion 6y agoAre remote exploits in minimal server installs particularly common? Like for any OS? Feels like probably not very. I can think of one off the top of my head in Windows. But like, let's imagine a minimal Linux server install, not even something hardened - I feel like there probably aren't too many RCEs in there. Even fewer that are legitimately exploitable with a bit of work to harden. It's not really to diss OpenBSD so much as to say that, yes, a lack of RCE in a default install is cool, but you also have to wonder what anyone is doing with a default install, and if that's really something you should care much about.
- centimeter 6y agoDoes OpenBSD really use (A)RC4 for its PRNG? That seems... quite bad if so. Edit: They have fixed it, and it now uses ChaCha20 (but is still called "arc4random"). https://en.wikipedia.org/wiki//dev/random#OpenBSD https://en.wikipedia.org/wiki//dev/random#OpenBSD
- 2pEXgD0fZ5cF 6y agoThere was an interesting talk by Ilja van Sprundel during 34C3 back in 2017 called "Are all BSDs created equally? - A survey of BSD kernel vulnerabilities" [1] where a comparison is done between NetBSD/OpenBSD/FreeBSD. [1]: https://media.ccc.de/v/34c3-8968-are_all_bsds_created_equally https://media.ccc.de/v/34c3-8968-are_all_bsds_created_equall...
- aborsy 6y agoI have been interested in using openBSD beyond in my router. Is it usable as a daily driver?
- dbtc 6y agoYes definitely, with supported hardware. This blog was useful for me: https://www.c0ffee.net/blog/openbsd-on-a-laptop/#multimedia https://www.c0ffee.net/blog/openbsd-on-a-laptop/#multimedia and https://www.openbsd.org/faq/ https://www.openbsd.org/faq/
- amself 6y agoI tried setting it up a few times and gave up after having to swap hard drives twice for BIOS to load (?!). Maybe I will try again after reading these. Thanks! I also ran FreeBSD for some time but I couldn't get graphics to work right on my OPTIMUS laptop.
- arp242 6y agoDepends on your usage. The biggest problem for me is the lack of Widevine and inability to play DRM media. There are also some other things that aren't easily available such as Docker or Vagrant; I don't really use these things myself, but sometimes it's handy to be able to run them for various reasons from time to time (for example I've seen projects where the test suite assumes Docker availability, and replicating that outside of Docker for just one patch isn't really a good time investment: easier to just run Docker).
- fogihujy 6y agoIt's quite doable, but it does have a tendency to require more tinkering than your average Linux desktop, and it does set some specific requirements in regards to hardware. If you have some spare time and a spare laptop, I say go for it.
- fluffything 6y agoCan you do screen sharing ?
- gorgoiler 6y agoI still can’t believe I was lucky enough to not only grow up with the Internet, but also GNU and Linux and BSD existing as two very independent and thriving projects as OpenBSD and FreeBSD. Many sub-projects forks and derivations have come and gone over the years. Long may they continue. It actually brings into highlight though that despite the fecundity of OSs, we only have one Internet (unless you count v6 as separate?). In another timeline, just as GNU and BSD coexisted, perhaps there was also an Internet and alongside it a parallel and equally thriving online network... Transcom? Worldmesh? Digizone?