217 points · by dankohn1 · 8y ago · 101 comments
Red Hat built their own mitigation for Meltdown and Spectre and were the first distribution to have an updated kernel right when the embargo was lifted.
As far as I can tell, their meltdown mitigations are similar to what's in the upstream kernel now, and the Spectre mitigations relies on Intel's new MSRs (the microcode update that had since been retracted - new microcode_ctl packages remove it).
Interestingly, you can enable/disable the mitigations at runtime with Red Hat, which is useful for performance testing. I found no way to do this with the upstream kernel.
I'm not happy that Intel, Google, Red Hat and a few others have known about the bug for months and the upstream kernel devs are scrambling to build mitigations and still don't support the microcode mitigations. Google apparently patched their stuff in September, while everyone else is left out in the cold. This is a real mess. Surely there must be a better way than telling a few select companies?
The Red Hat guys in particular surely would've loved to collaborate with the upstream kernel. Must be frustrating not to be able to tell anyone.
I think Colin's take[0] was interesting and insightful there, especially in the light of him having handled a very similar issue a decade earlier:
> The way these issues were handled was a mess; frankly, I expected better of Google, I expected better of Intel, and I expected better of the Linux community. When I found that Hyper-Threading was easily exploitable, I spent five months notifying the security community and preparing everyone for my announcement of the vulnerability; but when the embargo ended at midnight UTC and FreeBSD published its advisory a few minutes later, the broader world was taken entirely by surprise.
> Contrast that with what happened this time around. Google discovered a problem and reported it to Intel, AMD, and ARM on June 1st. Did they then go around contacting all of the operating systems which would need to work on fixes for this? Not even close. FreeBSD was notified the week before Christmas, over six months after the vulnerabilities were discovered.
> […]
> To make things worse, the Linux community was notified and couldn't keep their mouths shut. Standard practice for multi-vendor advisories like this is that an embargo date is set, and nobody does anything publicly prior to that date. People don't publish advisories; they don't commit patches into their public source code repositories; and they definitely don't engage in arguments on public mailing lists about whether the patches are needed for different CPUs.
(emphasis his)
[0] http://www.daemonology.net/blog/2018-01-17-some-thoughts-on-... final section on vulnerability disclosures
Linux is a loosely organized community of developers who collaborate in public. They don't have any ubiquitous communication channels established other than mailing lists. If you attempted to establish a private security mailing list, the list of people who get to go on it is (1) hard to define (2) very large and (3) frequently changing. The affected subsystems have lots of disparate maintainers and interested parties who need to get their eyes on any patches that go into them.
It might not be ideal from a security person's perspective but from everyone else's perspective this model has been the driving factor behind the most successful collaborative project of all time.
For details on how this works, please see the kernel documentation itself: https://www.kernel.org/doc/html/latest/admin-guide/security-...
Like the linux-distros [0] list? Or just the kernel developers?
(Note that both Linus and Greg are on this list.)
[0]: http://oss-security.openwall.org/wiki/mailing-lists/distros
Bullshit. Ultimately, Linus decides what does or does not go in, assisted by the subsystem maintainers he picked. If they wanted to have closed doors meeting, they could, and would.
FreeBSD and the like have no more and no less "single organisation calling the shots", the only difference is that they're not a human clusterfuck.
> It might not be ideal from a security person's perspective but from everyone else's perspective this model has been the driving factor behind the most successful collaborative project of all time.
That just means Linux at large will ultimately get ignored for anything security-sensitive, and only specific distributions will be contacted.
(a) That Google didn't notify more operating systems about the vulnerability early.
(b) That one OS community who Google did notify early broke the embargo, leading to exploits circulating prior to the embargo date.
But these are two sides of the same coin. The more groups of people you tell about the vulnerability early, the greater the risk that someone is going to break the embargo.
For a bug like this, it seems like no matter how you go about disclosing things, somebody is going to criticize you for it. Either you didn't tell enough people and the ones you didn't tell are mad. Or you told too many people, and someone breaks the embargo and everyone is mad. Or in this case, both!
No, they are not.
> The more groups of people you tell about the vulnerability early, the greater the risk that someone is going to break the embargo.
Groups have different levels of trustability, disclosing to more trustable groups is less risky than disclosing to a single untrustable group.
Off the top of my head can not think of any big vulnerabilities found in the last couple years not discovered by Google.
They pay engineers to find these and also pay bounties. This helps everyone including Google in the industry so would definitely still call them a nice guy. Maybe even a really nice guy?
It is very difficult with vulnerabilities what you share and when. Once Spectre and Meltdown was shared we have many PoC also out. So script kiddies all set up to exploit. So it is not simple but have zero idea how you could suggest some how Google is a bad guy here?
Also Google has also shared mitigations for Spectre that looks like a better approach to the broader community versus keeping as a competitive advantage.
They even shared with Amazon a company that has banned ALL companies on their marketplace from being allowed to sell some of Googles products. Personally I am not nearly that nice.
If FreeBSD was contacted early on, would we be hearing these gripes from some NetBSD or Dragonfly BSD developer? Maybe that's actually a reason BSD was contracted late, maybe they expected interested scrutiny from the other BSD projects from any kernel patches. Linux certainly ended up exhibiting that behavior, maybe they were worried about it there too but Linux's size meant a different call was made?
I understand why BSD devs are upset, but the complaining comes across as exactly what it is, whining they didn't get treated like the big boys. It sucks. Linux used to be right there with you, and neither got any special treatment, but times have changed.
So no, there's no better way. You tell every organization that's capable of patching their kernels privately and keeping the vulnerability under wraps - something that mainline Linux can't or won't do, for better or worse. This is like complaining that you found something in the last place you looked - the linux mainline were the last people who heard about it before it went public because as soon as the linux mainline heard about it, it became public.
Everyone here acted responsibly except AMD, who broke embargo so they could force a response from Intel at CES and sell more processors.
the worst case would have been someone in the latter set leaking the info, which is just what we have now. So it could have been potentially better. There was really no reason to drop a bomb like this.
Issues on a similar scale have been properly handled in the past: http://www.daemonology.net/blog/2018-01-17-some-thoughts-on-...
> The way these issues were handled was a mess; frankly, I expected better of Google, I expected better of Intel, and I expected better of the Linux community. When I found that Hyper-Threading was easily exploitable, I spent five months notifying the security community and preparing everyone for my announcement of the vulnerability; but when the embargo ended at midnight UTC and FreeBSD published its advisory a few minutes later, the broader world was taken entirely by surprise. Nobody knew what was coming aside from the people who needed to know; and the people who needed to know had months of warning.
> Contrast that with what happened this time around. Google discovered a problem and reported it to Intel, AMD, and ARM on June 1st. Did they then go around contacting all of the operating systems which would need to work on fixes for this? Not even close. FreeBSD was notified the week before Christmas, over six months after the vulnerabilities were discovered.
I haven't checked, but I'd be surprised. Basically all the backports except 4.14's are quite different from upstream's.
Download the latest archive from Intel at https://downloadcenter.intel.com/download/27431/Linux-Proces... (currently microcode-20180108.tgz) then:
tar -xzf microcode-20180108.tgz
sudo apt install iucode-tool # or whatever your package manager is
iucode-tool -tb -lS ./intel-ucode/*
This will crosscheck the microcode binaries with the signature of your CPU and output something like: 001: sig 0x00010676, pf mask 0x01, 2010-09-29, rev 0x060f, size 4096
002: sig 0x00010676, pf mask 0x04, 2010-09-29, rev 0x060f, size 4096
003: sig 0x00010676, pf mask 0x10, 2010-09-29, rev 0x060f, size 4096
004: sig 0x00010676, pf mask 0x40, 2010-09-29, rev 0x060f, size 4096
005: sig 0x00010676, pf mask 0x80, 2010-09-29, rev 0x060f, size 4096
As you can see Intel hasn't released any updates for my old CPU (latest is from 2010)[1] - http://www.zdnet.com/article/meltdown-spectre-intel-says-new...
Although you can also install microcode with the iucode-tool, the example above only checks the downloaded archive.
First the CPU loads an on die ROM of the microcode it was released with on it's own. Second the BIOS/UEFI may load an update into the CPU before boot if it has a newer one. Third linux and some other OS will load any newer microcode into the CPU at the bootloader stage before the kernel loads.
This is also commonly the case for other modern hardware, not just CPUs... although I expect it doesn't need to happen before the kernel loads and is probably bundled into their respective drivers.
I wonder if the "cabal" you mentioned actually broke those laws?
When the longer time for fixes is done, post an announcement in private pre-disclosure lists.
For a very complicated change, give a few days of private testing and provide patches and details to groups that must apply the patches (oss-sec distro list, etc.)
For a simple one with existing backports, notify that <DATE> is publication date for a type of vulnerability to <PROGRAM>.
Wait 2-4 weeks to publish a working exploit.
Don't notify bodies who don't have their own custom code that must be fixed, but happen to pay you enough money.
The latter is actually what happened in this case and it's immensely frustrating.
1. make sure all tier 1 companies involved are equally patched and on the same page as far as mitigations go before EOY, then involve tier 2 companies (see news on "the impromptu war room") a full month before the embargo deadline
2. not commit or patch anything or fly commented diffs around in the freaking public LKML; git branches to be tested and secondary mailing lists can be private if only for a brief period of time
That's definitely not what happened, and probably the dirty details have not surfaced yet. I can't wait for this to be reasonably over so we can start to read post mortem on the whole process.
[1] https://datacentersupport.lenovo.com/de/de/products/storage/...
Should I immediately update my BIOS (would this also patch my CPU's firmware?) or just wait for mitigations arriving with OS updates?
The current recommendation is "no", since some of the microcode updates are known to cause stability problems. It's better to wait for Intel to fix that first, then make sure your BIOS update has a microcode version without the stability problems, then update. Yes, it's a mess.
> or just wait for mitigations arriving with OS updates?
Even after you update the microcode, you still need a OS update to enable the microcode mitigations, so you have to wait for a OS update anyway.
Note that the microcode update does not have to be delivered through a BIOS update. Linux can also update the microcode during early boot:
grep . /sys/devices/system/cpu/vulnerabilities/*
is there an alternate command for ubuntu?
Here is one of the commands recommended in that thread:
grep -q "cpu_insecure\|cpu_meltdown\|kaiser" /proc/cpuinfo && echo "patched :)" \ || echo "unpatched :("
https://lwn.net/op/FAQ.lwn#slinks
Where is it appropriate to post a subscriber link?
Almost anywhere. Private mail, messages to project mailing lists, and blog entries are all appropriate. As long as people do not use subscriber links as a way to defeat our attempts to gain subscribers, we are happy to see them shared.
> As always, [lwn.net covers the technical details](https://lwn.net/Articles/744287/) about the latest state of the kernel patches to resolve the Spectre issues, so please go read that to find out that type of information.
The non-subscriber link in the blog entry results in a paywall. I think LWN would prefer that Greg used a subscriber link in this case. You may be being downvoted because people think you're trying to post a paywall workaround, but I agree that this would have been an appropriate place to use a subscriber link.
https://lwn.net/SubscriberLink/744287/ec63c9aa1fe236c7/
Please get your company to subscribe to LWN. It's an amazing resource and needs your support.
LWN has tons of great content and deserves any support they can get.
But I strongly suggest that in this case, there shouldn't be a paywall. The current state of Meltdown/Spectre fixes is of high public interest. And people who are normally not into kernel development should be able to read this information without having to pay (or find workarounds).