Some thoughts on Spectre and Meltdown
daemonology.net
daemonology.net
- Dan Page published [1] in 2002, describing an attack on DES exploiting cache timings. In 2003, he published [2] describing countermeasures to this class of attacks.
- Concurrently, a Japanese team also attacked DES (and MISTY1) with cache timing [3, 4].
- Dan Bernstein published the first version of his AES cache timing attack in late 2004 [5].
[1] https://eprint.iacr.org/2002/169
[2] https://doi.org/10.1016/S1363-4127(03)00104-3
[3] https://link.springer.com/chapter/10.1007/978-3-540-45238-6_...
[4] https://web.archive.org/web/20060906064630/http://web.engr.o...
Colin, I think this is a good perspective on Spectre and Meltdown, but it feels like the entire opening paragraph was an unnecessary attempt at a "me too" that implies you're the modern father of these sorts of attacks when that isn't really the case.
I understand you're establishing credibility and expertise (and you have both), but it's disingenuous to begin with, The story of these attacks starts in late 2004, and then go on to describe your own work. I think the rest of your post has its own utility without writing a narrative of these attacks that inserts you at the beginning of them.
I think people in the field recognize my credibility and expertise here, and for them that paragraph is superfluous; but I was aiming this blog post at a wider audience (hence the effort spent on non-technical analogies to help them understand the issues) so I thought it was important to explain my background to people who had never heard of side channel attacks before.
I like to think of it this way: readers from a general audience have a certain mental budget for understanding that they bring to an article like this. Once they exhaust that budget, you've lost them. So it helps to take special care to spend it on your key points.
It also, if I can be frank, makes you look hungry for credit, which you'll get more of if you play it cool.
If I ever write a blog post about scrypt and all the work which has come after it, maybe I'll skip the lengthy analysis of how Tarsnap customers inspired me to investigate the topic of password-based key derivation. :-)
But to be honest, whether something was published 14 or 17 or 36 years ago... is kind of interesting, but only mildly so.
How about this question: was Intel aware of these publications?
If they were, then... what happened?
Or maybe they were not aware, or maybe someone was, but failed to communicate it to the right people, or maybe it was assigned JIRA x2399827348 and forgotten.
Wish we knew what happened.
So... interesting.
Do they just leave this kind of stuff open so that NSA can use it for a while. Maybe so, but then, why are those things published in journals? Weird.
edit: apparently I just restated the latter part of your post, nevermind :)
I think the same kind of pondering about organizational awareness applies there.
I'm not saying that. There are definitely earlier attacks which exploit microarchitectural features (including caches).
What I am saying is that as far as I'm aware I'm the first person to demonstrate an attack consisting of
1. Information being leaked from a process into the microarchitectural state of the CPU, followed by
2. That information being retrieved by another process.
This is the model which the vast majority of attacks over the past decade have followed, and it's the model which Spectre/Meltdown make use of.
(Feel free to suggest other wording too -- as I said, it's getting late here and my word-putting-together skills are currently subpar.)
Sibert, Porras, Lindell, 1995: https://pdfs.semanticscholar.org/2209/42809262c17b6631c0f653...
https://lobste.rs/s/tj55ox/counterpoint_intel_weaknesses_kno...
I didn't respond to the later nonsense dismissals on HN and elsewhere about the Intel CPU Security submission since I had surgery shortly after that on an impacted tooth. Didn't want to be online all drugged up talking about these things. ;) Suffice it to say, high-assurance security had already found piles of risk areas for both penetration and side channels in Intel CPU's with some attempts at mitigation (including avoid Intel CPU's) by the mid-1990's. They encouraged Intel, purchasers, and security community to deal with it as part of routine work in improving security.
As usual, the mainstream security community just ignored everything they said when they bumped into each other. It's not like high-security folks stopped trying to tell them about prior successes and problems:
http://www.cse.psu.edu/~trj1/papers/ieee-sp-vaxvmm.pdf
Then, a bright researcher independently discovered the side channels in caches later. They started reacting to that claim. They found some similar issues in other stuff looking narrowly. Now, we have another clever attack that started with a shared resource as would've been identified in the 1992 methodology that got stretched in really creative ways. It was still same root cause they ignored or justified for things like lowest price/performance versus alternatives doing it securely. Or just physical separation of different security domains which highest-security setups stuck with grudgingly.
My prediction in one of the Lobsters comments was that piles of comments would happen about this that didn't involve actually solving it (social gratification), more people would similarly write articles boasting their understanding to generate extra rep since talking problems in is rewarded in mainstream INFOSEC more than preventing/solving them, a few mitigations would show up that were narrowly-focused on just this new kind of problem (like happened with caches), they'd still ignore prior work in high-assurance like Kemmerer or Wray's analyses that found similar problems 20+ years before analyzing whole system, they'd mostly ignore the new work on information-flow analysis (some in link below), and we'd at best get some time until the next problem that could've been prevented by 1990's or recent methods since that's how mainstream security industry and culture works.
They're right on track since that's about all I saw while in recovery for a week. Endless articles using the buzzwords to their advantage plus people who don't know we could've beaten this in the 1990's because security professionals in industry suppress that knowledge for some reason. That needs to stop. At least they're rediscovering 60's-90's knowledge at an accelerated rate now.
Work on Information Flow Security in Hardware https://pastebin.com/ajqxDJ3J
My rebuttal would be that if these people had discovered cache timing attacks (and not covert channel issues that weren't directly relevant to the x86 server threat model, but are six-degrees-of-Kevin-Bacon away from cache timing), they would have discovered cache timing attacks. It's a little like those people who keep saying that if we only had length-delimited strings instead of ASCIIZ, we'd have no memory corruption.
There you go misrepresenting and slandering folks again. What I've said since I joined HN is that a group of people in military, private companies, and academia did the following: invented INFOSEC, did assessments/pentests, and tried to build clean-slate systems that were secure; regularly published that stuff in security publications and/or conferences [1][2]; built products with those methods [3][4][5]; put it in computer security texts to teach next generation [6]; led others to do the same [7][8][9]. This large group of people doing tens of millions of dollars of research, development, education, and outreach over 40-50 year period was anything but a "mysterious group." They were a group you and a lot of other people were ignoring, dismissing, mischaracterizing, and so on. That's an entirely, different thing that says more about you and others that ignored them than the people working hard to secure our systems publishing how to do it for everyone's benefit for decades on end.
I find it interesting that many in INFOSEC ignore or trash talk their pioneers so much. These people invented the field, made the landmark contributions, and addressed many fundamental problems from early 60's to early 90's. Mainstream INFOSEC and hacker culture seems to start giving credit from about 90's on for just specific kinds of attack and defense publications in specific places. A few, rare exceptions exist but it's the general rule. That's like aeronautical engineers not recognizing Wright Brothers, computer scientists ignoring Turing, electrical engineers ignoring work in boolean logic, mathematicians ignoring algebra/calculus, and so on. While ignoring that, they claim to be concerned about the same things wanting solutions to those problems. Then, when pioneers' solutions are shown to them, they keep insisting there were no pioneers, no solutions, or claim they were ineffective without reading their work. Then, they give credit to some like themselves for re-solving a tiny part of the same problems. It's a disgraceful thing to do with no rational or moral justification, esp as computer security suffers for it. So, I'll continue calling it out for as long as I see any of you do it. "Mysterious group..." Perfect example...
"My rebuttal would be that if these people had discovered cache timing attacks (and not covert channel issues that weren't directly relevant to the x86 server threat model, but are six-degrees-of-Kevin-Bacon away from cache timing), they would have discovered cache timing attacks. "
My argument is security assessment of a major project contained a covert channel analysis, that they reported [10] the cache leaked secrets via a timing channel, that they kept finding more shared resources throughout hardware, and those needed to be mitigated. The predecessors I mentioned above had invented covert-channel, analysis techniques to spot leaks. They used them. Previous work found them in software and hardware, but not CPU's. To make it extra clear, the work I cited found (adding emphasis) a "timing channel" using the "CPU cache" that could "leak secrets" across security boundaries. Later in 2005 or so, Colin notices a "timing channel" in the "CPU cache" that can "leak secrets" across security boundaries. That's the same thing. Timing channels via CPU cache. Even models the same way in a security lattice.
Starting in 1992, it was published, discussed by members of the field, put in a patent by one, and that noted "cache-related" channels as a general problem to always look for. The field then knew that caches leaked secrets unless they were designed not to. We assume that about all of them per TCSEC rules until standard, mandatory analysis shows they don't have the weakness. Intel contains a CPU cache that's not designed for security, has code using secrets, and might run hostile code. Intel's cache therefore can or does leak secrets to hostile code. The end.
They didn't stop there. Another group in security field analyzed Intel CPU's [11] in mid-1990's. It identified numerous risk areas for both penetration and covert channels. It includes a whole section, "Cache and TLB Timing Channels," that warns of their existence referencing Wray's 1991 work. Throughout the paper, it argued the x86 CPU's had numerous security weaknesses with some obvious attacks and more coming. With all that said, the status quo was to not use x86 for secure systems unless absolutely forced to by the market because they were insecure. Those that did have to build on x86 attempted timing channel mitigations but they didn't work. It has to be fixed at the root cause. So the very work you dismissed here on HN had the x86 side channels in caches you just asked me for. I wonder if you even read it.
While folks like you ignored that research, those paying attention freaked the hell out. Caches are everywhere. Turning them off made performance horrible. After software mitigations failed, the solution was fall-back to separate CPU's for trusted and untrusted respectively. Many in military stayed with fully-separate hardware. After it became popular again in 2000's, partitioning and masking caches were designed by academics hoping to stop the leaks. Big vendors didn't use them. Mainstream security sector ignored them so no crowd-sourcing was going to happen. Now, we have The Big One hitting that starts with cache problems warned about in general by 1992 with x86-specific warnings by 1995. And well-known members of the security community of 2018 are still pretending that work didn't happen. Fortunately, there's CompSci folks that stay building on the prior work you thought didn't exist with recent attempts at cache protection having a lot better penalties than it did in the 1990's. Maybe someone will build it into a RISC-V or something later if we're lucky.
In the meantime, you might want to study the prior methods that seemed to find a lot of problems and solutions you later talked about or were looking for. You can bet those lines of research have found and solved even more problems than that. It's how I keep citing old work when people want solutions to "current" problems. I'm willing to learn about problems and solutions from anyone in any style of INFOSEC if it will protect our systems. Try reading pioneers' work instead of dismissing or smearing it sometime. Who knows: you might learn how to solve another root problem with some clever approach, theirs or yours building on it, that I'll be citing in the future. I hope so since we can use all the eyes we can get.
[1] http://seclab.cs.ucdavis.edu/projects/history/seminal.html
[2] http://ieeexplore.ieee.org/document/5504784/?arnumber=550478...
[3] https://www.smecc.org/The%20Architecture%20%20of%20the%20Bur...
[4] http://cap-lore.com/CapTheory/upenn/
[5] http://www.sigada.org/conf/sigada2000/private/SIGAda2000-CDR...
[6] http://www.cse.psu.edu/~trj1/cse443-s12/docs/ch6.pdf
[7] https://en.wikipedia.org/wiki/Cyclone_%28programming_languag...
[8] https://www.usenix.org/legacy/events/sec04/tech/wips/wips/04...
[9] https://vtechworks.lib.vt.edu/bitstream/handle/10919/29244/e...
[10] https://www.google.ch/patents/US5574912
[11] https://pdfs.semanticscholar.org/2209/42809262c17b6631c0f653...
Later, people re-discovering these things wanted a new term for the passive ones. They're still covert channels if we use already-established definitions since they're unintentional leakage through shared resources between a secret container and an observer. At least, that's what some and I argued with some others disagreeing. The other side won with the majority of the field started using side channels. So, it wins out just because it's popular. It's kind of how "programmer is in control" is called the "C philosophy" even though Thompson got it from BCPL. C and UNIX momentum are what people remember until I tell them about Richards actually inventing the key concepts.
No slander, misrepresentation, or anything there. Just people missing or trying to change definitions in a field. That's an annoying, normal part of human language. It would be different if they said prior researchers didn't find leaks in caches, didn't improve security with their certification standards, and other provably-false claims. Those would be ignorance or slander. See the difference?
Absolutely shitty behavior by Google, AMD, Intel and ARM. Notifying the FreeBSD devs so late is a slap in the face to the FreeBSD community and makes the internet as a whole less safe.
Absolutely. That is quite the proper response to FreeBSD leaking privileged information about vulnerabilities in the past.
Also, while the Linux devs failing to honour the embargo ended up being a quite public and problematic thing, I _seriously_ doubt some of the other OS vendor dev teams didn't talk about the problem out of school - and I strongly suspect state-actors and blackhats have pipelines of information on security problems being worked on at Microsoft, Apple, Google, and many other big players. Overenthusiastic devs at local bars/cafes, boastful or bignoting devs online, or disgruntled employees/ex-employees, they are almost certainly targeted by both blackhat and state level actors.
I'm pretty sure a security problem of this magnitude, requiring remediation work my this many different teams, work which took six months or more of planning and executing - could not _possibly_ have stayed completely unknown externally right up to the agreed embargo date. People just don't work that way.
And what vulnerability leaks are you talking about?
[1] - https://marc.info/?l=openbsd-misc&m=150815942414653&w=2
OpenBSD has been clear in the past about not respecting embargoes, however. That's their right (Linus takes the same position) but I would completely understand people deciding to not notify OpenBSD as a result.
But as far as I'm aware, FreeBSD has an exceptional track record when it comes to respecting vulnerability embargoes.
The idea that OpenBSD broke a bug embargo is misinformation.
Because she doesn't have a North Korean visa, she (somehow) checks the expiry date on someone else's North Korean visa, and then (if it is about to expire) runs out to renew it
Maybe try this version: she calls the embassy to ask if she needs to renew her visa (which she doesn't have). The clerk, who has access to all the visas ever issued, tells her that no one has a visa that expires in the next few months, so she is good. This way, you find out about other people's expiration dates.
This applies at all levels of reading, really. We're mixing the trafficking of sensitive authentication information in the same process as code that executes instantly upon clicking on hyperlinks. We're mixing business and pleasure on the same filesystem, in the same OS and memory space. We're mixing mutually untrusting entities' private data and code on timesharing systems that we're renting in someone else's datacenter.
Process boundaries, both in terms of physical reality and design choices on what constitutes a system boundary, are critical, and will need additional thought. At the same time, a boundary that's more robust to side-channel attacks than most is having all the hardware exclusive to yourself.
Also, this entire issue neatly demonstrates the problems with executing untrusted code. Solving the issue of vetting code and evaluating trust, especially by average users, is extremely difficult; but the current culture of the Web largely consists of running untrusted code immediately from a single user-entered string, or through automatic or manual navigation thenceforth. This is a frightening proposition, and yet entirely mainstream today.
The reason why I thought it's so important to do this effort is that, this bug was in the news for days, everybody is going to do upgrades in one way or the other, and even to pay for the performance cost, yet most of the people out there will not understand what it is about. I've the feeling that this disconnects non technical people from technology in a very bad way. That's the reason I believe that divulgation is so crucial.
Intel stopped using HyperThreading for a while (it was in the Pentium 4, but that architecture was abandoned), and also made some changes to the caches which they claimed would help, but they never provided any details and I've never seen any verification of their claims in that regard. (Obviously whatever changes they made weren't enough to prevent the Spectre and Meltdown attacks conveying information through the cache!)
So the best summary is that people threw up their hands and said "yeah, it's a problem, let's hope that nobody writes code which leaks any sensitive information into the microarchitectural state". Not exactly a good position to be in...
How can you be sure the system you copied those files from is not compromised, the micro-controller on the USB stick has not been compromised, and now it's not going to take control of the build system and replace the compiler chain with a modified one which will make all your software vulnerable?
"In the industry we refer to "airgapped" systems; this is a reference back to the days when connecting to a network required wires, so if there was a literal gap with just air between two systems, there was no way they could communicate."
If we know the Internet is a scary place why do nuclear plants, power plants, etc. have Internet connectivity?
These attacks rely on some other user-process malware running on the server to gain information via side channels. If every process in your server is your own, for your web services or whatever, you don't have to worry about it.
As usual, nothing beats dedicated private servers.
If a malicious program could make the way to the private server, the problem is much worse than side-channel attacks.
> the browrser via Javascript
Server. We are talking about server.