AMD ships microcode update to disable some branch prediction
lists.opensuse.org
lists.opensuse.org
Could be wrong, though.
To be honest I don't really care about some theoretical attack that almost certainly won't be used to target me, and if they do, they can have it. I'd rather have the performance.
Attacks don't follow the close-quarters-infection that physical viruses do, so it's a bad model to use.
https://www.cvedetails.com/product/156/Apple-Mac-Os-X.html?v...
https://www.cvedetails.com/product/32238/Microsoft-Windows-1...
https://www.cvedetails.com/product/17153/Microsoft-Windows-7...
But everyone here is already thinking about the string of recent macOS vulnerabilities. Even just in the past few months Apple has been hit by a bunch of fairly major vulnerabilities while Windows hasn't been in the news for a while. What bugs me though is that a theres a handful of the Apple vulnerabilities that weren't caused by an implementation error, it was from a flawed design.
In particular the most notable example of this would be the API used by system preferences that would let any user create arbitrary files with arbitrary permissions owned as root. Obviously the first choice with that is to create a setUID binary but even if the permissions weren't user provided this should be something that should jump out during the design process as a bad idea.
https://truesecdev.wordpress.com/2015/04/09/hidden-backdoor-...
As for a comparison of just recent newsworthy macOS vulnerabilities compared to Windows I'll just cite Hacker News as far smarter people than I have commented on this subject to death.
I just used the following query and only looked at the links on the first page.
https://www.google.com/search?q=site%3Anews.ycombinator.com+...
https://www.google.com/search?q=site%3Anews.ycombinator.com+...
macOS total karma 2345
https://news.ycombinator.com/item?id=15410953
https://news.ycombinator.com/item?id=15807913
https://news.ycombinator.com/item?id=15828767
https://news.ycombinator.com/item?id=15864637
https://news.ycombinator.com/item?id=15804726
https://news.ycombinator.com/item?id=16043578
Windows total karma 304
https://news.ycombinator.com/item?id=815265
https://news.ycombinator.com/item?id=2758554
https://news.ycombinator.com/item?id=10889728
https://news.ycombinator.com/item?id=13577709
The macOS results span the last 3 months, the Windows results span the last 8 years. Mac sales only provide about 8% of Apple's revenue which is overwhelmingly dominated by iPhone sales and app store revenue. macOS has become the red headed step child and it's really starting to show.
2. No one has to target you specifically, it's a matter of time until someone uses this attack vector on something everyone has -- a web browser.
3. Once you're owned, you're going to be sharing resources with a couple of bots, so don't be so sure you'll get to keep the performance.
Would throttling syscalls really prevent using these syscalls? Surely it would just make the exploits lower to perform? Is there something I've not understood, or is the idea just to throttle syscalls enough to make it infeasably slow? If it's the latter, remember that users might potentially be on a website for half an hour at a time (if they're reading a long article or watching a video), so an attacker (whose code is running on the site, potentially through a compromised ad/tracking platform, or just XSS) would have a lot of time to extract whatever memory they want.
That's only if you continue to participate in the shared delusion that the WWW can or should be a high-performance applications platform. Those of us who usually browse with JavaScript turned off can get along fine without SharedArrayBuffer or WebGL or WebSockets.
/grumble
I fully understand how much the world has invested in making the web into an applications platform, and I recognize that many things of value have been built on that platform. But it's been a fundamentally flawed enterprise from the start, and the pitfalls are getting harder to ignore. We need to start taking seriously again the idea that untrusted code cannot be trusted. We need to stop re-inventing the operating system within the browser just because some programmers are too lazy to port their applications to more than one OS even when there are libraries to abstract away all the differences that don't require a UI redesign. We need to stop sacrificing so much efficiency for the sake of portability that doesn't live up to its purpose.
In order for a web browser suitable for document-oriented usage with limited interactivity to be secure and offer reasonable protections for your privacy, it has to take measures that preclude it from being a good applications platform. That conflict seems irreconcilable.
Don't be ridiculous. I'm not saying we shouldn't have cross-platform apps at all. I'm just saying we need a clear distinction between the WWW and any applications platform, just like we need a clear distinction between sidewalks and freeways. The web browser cannot do both jobs well.
One problem is, no one seems to be able to define "web application" in a way that makes the distinction clear. Most sites that use javascript still use it in the context of displaying documents, so if you define any site that uses javascript at all as an "application," then most sites, including Hacker News, count as applications. But that doesn't actually fix any problems.
Web should stay as interactive documents.
WebGL is such high performance that most examples posted on HN struggle on my phone, where I routinely play OpenGL ES 3.x games without any visible jank.
Granted, not everybody: some are more than happy with interactive documents. Great, that's awesome, and I hope you're happy, but you don't get to dictate the behaviour of the 99%.
And that figure is not an exaggeration: for my own sites about 1% of people have JS disabled. This post from Yell, over a much larger sample of data, suggests that 0.07% of their visitors disable JavaScript: https://blog.yell.com/2016/04/just-many-web-users-disable-co....
Granted, a large portion of that 99% won't know or care what JavaScript is, but they'll care if they lose the additional functionality it brings to the sites they use (though, honestly, I doubt they'd miss the ads, for which it's so often misused).
Still, sites I use on a regular basis that benefit from JS: GitHub (most evident with real-time updates to projects, issues, PRs); Office365; GMail, Google Drive, Google Analytics, Google Docs, the Adsense and Webmaster portals, and - of course - YouTube; Clubhouse (project management, heavier than Trello, lighter than JIRA); Azure management portal; pipeline apps such as TeamCity and Octopus Deploy.
I am getting sick of what I presume is coin-mining code. I was reading an article about keyboards on some site the other day and after a few seconds my laptop started to sound like an aircraft taking off.
I believe there are valid usecases for not applying these patchws.
Imagine if a random bad advertisement or injected script on a popular website could silently steal all of your stored session information for other sites.
That's not to say it's not bad -- the exploit works remarkably well -- but it's not fast or easy.
FYI:
pti=offSee here:
/s
So being unsure about how many times you want to do a thing is a no-go too.
If the trip count isn't known at compile time? You should find out.
https://www.phoronix.com/forums/forum/phoronix/general-discu...
https://github.com/openSUSE/kernel-source/commit/14b04164b2f...
Search for amd.com for AMD related changes.
114 changed files with 12,403 additions and 23 deletions.
That's a pretty big patch (although some of those lines are .patch file pre- and post-amble). I feel bad for the people that had to develop/qa/signoff all of that in such a short timeframe. There's got to be at least one mistake in there somewhere.They called the entry points paranoid* as in "unreasonably or obsessively anxious, suspicious, or mistrustful"?
Funny,
It does not really answer all my questions about the microcode updates, but I have not seen any more comprehensive writeups yet.
Mods, please fix the title. The patch adds ability to disable indirect branch prediction sometimes. This is not nearly the same as disabling all branch prediction always.
Perhaps that smurftower PowerMac G3 tucked into the back of the closet that's been gathering dust will be useful again.
I know they made space-hardened x86 chips too.
"...the G3 and the G4, because of their limitations on indirect branching, are at least somewhat more resistant to Spectre-based attacks because it is harder to cause their speculative execution pathways to operate in an attacker-controllable fashion (particularly the G3 and the 7400, which do not have a link stack cache). So, if you're really paranoid, dust that old G3 or Sawtooth G4 off. You just might have the Yosemite that manages to survive the computing apocalypse." [1]
[1] http://tenfourfox.blogspot.com/2018/01/more-about-spectre-an...
Just not MacOS yosemite, more likely Linux/PPC or Open/NetBSD... :D
So yeah probably you're not going to have issues in reality with a G3, especially given its small presence in modern computing, but I wouldn't choose it thinking it's immune either.
If you have a completely foss system and don't execute random code from the internet, you can very safely still enjoy the full power of the hardware.
As raw HTML in a text editor, or in a browser?
Less say we take a recent CPU and just totally turn off speculative execution.
Just how bad a performance hit would that likely be? 30%? 50%? 75%? 90%?
Does anyone even know for modern processors?
For a more fun answer than an exam, consider that the real estate on a CPU is typically dominated by two things, cache and out-of-order speculation hardware(predictors and such). Then, turning off speculative execution would be like turning off a third of your CPU. As to the actual performance impact, it'd be massive. There's a reason why no modern processor is in-order.
You can still have out-of-order execution without branch prediction.
That said, I'm inclined to believe you're right about a massive performance impact (for many programs at least).
No modern performance-oriented processor, that is. Plenty of low-power, area-constrained embedded ones still are. The Intel Quark series of SoCs, for example. Those are basically a very fast 486, with the same 5-stage in-order pipeline. (For some amusement, get Quark datasheet and compare it with the 486 datasheet --- some of the microarchitecture diagrams are identical, and some clearly had only "Intel486" replaced roughly with "IntelQuark".)
out-of-order is just one way that a hardware vendor choose to increase performance. Mill choose an other way.
It is done somewhat as a hack. Overhead on system calls should be relatively low still.
So would it be possible (through a microcode update) to mask the memory values, so that ANY read from privileged gets a NULL value returned?
Or could that cause issues, due to the fact that a branch that doesn't currently have access to a memory segment, may be granted legitimate access to it by the time it would normally be executed?
There are few security or performance guarantees. It is not an architecture geared to realtime and fully deterministic operation.
I don't think that's a fair way of stating it. I think it's a case of independent performance improvements in branch prediction, cache architecture and out-of-order instruction retirement that on their own have negligible security impact but when combined in a single system reveal emergent behavior.
It doesn't even have to be that drastic, the CPU can still fetch any memory that's not calculated. Both sides of a non-computed jump for instance, or the next line of an array that's being scanned in order.
Some memory references would be sequential instead of overlapped, but it wouldn't be the end of the world.
I think not speculatively modifying the cache at all throws away significant MLP, which is extremely important in CPUs these days.
So start from there. That's not a terrible starting position, with all of today's predictive logic and speculative pipelines working at full speed on the fastest codes and partially working as codes use more uncached memory accesses.
Then you add back in things like speculatively prefetching code and global variables (addresses hardcoded in the instruction not calculated) and you're nearly back to 2017 performance. The problem is widespread and severe, but we're not going back to some dark ages of computing.
So the branch predictor only needs to be cleared after any interrupt or syscall return.
I guess that AMD uCode updates are applicable to the Raspberry PI.
This all simply makes all our IT related work just kids playing make-pretend security.
I am literally trying to figure out what other processors exist that can be used in everyday BSD/Linux work. Sparc? Some ARM branch? Any suggestions welcome.
Richard Stallman was right and I wish we would learn to listen but I doubt that will happen.
It does show the problem of all theorem provers: they are only as good as the specification.
The specification does not conform to the user's expectations or documentation. It's flawed.
Theorem provers can only prove that the code conforms to the specification, not to the user's expectations or documentation. They can be very helpful, but they aren't magic and can't interpret non-formal specifications.
Of course on some occasions the software isn't going to be able to compensate, but Stallman's ideas about why free software is important are grounded in some very practical realities.
Ever see a wire on pcb boards going from one end of the board to another? Thats the hardware equivalent of a: "we can't fix this properly, but we can hack a fix on until we can fix it right in the next revision" hack.
https://www.cadence.com/content/cadence-www/global/en_US/hom...
It'll cost you ~$1M and run at a few MHz.
I work for a company that works with Intel on new things. Lets just say the FPGA's they use are... really expensive, and despite being capable of simulating a design fast, are still very slow.
By expensive I found out $20 million per FPGA simulator was on the low end. And I think that would simulate at the rate of about 10mhz for the amount of transistors/internal setup present.
Fpgas are cool, but a poor choice for fixing this issue.
You could probably do it for up to an 80386 with some $400ish dollar FPGA's.
If Intel were open about yes, even the microcode, maybe we would've seen this issue sooner - more openly. What we have is paltry in comparison to the way it would be if, in a Stallman universe, software was 100% open, always.
If AMD can fix something like this, Stallman would say the end user should be able to as well. He has a point, and the number of useless IoT devices we're already seeing is testament to that fact.
Given that Spectre is trivially exploitable from motherfucking JavaScript, this bit of craziness turns out to have concealed much wisdom.
With some encouraging sentences to keep on making the world a better place.
He felt honored. He asked me to post this for him.
"Now that you recognize these problems are real, how about joining in the work to fix them? See gnu.org/help for a list of many different kinds of work that we need (programming is just one of many), then pick one and help!"
Bastard had the nerve to tell Alexander to "stand a little out of my sun."
Total nutjob. No respect for wealth and power whatsoever.
Instead of false promises we need to develop better engineering: verification, computational math, etc. And also laws - no free/open license in the world will stop companies from tracking, but fine as big as 4% of total revenue (EU GDPR) will make them oblige.
In a world where personal computers only ran code the user could safely trust, these exploits would only be full attack vectors when applied to multi-tenant computing environments.
I'm not arguing that FOSS systems are inherently more secure than closed systems, but when it comes to exploits that require arbitrary code execution to be effective, Stallman really was/is right. Between a NoScript browser extension and a system whose source code is entirely available to you, you've basically got Meltdown/Spectre immunity.
I personally trust FOSS software more not to do dumb things (like, hopefully my password manager doesn't report all my passwords to NSA), but simply being FOSS doesn't make it any more secure :)
Reproducible builds (https://reproducible-builds.org/) is an initiative to fix that part of the problem. With reproducible builds, a third party with the same source code and compiler will get an identical binary, so we can have independent entities certifying that the code you download with apt-get was built from the corresponding source code.
My Windows 10 machine got the Meltdown patch yesterday, in an out-of-band, undelayable update. Then it restarted itself during the night and this morning it's secure. My Ubuntu laptop is still unpatched and I'm not sure when the 4.15 upgrade will come to 16.04.
Out of order variants are still in the design stage, so they may come up with a way to isolate or invalidate speculation effects on branch misprediction.
His thoughts on cloud computing, however, are very much worth listening to.
https://stallman.org/stallman-computing.html
Scroll down to the point titled "I am careful in how I use the Internet."
This is a specific side-channel attack in a super complicated system. Even if we had OSS x86/64 processors, this more similar to the protocol issues found in openssl.
I really hope that this is just poor wording and that branch prediction is either disabled in extremely rare circumstances or they just exposed some control mechanism like Intel did which allows you to control the branching.
EDIT:
AMD's response was that mitigation from their side isn't needed for SPECTRE either:
http://www.guru3d.com/news-story/amd-rsponds-on-amd-processo...
I really wonder what has changed, and if now they are vulnerable to variant 2, have they underestimated MELTDOWN as well?
I'm also looking forward for people to look into the victim cache that AMD has implemented with Zen and if InfinityFabric and the added latency between CCXs can't be exploited for side channels attacks.
AMD is not affected by Meltdown, true, but Meltdown is also easier to fix. The other issues do affect AMD, and are MUCH harder to fix (also harder to use it should be pointed out).
Meltdown was disclosed first, so everyone was excited to bash Intel. But that was premature.
I never thought I'd see this headline in my life.