News for hackers. Stuff that matters.
Re:OpenBSD disables Intel's hyperthreading due to security c... by keldaris on Tuesday June 19, 2018 @05:58PM (#17350616)
So... they "strongly suspect" (but don't know and haven't shown) there may be a Spectre-class bug enabled by current HT implementations and improving their scheduler is hard, so they'll pre-emptively disable HT outright on Intel CPUs now and others in the near future?

I'm not an OpenBSD user (and glad for it, if this is anything to go by), but I'm curious - is this really how they operate, or does this decision stand out?

Re:OpenBSD disables Intel's hyperthreading due to security c... by 2trill2spill on Tuesday June 19, 2018 @06:16PM (#17350723)
> I'm not an OpenBSD user (and glad for it, if this is anything to go by), but I'm curious - is this really how they operate, or does this decision stand out?

I'm not a OpenBSD user either, I use FreeBSD whenever possible. However from listening to OpenBSD devs, via blogs, conferences, HN, etc, it seems that OpenBSD is an operating system built mainly for OpenBSD developers, their goals support this[1]. OpenBSD being useful for non OpenBSD developers is more of a secondary goal compared to how FreeBSD or Linux or any other OS handles it. Also OpenBSD is much more of a research operating system then other large successful OS(Linux, Windows, MacOS, FreeBSD, etc). Meaning OpenBSD cares way more about developing features and novel security mitigations then trying to maintain backwards compatibility like other operating systems do.

> So... they "strongly suspect" (but don't know and haven't shown) there may be a Spectre-class bug enabled by current HT implementations and improving their scheduler is hard, so they'll pre-emptively disable HT outright on Intel CPUs now and others in the near future?

The OpenBSD devs strongly suspected another Intel hardware bug a week or two ago, implemented a mitigation and deployed it. Turns out they were right[2].

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

[2]: https://www.bleepingcomputer.com/news/security/new-lazy-fp-s...

Re:OpenBSD disables Intel's hyperthreading due to security c... by bigato on Wednesday June 20, 2018 @07:07AM (#17354216)
> Also OpenBSD is much more of a research operating system then other large successful OS(Linux, Windows, MacOS, FreeBSD, etc). Meaning OpenBSD cares way more about developing features and novel security mitigations then trying to maintain backwards compatibility like other operating systems do.

This is not the feeling I get from OpenBSD at all. They don't act like research. They aren't keen on implementing new features just for the sake of it, or just to try it out. A better description would be that they put correctness, security and maintainability first, and simplicity often comes as a nice side effect. Deprecating old, unused features is just a consequence of striving to decrease complexity by trimming your code base. OpenBSD is one of the few OS where the number of lines of code is not skyrocketing to unmanageable numbers.

Re:OpenBSD disables Intel's hyperthreading due to security c... by da_chicken on Tuesday June 19, 2018 @10:02PM (#17351933)
> it seems that OpenBSD is an operating system built mainly for OpenBSD developers

Honestly, I would say that this is true of many open source projects. It's one of the reasons that open source development tools are so good on Linux, but end user applications fall so far behind. It's also why documentation and usability tend to be much worse. When your system is based on volunteering, the work that gets done tends to be the stuff that interests the workers.

Re:OpenBSD disables Intel's hyperthreading due to security c... by dvfjsdhgfv on Wednesday June 20, 2018 @06:36AM (#17354051)
> it seems that OpenBSD is an operating system built mainly for OpenBSD developers

I don't see it that way at all. Whenever I have to work on a project where security is top concern, I always look at OpenBSD as an option. In the Linux world, the equivalent would be the Openwall GNU/*/Linux project. Not something for an average user, but to say it's used by its devs mainly is off by an order of magnitude.

Re:OpenBSD disables Intel's hyperthreading due to security c... by forapurpose on Tuesday June 19, 2018 @11:54PM (#17352462)
> The OpenBSD devs strongly suspected another Intel hardware bug a week or two ago, implemented a mitigation and deployed it. Turns out they were right[

In fairness, my impression from the video of Theo's presentation was that they were tipped off by someone under embargo.

Re:OpenBSD disables Intel's hyperthreading due to security c... by flurrything on Wednesday June 20, 2018 @05:20AM (#17353721)
> is this really how they operate,

OpenBSD is a research operating system and security is a core component of their research. Pro-actively mitigating security risks before exploits appear is one way to improve security that has worked in the past: vulnerabilities having been fixed before they appeared.

Because they give reasonable deadlines for companies to fix security bugs (~90 days), they are kept out of the loop by hardware vendors like Intel who requested 1 year to fix meltdown.

Being in the dark, if you see some suspicious behavior, either you protect yourself from it, or you might wake up the next day and Intel will have released a new "We are sorry" post and your users would be screwed.

So this is pretty much how they operate, and if an OS is as security conscious as OpenBSD, there isn't really a different way to operate.

Note that disabling hyper threading to mitigate CPU flaws isn't anything new either: this had to be done for AMD's Ryzen because of hardware bugs last year anyways - https://www.extremetech.com/computing/254750-amd-replaces-ry...

Re:OpenBSD disables Intel's hyperthreading due to security c... by keldaris on Wednesday June 20, 2018 @07:09AM (#17354233)
> if an OS is as security conscious as OpenBSD, there isn't really a different way to operate

That's really what I was getting at with my question. There's no such thing as absolute security, it is a set of tradeoffs between usability, performance and specific security guarantees. Is there a point where the OpenBSD developers would say "okay, this is a (potential or confirmed) security bug, but the mitigation is just too costly in this case"?

In the post-Spectre world, it's not completely inconceivable to contemplate the possibility that, in order to retain the security guarantees most people thought they had, one might have to give up a substantial subset of the benefits of speculative execution in out of order processors. For some workloads that might mean up to two orders of magnitude in performance. I know roughly where the common operating systems would draw the line and I certainly know where I would, for my own usecases. I'm just curious about how OpenBSD works in this regard.

Re:OpenBSD disables Intel's hyperthreading due to security c... by temprature on Wednesday June 20, 2018 @09:16AM (#17355039)
It's a sysctl that can be toggled. If you want hyperthreading and don't care about the security concerns, you can turn it back on. The commit message specifically mentions that this was implemented because many modern machines don't allow hyperthreading to be disabled in the BIOS.

You'll find out in a couple of months why they did this. I hope you'll remember the comments you've written when that happens, because you might learn something about what OpenBSD means when they say they "strongly suspect" something.

Re:OpenBSD disables Intel's hyperthreading due to security c... by keldaris on Wednesday June 20, 2018 @09:59AM (#17355364)
As I already implied in the parent post, I've no doubt we'll see more Spectre-like issues and I don't find it hard to believe that there's yet another embargo going on, that something's leaked again and that the OpenBSD people have picked up on it. I'm just curious about how many tradeoffs in performance and usability OpenBSD would be willing to make (in the form of default settings, I'm aware this one can be toggled) in the pursuit of security and how they do the cost/benefit analysis, because their process seems vastly different from that of the main OS vendors.

On the latter point, I did take "strongly suspect" at face value rather than code for "we know for sure, just can't disclose it all yet" because I'm not familiar with the development culture of OpenBSD.

Re:OpenBSD disables Intel's hyperthreading due to security c... by ams6110 on Wednesday June 20, 2018 @10:22AM (#17355635)
Though it doesn't answer your question directly, the project goals are here: https://www.openbsd.org/goals.html. Security is important, but not the only goal. Notice that the word "performance" does not appear on this page.

If you want performance above all else, OpenBSD is not for you.

Re:OpenBSD disables Intel's hyperthreading due to security c... by temprature on Wednesday June 20, 2018 @10:09AM (#17355493)
Nice backpedaling.
Re:OpenBSD disables Intel's hyperthreading due to security c... by keldaris on Wednesday June 20, 2018 @10:19AM (#17355603)
There's no backpedaling, I still think their approach is crazy for any practical usecase I care about. Beyond that, I simply expressed curiosity to learn more about the extent of the tradeoffs they're willing to make.
Re:OpenBSD disables Intel's hyperthreading due to security c... by bigato on Wednesday June 20, 2018 @11:01AM (#17356043)
They don't set defaults for the average use case when security is involved. This is the difference between:

"Secure by default", turn knobs if you need more speed

"Fast by default", turn knobs if you need more security

Not that the knobs will be always available for each design decision, but sometimes they are there and you can turn them at your own risk. It probably would be wise to understand the consequences. Some people will prefer the peace of mind of knowing that safe defaults are in place if they don't change anything. Those will probably align with OpenBSD here. Some people believe that security is something you bolt on afterwards. Those definitely won't like OpenBSD design decisions.

Re:OpenBSD disables Intel's hyperthreading due to security c... by keldaris on Wednesday June 20, 2018 @11:44AM (#17356431)
> They don't set defaults for the average use case when security is involved.

They certainly set the defaults for some usecase, it just happens to be more security-biased than most. They don't ship an OS for an airgapped toaster, so it can't ever literally be "secure by default", it's just a compromise on the tradeoff scale that's more security-oriented than most. It still needs to be usable (for some set of people) and it still has to achieve some baseline level of performance to be usable - I was trying to get some clarity on the latter.

Re:OpenBSD disables Intel's hyperthreading due to security c... by bigato on Wednesday June 20, 2018 @04:32PM (#17359483)
You seem to imply that security will always result in less speed or less usability, and that is not always the case. The thing with OpenBSD is that security will always come first between the three values when they clash, but they don't always clash. And yes, it is the most secure OS out there if you are to judge by the statistics over its history. I'd say that only two remote holes in so many years pretty much grants them the "secure by default" label. Maybe looking from outside it seems like security is all they think about, but my impression is that it is more about correctness and simplicity, and that security comes as a consequence. As an example of simplicity, I am not personally aware of any install that is so simple as theirs. Except maybe ubuntu's, but then with ubuntu you end up with a mess of interdependent packages and it will be a hell to uninstall shit you don't need.
Re:OpenBSD disables Intel's hyperthreading due to security c... by keldaris on Thursday June 21, 2018 @06:38AM (#17363742)
> You seem to imply that security will always result in less speed or less usability, and that is not always the case.

Certainly not always, but often enough and more so than usual with Spectre and Meltdown.

> As an example of simplicity, I am not personally aware of any install that is so simple as theirs. Except maybe ubuntu's, but then with ubuntu you end up with a mess of interdependent packages and it will be a hell to uninstall shit you don't need.

That's an interesting point. How does it compare in terms of simplicity to the other BSDs (FreeBSD and Dragonfly) or something like Arch Linux?

Re:OpenBSD disables Intel's hyperthreading due to security c... by bigato on Thursday June 21, 2018 @08:56AM (#17364626)
> That's an interesting point. How does it compare in terms of simplicity to the other BSDs (FreeBSD and Dragonfly) or something like Arch Linux?

I'm not familiar with FreeBSD and DragonFly, but I have used NetBSD in the past and a bit of Arch Linux. The system management is way more consistent in OpenBSD, things generally work and are more reliable. The package management system is a pleasure to work with, and when you want to remove unused packages or dependencies of previously installed packages, it's simple and consistent. It actually works. When you are configuring something, most of the time there is one single way to do it, and it's well documented. And the simplicity can't really be compared to Arch Linux. Fire up a vm and install OpenBSD to it, just for the experience. It's mostly just accepting the defaults, extremely simple.

Re:OpenBSD disables Intel's hyperthreading due to security c... by keldaris on Thursday June 21, 2018 @10:15AM (#17365303)
Fair enough, thanks. I'll try it out just to see what it's like.
Re:OpenBSD disables Intel's hyperthreading due to security c... by chasil on Wednesday June 20, 2018 @12:52PM (#17357075)
There is a thread at lobste.rs that demonstrates the setting, immediately idling half of the CPUs presented in top:

https://lobste.rs/s/ifr52b/openbsd_disables_intel_s_hyperthr...

Re:OpenBSD disables Intel's hyperthreading due to security c... by orf on Wednesday June 20, 2018 @06:20AM (#17353993)
> Because they give reasonable deadlines for companies to fix security bugs (~90 days), they are kept out of the loop by hardware vendors like Intel who requested 1 year to fix meltdown.

Is 90 days really a reasonable timeframe to fix something like meltdown? I agree with your whole comment in general, but hardware/microcode issues at Intel's scale are a different beast than some buffer overflow.

Re:OpenBSD disables Intel's hyperthreading due to security c... by gargravarr on Wednesday June 20, 2018 @06:42AM (#17354077)
Not to forget, Intel have said this collection of exploits cannot be fixed in microcode, only mitigated - it's so fundamental to the CPU hardware that it requires redesigning the chip to fix properly. The mitigation has led to serious performance hits and further problems down the line. And the permanent fix requires eventually replacing the CPU.

As has been previously noted, Meltdown, Spectre and related exploits came about because nobody ever thought it would be possible to access the cache from other processes. 1 year is probably quite reasonable for Intel to redesign the architecture (in fact, is probably going to stretch to 2 years or more), but people need security fixes now. In this case, it looks like OpenBSD are taking the right approach.

Re:OpenBSD disables Intel's hyperthreading due to security c... by temprature on Wednesday June 20, 2018 @09:26AM (#17355102)
OpenBSD and DragonFly had their meltdown mitigations done in a couple of weeks from when it was publicly disclosed. If it's good enough for projects developed by handfuls of volunteers, it's good enough for the multi-hundred billion dollar megacorps.
Re:OpenBSD disables Intel's hyperthreading due to security c... by orf on Wednesday June 20, 2018 @09:35AM (#17355168)
So you're saying if a small software operation can put in place mitigations in X time then a absolutely massive hardware operation with hundreds of product lines consisting of some of the most advanced, ridiculously complex, slow to develop chips in the world can push a fix to many billions of devices in X time as well, whilst ensuring backwards compatibility and reducing the performance impact across the mind mindbogglingly large number of different workloads that their chips are used for.

Makes sense. 90 days is more than enough.

Re:OpenBSD disables Intel's hyperthreading due to security c... by temprature on Wednesday June 20, 2018 @09:57AM (#17355344)
Implementing KPTI didn't involve any of what you just said.
Re:OpenBSD disables Intel's hyperthreading due to security c... by orf on Wednesday June 20, 2018 @10:03AM (#17355403)
Exactly. So how can you compare the work that's required from Intel to patch the flaw in new designs + mitigate it with microcode vs the work that's required from 'projects developed by handfuls of volunteers'?
Re:OpenBSD disables Intel's hyperthreading due to security c... by cat199 on Tuesday June 19, 2018 @08:29PM (#17351429)
> I'm not an OpenBSD user (and glad for it, if this is anything to go by),

.. yet most likely if interacting with unix systems rely on OpenSSH.

why would relying on a feature from a vendor with known processor security issues, including undisclosed hidden application processors, for a feature which has marginal performance improvement and in some cases degredation be a preferable stance?

at best ambivalence towards this decision would be the position to take, esp. given the very recent 'oh hey fpu registers are also a problem' "discovery" which they were entirely correct about..

Re:OpenBSD disables Intel's hyperthreading due to security c... by zokier on Tuesday June 19, 2018 @06:02PM (#17350641)
Yeah, they are fairly risk-averse and not really performance oriented, so this decision feels pretty much in line with their practice.
Re:OpenBSD disables Intel's hyperthreading due to security c... by forapurpose on Tuesday June 19, 2018 @11:58PM (#17352479)
> they "strongly suspect" (but don't know and haven't shown)

Some security professionals seem to insist on having a proven exploit before they act. Doesn't that seem like poor decision-making? Their job is to provide security, not to secure proven exploits - the latter is a means to an end. If there are threats from unknown exploits, and there certainly are, then it seems that they need techniques to address unknown exploits. One of those techniques is expert analysis of potential threats.

Re:OpenBSD disables Intel's hyperthreading due to security c... by __jal on Tuesday June 19, 2018 @06:19PM (#17350740)
You may well not be in the target market (if your comment is anything to go by) but yes, their entire appeal rests on being very conservative with security decisions.
Re:OpenBSD disables Intel's hyperthreading due to security c... by flukus on Tuesday June 19, 2018 @08:19PM (#17351399)
Maybe they've got a heads up that there are more spectre like bugs incoming but not enough information to actually mitigate them.

CPU bugs seem to be a rich vein to mine at the moment.

Re:OpenBSD disables Intel's hyperthreading due to security c... by _chris_ on Wednesday June 20, 2018 @11:37AM (#17356368)
> So... they "strongly suspect" (but don't know and haven't shown) there may be a Spectre-class bug enabled by current HT implementations

Spectre is about a) leaving side-effects of misspeculation in shared resources, and b) bandwidth contention (between a misspeculated instruction stream and an attacker) to shared resources.

It is trivially obvious that HT exacerbates Spectre-class bugs, as the entire raison d'être to HT is to share pipeline resources. How quickly information can be leaked can be up for debate, but it's definitely non-zero.

Re:OpenBSD disables Intel's hyperthreading due to security c... by ben_bai on Wednesday June 20, 2018 @02:35PM (#17358290)
Re:OpenBSD disables Intel's hyperthreading due to security c... by _chris_ on Wednesday June 20, 2018 @03:08PM (#17358657)
Thanks for the link! I should've been more precise: the question in my mind is how many kbits/second of arbitrary target memory can be leaked. That's what made Meltdown/Spectre so scary was that the entire kernel memory could be dumped on the order of hours.
Re:OpenBSD disables Intel's hyperthreading due to security c... by tinus_hn on Wednesday June 20, 2018 @04:30AM (#17353544)
I would expect them to choose security over performance, that is how they operate. Microsoft would sweep this under the carpet, that’s what they do.
Re:OpenBSD disables Intel's hyperthreading due to security c... by YouAreGreat on Wednesday June 20, 2018 @05:39AM (#17353817)
> disable HT outright

That would describe it if they...disabled it outright.

But they made HT user configurable, just like any other performance tuning knob.