Slashdot Mirror


Google's Project Zero Team Discovered Critical CPU Flaw Last Year (techcrunch.com)

An anonymous reader quotes a report from TechCrunch: In a blog post published minutes ago, Google's Security team announced what they have done to protect Google Cloud customers against the chip vulnerability announced earlier today. They also indicated their Project Zero team discovered this vulnerability last year (although they weren't specific with the timing). The company stated that it informed the chip makers of the issue, which is caused by a process known as "speculative execution." This is an advanced technique that enables the chip to essentially guess what instructions might logically be coming next to speed up execution. Unfortunately, that capability is vulnerable to malicious actors who could access critical information stored in memory, including encryption keys and passwords. According to Google, this affects all chip makers, including those from AMD, ARM and Intel (although AMD has denied they are vulnerable). In a blog post, Intel denied the vulnerability was confined to their chips, as had been reported by some outlets. The Google Security team wrote that they began taking steps to protect Google services from the flaw as soon as they learned about it.

124 comments

  1. I wonder... by korgitser · · Score: 1

    I wonder who else they informed. There is quite a zero-day hole here.

    --
    FCKGW 09F9 42
    1. Re:I wonder... by NicknameUnavailable · · Score: 2

      Last year was 4 days ago, so probably not a huge number of people.

    2. Re:I wonder... by Anonymous Coward · · Score: 0

      Last year was also potentially 369 days ago or anything between 4 and 369 or 370 days if it was a leap year.

    3. Re:I wonder... by Anonymous Coward · · Score: 0

      It wasn't.

    4. Re:I wonder... by Anonymous Coward · · Score: 0

      According to Google Project Zero technical post "We reported this issue to Intel, AMD and ARM on 2017-06-01 [1]." Footnote precise issue 1&2 were reported at that date, issue 3 reported later.

      So that's 6 month, not a quasi zero day.

      https://googleprojectzero.blogspot.fr/2018/01/reading-privileged-memory-with-side.html

    5. Re:I wonder... by Anonymous Coward · · Score: 0

      I don't think zero-day means what you think it means

    6. Re:I wonder... by Anonymous Coward · · Score: 0

      Well, based on the speculative news and scrambling of patches it looks like the Linux kernel devs, Microsoft, and Apple knew at the very least. Likely the big cloud and VM providers knew too.

      This is just speculation on my part, though, too.

  2. Intel's press release language is interesting. by Anonymous Coward · · Score: 2, Interesting

    > Recent reports that these exploits are caused by a “bug” or a “flaw” and are unique to Intel products are incorrect.

    By using the AND statement there, a casual reader might think these not bugs or flaws in their processors. A close logical reading reveals the only reason this statement is accurate is because the second half is presumed "incorrect".

    1. Re:Intel's press release language is interesting. by NicknameUnavailable · · Score: 5, Interesting

      There's two separate issues. One is specific to pulling things from core memory in Intel chips, the other is an architectural issue which impacts all chips made in the last decade or so and cannot be patched. They're focusing on the Intel one because that can be patched whereas the architectural issue requires a redesign that isn't in place yet, will probably take years to pass QA properly and have the masks manufactured, and will require a complete recall of every chip made after the 90's. From the Snowden and other leaks we learned that all the hacker tools can leak without issue because nobody actually cares to exploit them but governments and corporations anyway - and they're pretty quiet about it most of the time. Additionally we've known that between Intel ME and AMD's equivalent all the chips were already compromised. This is nothing new. We're already running through barbed wire naked and nobody gives a shit, if anything this revelation of a security hole which can be patched is to make people believe things will be safe if they stick some more spyware on their machine because the quality of data from people who know their spied on is lower than those that don't.

    2. Re:Intel's press release language is interesting. by hcs_$reboot · · Score: 4, Informative

      Intel PR translation.

      --
      Slashdot, fix the reply notifications... You won't get away with it...
    3. Re:Intel's press release language is interesting. by hcs_$reboot · · Score: 1

      Intel PR seems to forget that they sell CPUs not (usually) to the final end user, they sell them to PC manufacturers or computer skilled people. None of these persons would be fooled by PR speeches.

      --
      Slashdot, fix the reply notifications... You won't get away with it...
    4. Re:Intel's press release language is interesting. by hcs_$reboot · · Score: 4, Insightful

      None of these persons would be fooled by PR speeches.

      But the shareholders might be.

      --
      Slashdot, fix the reply notifications... You won't get away with it...
    5. Re:Intel's press release language is interesting. by Anonymous Coward · · Score: 0

      They've proved the not very surprising ability to leak information between privilege levels if you can run user controlled code in both levels, even if the code can't directly exchange results. Potentially fixable, especially since they had to use a flaw to get the kernel side of it running.

      This sounds related to but not really the same problem as yesterday. AMD commenting they never fetch from memory in a more privileged ring is compatible with this disclosure. The key bit well be whether Intel chips actually ignore ring when fetching speculatively, which is a more serious leak.

  3. Technical Details by darkain · · Score: 1

    Link to technical details for those that want it: https://security.googleblog.co...

    1. Re:Technical Details by darkain · · Score: 4, Informative

      Whoops, wrong link. I meant this one: https://googleprojectzero.blog...

    2. Re: Technical Details by Anonymous Coward · · Score: 0

      I find it cute that they say it would be interesting to research other not engines. No fucking way they didn't already do that. The entire point of examining jit in the first place was as a next step to the biggie, remote exploitation over the web.

  4. Reading the vulnerability... by Templer421 · · Score: 0

    If you aren't running virtual machines then it isn't an issue.

    This is more of a server attack and a web host attack.

    1. Re:Reading the vulnerability... by Anonymous Coward · · Score: 0

      wrong

      read the references - it's a risk (albeit not a massive one) to porn surfing laptops

    2. Re:Reading the vulnerability... by 93+Escort+Wagon · · Score: 4, Informative

      This is more of a server attack and a web host attack.

      You might want to read this Mozilla blog post.

      https://blog.mozilla.org/secur...

      --
      #DeleteChrome
    3. Re:Reading the vulnerability... by Anonymous Coward · · Score: 0

      Websites can run javascript, webasm, etc, etc, on your own machine when you visit them, and that can be used as an attack vector.

      Your personal machine is just as vulnerable as a server. Deal with it.

    4. Re: Reading the vulnerability... by Anonymous Coward · · Score: 0

      Once the attack is translated to Javascript the real fun starts.

  5. Hopefully ... by Anonymous Coward · · Score: 0

    > ... I wonder who else they informed. There is quite a zero-day hole here ...

    Hopefully not the NSA

    > ... According to Google, this affects all chip makers, including those from AMD, ARM and Intel

    Looks like all the major CPUs are affected

    After the Snowden saga, I can't help but suspect NSA is involved, somehow

    1. Re:Hopefully ... by Rei · · Score: 1

      Meltdown (Intel-only) is just one implementation of Spectre; Spectre is a whole new family of possible attack vectors that affects everyone. Meltdown makes Spectre easy by forcing the processor to do what you need it to via a security exception in order to read the side effects of speculative processing, rather than hoping that it will. But we could see many forms of this in the future.

      The concept that any random javascript could contain a new variant of Spectre which can read protected kernel pages on your system... this is not a good thing.

      --
      The chloride owes the sodium money.
    2. Re:Hopefully ... by ravenshrike · · Score: 1

      Assuming I'm reading this right the other forms of SPECTRE rely on CPU, and possibly even computer specific branch prediction patterns. Which means that in theory minor changes to the microcode regarding code prediction could break any exploits currently in use targeting a system.

    3. Re:Hopefully ... by Anonymous Coward · · Score: 1

      Explain something...

      The timing part needed to read the data is "easy" is Javascript. No problem there.

      But how do you get the pointer to the kernel memory in Javascript, without another exploit to break the virtual machine? I'm pretty sure JS doesn't allow stuff like
      (char*)p = (char*)0xdeadbeef;

    4. Re:Hopefully ... by Anonymous Coward · · Score: 0

      Well, you could load up x86/x64 code via JavaScript typed arrays or blobs. Then it's just a matter of figuring out which DOM or JS methods are susceptible to overflow and/or transfer-of-control attacks in order to force execution of the injected x86/x64 code.

      Hypothetically speaking, that is.

    5. Re:Hopefully ... by F.Ultra · · Score: 1

      So it requires "another exploit" just like parent AC said.

    6. Re:Hopefully ... by Pseudonym · · Score: 1

      Well, you could load up x86/x64 code via JavaScript typed arrays or blobs.

      If you can already do that, an external hacker probably doesn't need to read kernel memory.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
  6. Doesn't affect AMD64 by Anonymous Coward · · Score: 0

    Intel are in full damage control, but they deserve to lose business after this disaster and ME.

    1. Re:Doesn't affect AMD64 by hcs_$reboot · · Score: 2

      Intel are in full damage control, but they deserve to lose business after this disaster and ME.

      After this disaster and YOU? What did you do?

      --
      Slashdot, fix the reply notifications... You won't get away with it...
  7. Important note by fubarrr · · Score: 1

    It was well known that on Pentium line cpus, a speculative execution branch can access protected memory, but it will just cause page fault in the end.

    The first practical access timing exploit was discovered in 2016. Googlers just found out an even easier way last

  8. Here's what I really want to know... by Narcocide · · Score: 1

    What about my Commodore 64?

    1. Re:Here's what I really want to know... by Anonymous Coward · · Score: 0

      Does it have an Intel Inside sticker which was added by the manufacturer? Your answer is your answer.

    2. Re:Here's what I really want to know... by Anonymous Coward · · Score: 0

      These attacks rely on a combination of the CPU caching memory contents locally, an out-of-order execution model of the CPU as well as speculative execution of code before the result of a branch is known. The CPU in the Commodore 64 doesn't have CPU caches, doesn't do out-of-order execution and thus doesn't do speculative code execution.

      Verdict: The Commodore 64 is not vulnerable to these attacks.

  9. AMD, ARM mostly immune to the bad stuff by Anonymous Coward · · Score: 5, Informative

    There are two exploits revealed here: Meltdown and Phantom

    Intel, AMD, and some/all ARM chip are vulnerable to at least one of the two Phantom attacks, but patching Phantom will not produce any significant performance reductions.

    At this time, only Intel systems have exhibited vulnerability to Metldown. Patching Meltdown comes with serious consequences.

    So AMD is basically correct in stating that they are not in the same position as Intel .

    1. Re:AMD, ARM mostly immune to the bad stuff by Anonymous Coward · · Score: 0

      They are BOTH in a very seriously bad position, just Intel are deeper in the shit than AMD but AMD is still well and truly neck deep in shit.

    2. Re:AMD, ARM mostly immune to the bad stuff by Anonymous Coward · · Score: 0

      Basically right, with one exception: patching "Phantom", a.k.a "Spectre" will prove to be extremely difficult and hasn't been done to date, and won't be in the foreseeable future either, so it indeed doesn't hit performance. By the way, the Kaiser/KPTI patches only fix "Meltdown".
      And "Meltdown" only hits Intel CPUs, not AMD, nor ARM64, so AMD were right to disable the KPTI patch for their CPUs.

  10. AMD's newer CPUs are not affected by edxwelch · · Score: 1

    Google did not test these vulnerabilities on any Zen based CPUs. They tested only on older processors:
    "AMD FX(tm)-8320, AMD PRO A8-9600 R7"

    https://googleprojectzero.blog...

  11. Nope, no virtual machine needed. by DrYak · · Score: 5, Informative

    This is more of a server attack and a web host attack.

    No, it's not specific to web servers.
    They do use web servers as an example of where the exploit might be applied, but it's not specific.

    Basically, this exploit allows to abuse the way speculative execution is done to leak information out of the kernel space into the user space.
    (And there are presentation at the CCC of successful abuses done... in Javascript. In a browser).

    For more details :

    most modern CISC processors (Intel - except for Atoms and Xeon Phi - AMD, etc.) are pipelined and do out-of-order execution.
    Executing a CISC instruction requires several steps (micro-ops) and for performance reasons, they keep several instruction in flight (Once instruction A goes out of step 1 and into step 2, you can try already pushing instruction B into step 1).
    To gain even more performance, CPUs try to be clever about this (instruction B actually needs results of instruction A, so it needs to wait. But the next instruction C actually can already be started, it doesn't depend on anything still in the pipeline).
    Bordering on crystal ball-clever (the next instruction B is a conditional jump. But it looks like a loop, so there's a high chance that it will jump back and repeat. We might as well start working back on instruction A, in case we are correct about this jump).
    That's speculative execution : working in advance on stuff that might not even be needed.
    (Sometimes, you end up needing to bail out of your speculation, throw the work away and restart because you got your crystal ball wrong. But it's better than just sitting there waiting).

    now about memory :
    any modern processor worth its salt has memory protection, meaning it handles access rights : Which process can read-write which virtual addresses ?
    Usually, sensitive information in the OS is shielded away from the regular software.
    On a modern Linux, you can't crash the whole system by writing junk at the wrong address, like you used to do in the old MS-DOS days.
    If your software attempts to read something out of the system, the read attempt will be rejected.

    the exploit relies on how these both play together.

    It happens to be that, in the case of Intel's processors (but not of AMD's), the step where the memory page is loaded from the DRAM stick into the cache happens before the check if the read is valid.
    By the time the Intel CPU does the check and notice that the read is invalid and rejects it, quite a lot has happened.
    (Things got loaded into cache, other instructions have started their speculative execution in the pipeline, etc.)
    These things are measurable (you can measure the timing of some computation to guess what's in the cache and what's not).

    Meaning that it's possible to leak sensitive information, that normally pertain in to the OS and shouldn't be application-accessible, by doing a ton of such speculative-execution and timings.
    At CCC there was some presentation of this done in javascript: Technically, your browser right now could be executing some random javascript shit from some shaddy website in one of your background tabs and trying to learn as much from your OS as possible.
    Such information could further be used while mounting privilege escalations, or other attacks.

    In the specific situation of AMD processors, the check is done much earlier (according to their lklm post) and thus not much else has happened already, and there's not much leak from which you could learn.

    I have no idea how ARM64 are affected. (But it might also be the cache getting populated before the read attempts get rejected).

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
    1. Re:Nope, no virtual machine needed. by fubarrr · · Score: 4, Informative

      Yes, the problem is if you check for page faults before starting executing a branch, you must check page faults for all branches, but if you check it post factum you need to do page fault check only for the correct branch, thus greatly reducing performance penalty of memory protection checks.

    2. Re:Nope, no virtual machine needed. by Shinobi · · Score: 1

      There's still a lot to be tested.

      One thing that's not been tested is the leakiness where you have mixed levels in a process, like hardware acceleration in browsers, or games using GPU, on the Linux side. DSP's etc also need testing.

    3. Re:Nope, no virtual machine needed. by Anonymous Coward · · Score: 1

      The important observation is AMD succumbed to this attack only when they were able to run user controlled code with kernel privileges, bypassing AMD rejecting the loads early. Tightening up on kernel exec exploits can fix the problem for AMD and spoils Intel's attempt to spread the blame.

    4. Re:Nope, no virtual machine needed. by Anonymous Coward · · Score: 0

      any modern processor worth its salt has memory protection

      I can see your not a microcontroller guy.

    5. Re:Nope, no virtual machine needed. by Shinobi · · Score: 1

      The problem is, due to the Unix architecture, a lot of the GPU system lives in the kernelspace while still executing userspace code, and a process can thus straddle both.

      On Windows, due to the GPU drivers being usermode, that's mitigated somewhat, but still not entirely safe.

    6. Re:Nope, no virtual machine needed. by Anonymous Coward · · Score: 0

      The problem is, due to the Unix architecture, a lot of the GPU system lives in the kernelspace while still executing userspace code, and a process can thus straddle both.

      On Windows, due to the GPU drivers being usermode, that's mitigated somewhat, but still not entirely safe.

      So that's why invoking an upgraded GPU driver on Linux is a simple Ctrl-Alt-Backspace, where as on Windows, even thinking about an updated GPU driver requires a reboot?

    7. Re:Nope, no virtual machine needed. by Anonymous Coward · · Score: 0

      At CCC there was some presentation of this done in javascript

      Never mind doing reliable timing in Javascript, how do you get a pointer to kernel memory in JS without needing to break the virtual machine?

      var *p = (char *)0xdeadbeef;

      ?

    8. Re:Nope, no virtual machine needed. by xvan · · Score: 1

      any modern microcontroller worth its salt has memory protection.

  12. The Intel Management Engine will save us by Laxator2 · · Score: 1

    The vulnerabilities discovered in the Intel CPUs will never be exploited, as the Intel Management Engine already provides all the necessary backdoors.

  13. AMD64: 2 separate things by DrYak · · Score: 4, Informative

    Doesn't affect AMD64

    The horrible leak that gives access of kernel information to any userspace software that was revealed yesterday doesn't affect AMD64 :
    AMD processor reject invalid access much earlier in the pipeline and nothing much happens before that point (e.g.: loading into cache) that could be measured by timing, etc.

    In the google paper, they are abusing a different set of anomalies were an application end's up reading it's own memory (yay... ). That *could* be affecting AMD64, but :
    - it's only an application in user-space accessing it's own in user-space memory.
    - by enabling a few non-standard kernel settings, you end up with a situation where you can send eBPF (the bytecode used by modern packet filtering) to a in-kernel JIT, and it's execution will end up with some in-kernel code reading its own in-kernel memory.

    The main big difference, the take-home message:

    - on Intel CPU, you have a violation of boundary separation : an end-user application could access information leaking out of the kernel.
    - on AMD CPU, this does not happen : you only access information on the same side of the separation boundary.

    Or in other words :
    - On Intel are in deep shit right now. They need a serious circumvention around it. It means context switch - each time a software calls a system call (e.g.: to access the file system) - the OS needs to flush out all the sensitive information to make them unreachable by the exploit. The end result : massive performance hit.

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
    1. Re:AMD64: 2 separate things by Anonymous Coward · · Score: 0

      If this is accurate, then does anyone have some mod points to spare?

    2. Re:AMD64: 2 separate things by nanoflower · · Score: 1

      The testing that has been done show that there isn't a massive performance hit for fixing the Meltdown issue except in very specific cases. So far those cases occur in some synthetic benchmarks. In testing on Linux and Windows the patch doesn't seem to impact any standard application (web browsing/games/office work) to any noticeable extent. So while it's not a good thing for Intel it isn't the massive issue that the first reports made it out to be (no 30% performance hit)

    3. Re:AMD64: 2 separate things by Shinobi · · Score: 1

      Browsing and games have taken a hit in my use case: Lots of small file accesses, network I/O and many processes active with GPU and other kernel level functions.

    4. Re:AMD64: 2 separate things by Anonymous Coward · · Score: 0

      I believe that's because there's no performance hit if there was already going to be a context shift; I've seen 5-30% quoted as a reasonable expectation. In short it depends on the workload. I've seen a benchmark showing a 30% hit on a DB query.

    5. Re:AMD64: 2 separate things by Anonymous Coward · · Score: 0

      Don't be surprised if flushing still leaves enough timing difference to measure.

    6. Re:AMD64: 2 separate things by swillden · · Score: 1

      - on Intel CPU, you have a violation of boundary separation : an end-user application could access information leaking out of the kernel.
      - on AMD CPU, this does not happen : you only access information on the same side of the separation boundary.

      ... so far.

      All of the people saying "Ha! Intel only! AMD is better!" are missing the point. The concern isn't only about the specific attacks devised so far. The concern is that we have a whole new class of attack, exploiting a fundamental feature of the architecture of all modern CPUs. Yes, AMD is less vulnerable to the attacks so far devised, but that is an accident. AMD didn't design to protect against this class of attack, because they didn't know about it.

      As Bruce Schneier likes to say: Attacks always get better. It's not at all unlikely that new variants that AMD is vulnerable to will be found, including some that perhaps Intel is not.

      Until we revisit CPU design and take steps to ensure that cache changes made by one process can't be detected by another process, there will be a series of ever-more-clever attacks devised that exploit this hardware side channel.

      OTOH, part of me is an old AMD fanboy, going back decades, and would love to see this give AMD a big boost. If the required mitigations on Intel are as damaging to performance as some tests indicate, AMD could find itself as the performance champion again. I don't think it looks like that's going to happen based on the current exploits, but I can hope ;-)

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    7. Re:AMD64: 2 separate things by DigiShaman · · Score: 1

      So basically, if you have a file share that contains a million files or more, or running a SQL database, Exchange...anything what-so-ever that causes lots of IOPS back and forth through the CPU. YOU ARE FUCKED!

      --
      Life is not for the lazy.
    8. Re:AMD64: 2 separate things by Anonymous Coward · · Score: 0

      whole new class of attack

      Nope, it's a plain old timing attack, used to measure whether some things are in cache even if you are not allowed to read them.

      And the rest is just a plain old case of only checking permissions after doing the thing the permission check should prevent, then failing to hide the fact.

      The hole is new (well, discovering), but it's not a new class.

    9. Re:AMD64: 2 separate things by Anonymous Coward · · Score: 0

      an application end's up reading it's own memory (yay... ).

      That could be serious. Consider a browser which is storing usernames/passwords. If this anomaly is exploitable by malicious javascript, then a bad web page could suck a user's passwords from process memory and send them back.

      This may be why Mozilla, Google, etc are issuing browser patches.

    10. Re:AMD64: 2 separate things by Anonymous Coward · · Score: 0

      Even accessing information on the same side of the separation boundary can be bad.

      Do you want some random javascript reading the names/passwords that your browser helpfully remembers?

  14. Intel production delays by hcs_$reboot · · Score: 1

    Intel have been very slow in producing new CPUs the past months. This issue (they've known for a year) is likely related to the decreased production.

    --
    Slashdot, fix the reply notifications... You won't get away with it...
  15. AMD: no boundary violations by DrYak · · Score: 1

    If you dig into the details :

    AMD actually don't violate boundaries.
    As in their LKLM post, they do the access rights checks before anything else, and if rejected nothing much happens that can be timed.
    Meaning there's no leaking of kernel information into user-space programs.

    The only thing that Google successfully demonstrated is :
    - leaking some users-space's program own information (yay!...). There's not much boundary violation here.
    - using some non-standard linux kernel settings, to send eBPF (the bytecode used by modern packet filtering) to a JIT that will execute it in kernel. You end-up with in-kernel code being able to leak its own in-kernel information. That might give possibility to create some scary constructs, but ISN'T a violation of boundaries (you're already on the other side of the kernel fence) and requires non-standard settings (which basically amount to giving possibility to execute user-supplied (byte-) code in-kernel. So you basically get what you've deserved for inviting users into your kernel)

    On the other hands Intel CPUs do violate boundaries :
    It does quite a lot before eventually deciding to kill the invalid access.
    All this "lot" are things that can be measured afterward, meaning that information from the kernel can be leaked into the user-app.

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
    1. Re:AMD: no boundary violations by edxwelch · · Score: 1

      I think I understand it better now.
      There are actually, 3 vulnerabilities: 2 spectre and 1 meltdown.
      AMD Zen CPU's are actually affected by the first spectre vulnerability and they admit to that: https://www.amd.com/en/corpora...

      The other Spectre vulnerability and the meltdown don't affect Zen. Meltdown is the vulnerability that needs the KPTI patch. Presumably there is some other patch on the way to fix spectre.

    2. Re:AMD: no boundary violations by Alioth · · Score: 1

      Leaking a user space program's own information can be a serious risk especially if that program can also execute arbitary code. A web browser is an example of such code. They have done a proof-of-concept where Javascript running on Chrome can leak information to a remote attacker information within Chrome's memory space. This could include sensitive information such as authentication tokens, private keys, the content of Chrome's password manager, etc.

  16. Language used is interesting... by Master+Of+Ninja · · Score: 4, Interesting
    There's a lot of interesting language being used here, and if everyone is so coy it just strikes me that this is a serious thing. Couple of observations:

    (1) There seems to be two separate exploits which you need to dig into the reporting to work. The Register's coverage is quite good and explains it all. "MELTDOWN" seems to be the more problematic one, and affects Intel and ARM chips. "SPECTRE" seems less problematic and affects AMD chips as well.

    (2) AMD affected or not? Google says yeah, AMD says nay. However the wording from the LKML list is that "AMD processors are not subject to the types of attacks that the kernel page table isolation feature protects against". I think this references that the kernel patch is targeted against MELTDOWN, which does not affect AMD chips (see point 1)

    (3) Although everyone's kicking Intel down, the main problem is that no-one can really trust each other now. I know there is a claim of "defective by design", but a lot of things can be described that way if they aren't used in their intended manner. In a "sane" world there would be no malicious actors trying to exploit what seems like quite a clever trick relying on timings (not a chip designer/expert). I read a lot of issues with the web came about, due to the fact that when it was designed everyone on the internet trusted each other, so security against bad apples wasn't designed in. As things have been commercialised you can see the effects, to the point that the only sane way to browse is using ad blockers and no script.

    My thoughts on people suing Intel are a bit conflicted. Probably based on US law they would lose, but my analogy is like blaming (insert car manufacturer here) for selling you a car which crashes only when someone throws stones at it. We need stronger laws and protections against the rise in hostile actors.

    (4) It's interesting that the Google blog post couldn't wait for the embargo-ed deadline of 9th January. They and their customers must have been getting really spooked. I suspect that this was being worked on and known by multiple parties, and a bit of coordination would have been good rather than panic.

    (5) It'll be interesting to see what happens with regards to performance - from my understanding the SPECTRE variants just needs code recompilation. Most home workloads should not be affected by the two exploits, however I think if you are I/O heavy then it may be an issues.

    Interesting time indeed.

    1. Re:Language used is interesting... by drinkypoo · · Score: 1

      (1) There seems to be two separate exploits which you need to dig into the reporting to work.

      There are at least three separate exploits so far, so you didn't actually dig.

      AMD affected or not? Google says yeah, AMD says nay.

      AMD is affected, at least by 2/3 exploits, but mitigation will be cheap because of architectural differences.

      Although everyone's kicking Intel down, the main problem is that no-one can really trust each other now.

      AMD seems trustworthy.

      I know there is a claim of "defective by design", but a lot of things can be described that way if they aren't used in their intended manner.

      Intel is bad at branch prediction. Remember the P4? That's why that thing sucked. They're still bad at it, so they took shortcuts, which turned out to come back to bite them — and their customers. And here I am just using AMD processors, but that's none of my business.

      In a "sane" world there would be no malicious actors trying to exploit what seems like quite a clever trick relying on timings (not a chip designer/expert).

      In that case, we don't live in a sane world, and that is irrelevant, and Intel is incompetent if they are behaving as if we do.

      My thoughts on people suing Intel are a bit conflicted. Probably based on US law they would lose,

      And based on UK law they will probably win, because they actually have a standard of fitness for purpose. If you bought it on the premise that you would have a certain level of performance and now you won't, you should be able to return it.

      It'll be interesting to see what happens with regards to performance - from my understanding the SPECTRE variants just needs code recompilation. Most home workloads should not be affected by the two exploits, however I think if you are I/O heavy then it may be an issues.

      Anything that involves a lot of I/O calls with lots of small files is going to suffer, and that includes the thing that people do most on their PC — web browsing. It's going to punch compiles right in the nuts.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    2. Re:Language used is interesting... by west · · Score: 2

      And based on UK law they will probably win, because they actually have a standard of fitness for purpose. If you bought it on the premise that you would have a certain level of performance and now you won't, you should be able to return it.

      Care to lay odds on Intel actually being ruled against? 2:1? 3:1?

      If it weren't for the fact that guilt is immaterial compared to PR so this will never get ruled upon, and Intel will settle for something that enriches a few lawyers and gives owners a $0.50 discount on their next Intel CPU, this would be a case worth wagering on.

    3. Re:Language used is interesting... by squiggleslash · · Score: 1

      There are two classes of exploit, Meltdown and Spectre, with at least three methods to use them to bypass the security of the addressed system, two of which address the same class which in turn rely upon the same design flaw. He dug, he just didn't use the same definition of "exploit" you're using.

      It is certainly true that two of the three methods rely on a design flaw exploitable by the Spectre class of exploits, that applies to almost all current CPU families. That said, the consensus seems to be that Spectre is much, much, harder to exploit than Meltdown.

      Anything that involves a lot of I/O calls with lots of small files is going to suffer, and that includes the thing that people do most on their PC â" web browsing. It's going to punch compiles right in the nuts.

      Yeah, just to try to get some ballpark figures I loaded Slashdot.org (which ought to be fairly light) and Cracked.com (which is the worst website in the world for loading umpteen billion objects) into Edge (which doesn't have AdBlock) - Cracked loaded 739 objects, but even Slashdot, loading the newest dup of this article which has hardly any comments, resulted in 233 requests.

      Both Google and Mozilla have apparently already released changes to their browsers to make it physically impossible to even use timing attacks in Javascript pages. So if you're running the latest browsers, disable Flash, and are otherwise unlikely to download and run untrusted third party executables then it's unlikely Meltdown can be exploited with an unpatched kernel. But I also know I'm in a minority for wanting that option.

      But, hey, does it matter now, I mean, nobody's even got a fix planned for Spectre, so we're all fucked anyway, patched kernel or not.

      --
      You are not alone. This is not normal. None of this is normal.
    4. Re:Language used is interesting... by Anonymous Coward · · Score: 0

      We need stronger laws and protections against the rise in hostile actors.

      No. We need stronger laws and protections against the friendly actors. Our 'secure' systems should be secure because they ARE secure, not because the manufacture said so and laws are put in place to against hostile actors. There will always be hostile actors and they will never 'live by the law'. Attempting to throw more laws at hostile actors is fruitless and solves nothing.

    5. Re:Language used is interesting... by drinkypoo · · Score: 1

      Care to lay odds on Intel actually being ruled against? 2:1? 3:1?

      No, but I still think they might actually be punished overseas. They are seen as a US company first and an Israeli company second, and everything else somewhere much further down the line. No one outside of one of those two nations will hesitate to insist that Intel actually make good without big, big bags of money.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    6. Re:Language used is interesting... by houghi · · Score: 1

      The time that people trusted each other online is a very long time ago. Even before the Internet went seriously public, there where virusses that existed on floppies.

      And there is no excuses to have no security for anything after 2000. But security costs time and thus money in development. Most people (including developers and programmers) have no real clue as to what security is. Most of the security is still build around blame-shifting. As long as they develop something secure, like changing the password every 10 minutes and they follow the current procedures, it is secure.

      No thought goes into it if these things really mean security, just if they mean liability.

      "Hey, somebody put an infected USB drive in the system. That is against company policy that we wrote, so the fact the system is now hacked is not our problem."

      It is like trying to sell a car that can't handle the moose test. Do not blame the driver for not wanting to hit a moose. Do not blame the moose for standing on the road. Design a car that does not topple over with abrupt steering.

      --
      Don't fight for your country, if your country does not fight for you.
  17. Boundary violations by DrYak · · Score: 4, Interesting

    Basically :

    AMD checks access rights first and if rejected nothing much happens.
    Meaning no leaks from kernel information into user-space running software.
    - Google only demonstrated a in user-space software accessing its own in user-space info.
    - And by using some non standard settings, it's possible to give bytecode to that kernel, and that piece of in-kernel software will access its own in-kernel info. (But you're already on the other side of the kernel fence)
    Nothing gets accross the kernel fence.

    Intel checks access rights much later on. By that time quite a lot has happened (e.g.: things could have been loaded in the cache, etc.). By measuring those things, you can deduce information that you should not have access to.
    It means that a user-space software could end up getting sensitive information that normally should stay in-kernel.
    These subtle timings of cache enable you to get information accross the kernel fence into user-land.
    To mitigate these, each time a user-land software calls into a kernel function (e.g.: filesystem access), the OS needs to flush all it's space from the accessible space. This comes at a big performance cost.

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
    1. Re:Boundary violations by swilver · · Score: 1

      I don't see how a different timing would allow you to deduce anything from something that was loaded into the cache. A cache load on modern CPU's consists of loading multiple bytes at a time (8, 16, 32) and a slight timing difference won't tell me the value of those --
        just if something was loaded or not, not any of the individual hundreds of bits.

      Now, *if* you could do a second read on the same location *after* it was loaded into the cache (perhaps bypassing the security check as it won't hit DRAM) then you could extract all the information.

      Or potentially you could do some kind of comparison or and/or masking on the read value and deduce individual bits from the timing differences...

    2. Re:Boundary violations by Pulzar · · Score: 2

      I don't see how a different timing would allow you to deduce anything from something that was loaded into the cache. A cache load on modern CPU's consists of loading multiple bytes at a time (8, 16, 32) and a slight timing difference won't tell me the value of those

      The way this works is that you don't load the protected data into cache, but you use it in a subsequent instruction to load one of the two addresses that you do have access to into cache. I.e., in some pseudo-assembly:

      load r1, [protected_addr]
      and r2, r1, 0x1
      load r3, [some_accessible_addr + r2 6]

      Now, if bit 0 of protected addr was 1, you will have "some_accessible_addr + 64" loaded into cache, and if it is 0, it's some_accessible_addr + 0. Since these are two separate cachelines, you can now access each from normal user code, see which one returned quickly, and determine the value of bit 0 of the protected_addr. And, you keep doing this, getting the data bit by bit.

      The reason this works is that all this code is executed speculatively. Eventually, the load to the protected address will be aborted, and the register values for it and subsequent instructions will be cleaned up, but cache remains the way it is... i.e. there's no way to "roll back" the cache.

      BTW, cache line size is 64 bytes.

      --
      Never underestimate the bandwidth of a 747 filled with CD-ROMs.
  18. Worth noting: This can't be patched by Anonymous Coward · · Score: 0

    All the patches just introduce mitigating measures that make exploiting the bug difficult or impossible, but the bug itself can't be patched. Unprivileged code on Intel CPUs can read mapped privileged memory (i.e. kernel memory), full stop. There is no way to fix that. The patch just unmaps almost all kernel memory every time the kernel passes control to unprivileged code.

  19. In all seriousness.... by DrYak · · Score: 5, Informative

    What about my Commodore 64?

    In all seriousness :

    - old, in-order, non-pipelined CPU like the 6502 in your good old trusted C64 don't do speculative execution and thus aren't affected specifically by such exploits.

    but:

    - your 6502 doesn't do any form of memory protection : any piece of software can access any part of the whole system (because poking weird memory location is how you control the hardware on such old system) so any software has full access to anything.
    So you C64 is leaking sensitive information.

    (Later 68k motorola CPU (68030 and up) eventually started to include an built-in MMU to protect memory access, and thus later Amiga machine featuring them (A2500/30, A3000) can be made imune to OS information leaking into userland. That would the first Comodore hardware - vaguely remote cousin of your C64 - to do so)

    Yup, i'm giving a technical answer to a joke.

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
    1. Re:In all seriousness.... by Anonymous Coward · · Score: 0

      I know you're responding a joke, but still the information you posted is interesting

    2. Re:In all seriousness.... by TeknoHog · · Score: 1

      - old, in-order, non-pipelined CPU like the 6502 in your good old trusted C64 don't do speculative execution and thus aren't affected specifically by such exploits.

      If I'm reading this correctly, older Intel Atoms are safe because they are in-order CPUs ( https://spectreattack.com/#faq). I still have an Atom from 2010, and it's already slow enough so I'd rather leave it without KPTI. Of course, my important servers are all AMD.

      --
      Escher was the first MC and Giger invented the HR department.
    3. Re:In all seriousness.... by Anonymous Coward · · Score: 0

      But it does remind me that I still have an ION (Atom 330+Nvidia GPU) board around here somewhere. Has memory protection but I think I remember one of the reasons it was so much slower than my awesome Athlon II is that the Atom is totally in-order. So if I were really paranoid, I could ... shit, doesn't have enough SATA ports. Nevermind.

    4. Re:In all seriousness.... by Anonymous Coward · · Score: 0

      old, in-order, non-pipelined CPU like the 6502 in your good old trusted C64 don't do speculative execution and thus aren't affected specifically by such exploits.

      It actually does. When reading from an indexed address, e.g. $D000,Y it needs to do the add in two steps, since the address is 16 bits and the CPU can only add 8 bits. Y is also only 8 bits, so when the address ends on 00 there is no problem, but in other cases there may be a carry which will be added in the next step. In that case, the CPU will read the address resulting from the carry-less add while checking for a carry, so that when the carry is zero, it already has the value. When the carry is one, it will then re-read the correct address once the carry is added.

      This has been exploited in some demos, e.g. to read from the VIC raster interrupt register, since this register only needs to be read, the value can be discarded, and after the carry is added, another address containing real data is read. Two reads in one instruction.

      Of course since the system contains no security, exploiting this doesn't affect security any way.

    5. Re:In all seriousness.... by Anonymous Coward · · Score: 0

      your 6502 doesn't do any form of memory protection

      No, but it could be added outside the CPU. The Apple IIc had an MMU sitting on the memory lines - that's how it was able to handle 128k RAM. Not that it matters since the 6502 didn't do speculative execution or have a cache... or ring levels...

      So ok, not particularly relevant to the discussion, merely mildly interesting for the historically inclined among us...

    6. Re:In all seriousness.... by F.Ultra · · Score: 1

      Actually Commodore had a CPU expansion board, the A2620, which was a MC68020 which had a 68851 MMU, for the A2000.

    7. Re:In all seriousness.... by Anonymous Coward · · Score: 0

      Ha shows what you know! The C64 actually used a 6510 which was 8 whole numbers more advanced than the 6502 (it also had a 6bit I/O used for bank switching and other fun stuff) :)

      Everything else was spot on, especially about the leaking of sensitive information. You wouldn't believe how much you can get from the cartridge (expansion) port. (Hint: everything in memory) This obviously requires physical access to your C64, but since you probably don't know where it's physically located at the moment, then you can assume the bad guys have already compromised it.

    8. Re:In all seriousness.... by Anonymous Coward · · Score: 0

      Your C64 running web browser JavaScript would not be vulnerable to the JavaScript stealing all your saved passwords.

  20. Problem and workarounds by enriquevagu · · Score: 4, Interesting

    There are three different attacks in the blog post by Google's Security team. The first one, for example, works as follows: it loads from a kernel memory address; this will generate an exception, but before the exception is generated (because the page permission check is delayed to improve performance) the subsequent instructions are executed speculatively. None of the following instructions will ever commit, but they can have a noticeable impact on the processor state, as follows: they speculatively execute a load, based on the contents of the position loaded from the kernel space. The load is issued (but not committed), what caches a given memory location. The specific location is based on one bit of the .

    When the first load is detected to be illegal, the instructions in the pipeline are flushed, but (the following is the critical part) the cached address remains in L1. By timing a memory access to the corresponding address, they can infer one bit of the given kernel memory. By repeating this, they can subsequently infer the whole word, one bit at a time.

    How can they solve this issue? I can only foresee two alternatives:
    - Perform permission checks earlier in the pipeline, but this requires modifying the processor microarchitecture. AMD cores are not affected by this attack, so their uarch probably checks permissions before issuing the load.
    - Completely or partially flush the contents of the cache after a processor miss-speculation. This is probably the solution being implemented in the patches being developed.

    Note that miss-speculations are VERY frequent, since most of the execution of Out-of-Order processors is speculative to improve performance. This explains the VERY significant performance penalties caused by the patches.

    1. Re:Problem and workarounds by tlhIngan · · Score: 2

      Note that miss-speculations are VERY frequent, since most of the execution of Out-of-Order processors is speculative to improve performance. This explains the VERY significant performance penalties caused by the patches.

      No, they're caused because of the page table isolation. Resetting the page tables is a very expensive operation, which is why most OSes mapped kernel memory into the process space. This includes having to flush the page table caches (known as the Translation Lookaside Buffer, or TLB) far more often than you used to. Basically, everytime you run a system call, the kernel has to switch the page tables, jump into the kernel code (that is now mapped by the page tables), perform the work (the last two causing TLB misses because they involve the new page tables and are very slow to execute as the processor has to walk the tables), then jump back to the kernel stub that's permanently mapped, unmap the kernel, flush the TLBs (can't have the mapping be alive) and then finally return from the system call. This includes anything that traps into the kernel, including interrupts.

      The real issue is everything thinks "this is a fundamental bug Intel had since the beginning". It's not a like a bug that's a vulnerability like a buffer overflow that's done by laziness or other thing. It's actually using a very low level microarchitecture thing against itself. It's like attacking OpenSSL by trying to be a process running on another core and seeing how the core reacts as the other one runs OpenSSL and using that to extract key bits.

      A permission check requires walking the page tables, and Intel sought to increase performance by saying most accesses are legal (because permission failure is rare - even though the OS protects against it, in general few people are deliberately accessing invalid memory), so having those map into the caches was optimizing for the 99% case. AMD not commiting the resources on the cache probably incurs far more silicon resources (since the access already happened, so the cache update has to be held until the instruction is retired - so either you decide to not cache the result the first time, ,or you remember to flush the cache the second time around, both of which require more work in tracking.

    2. Re:Problem and workarounds by Junta · · Score: 1

      As someone more thoroughly said, the KPTI patch doesn't make the behavior impossible, it just takes the teeth out of it by unmapping all the juicy things they would want.

      Note that partially flushing the cache after a misprediction would certainly mitigate, but there would still be a window where the memory has been cached speculatively and the fault being detected. You instead would have to maintain a mask of cached-but-not-yet-valid-for-issue cache memory, and ignore it in specific scenarios until everything checks out. Of course this probably would be unacceptably slow down on all cache (another lookup table to go through for all cache access), so presumably the more likely true fix is the former (which is also far more straightforward and less likely to have unforeseen hole).

      --
      XML is like violence. If it doesn't solve the problem, use more.
    3. Re:Problem and workarounds by swilver · · Score: 1

      Perhaps this entire class of problem can be solved by not providing such accurate timers in the CPU or randomize them somehow, making them useless for measuring these kinds of tiny variations but still useful for measuring things on the order of microseconds.

    4. Re:Problem and workarounds by Anonymous Coward · · Score: 0

      All that does is force people to run the attack more frequently to get a statistical model of what is being returned. "Fuzzing" the results is just security through obscurity.

  21. What is the status of AMD by Chrisq · · Score: 1
    They say

    Branch Target Injection: Differences in AMD architecture mean there is a near zero risk of exploitation of this variant. Vulnerability to Variant 2 has not been demonstrated on AMD processors to date.

    Near zero implies that it is possible! What are the differences, and why do they make it unlikely? could enhancements to the attack make it feasible?

    1. Re:What is the status of AMD by AHuxley · · Score: 1

      "“Meltdown” and “Spectre”: Every modern processor has unfixable security flaws" (1/4/2018)
      https://arstechnica.com/gadget...
      has the Spectre news re "with proof-of-concept attacks being successful on AMD, ARM, and Intel systems"

      --
      Domestic spying is now "Benign Information Gathering"
  22. Intel stock sold by sad_ · · Score: 3, Informative

    It has also come to light that Intel CEO sold $24M in stock when he was aware of the issue.

    http://www.businessinsider.com...

    --
    On a long enough timeline, the survival rate for everyone drops to zero.
    1. Re:Intel stock sold by Anonymous Coward · · Score: 0

      Certainly doesn't inspire any confidence in their products. Glad I bought AMD, and I'm hoping this is a huge push for other architectures to finally move into desktop.

    2. Re:Intel stock sold by DigiShaman · · Score: 1

      According to Toms Hardware, "Krzanich sold the stock under a 10b-51 plan, which is a pre-planned sale of stocks intended to prevent insider trading." But yeah, I'm thinking he knew, and this was all procedural to not violate the law. I have proof of that, but common, they got Martha Stewart for less, no??

      --
      Life is not for the lazy.
    3. Re:Intel stock sold by DigiShaman · · Score: 1

      Edit: I do NOT have proof of that. Speaking of proof...reading.

      --
      Life is not for the lazy.
    4. Re:Intel stock sold by Anonymous Coward · · Score: 0

      According to Toms Hardware, "Krzanich sold the stock under a 10b-51 plan, which is a pre-planned sale of stocks intended to prevent insider trading."

      It is not unusual that executives will sell stock in order to (a) diversify, (b) take advantage of tax treatment in a particular year, (c) buy an island (or something only slightly less expensive, like a home in Silicon Valley). The question will be whether that plan was inconsistent with previous filings of sales (if every quarter he made the same sale, nothing to see here), and whether he filed after he knew about the bug, and after he was informed as to the possible implications to the companies stock price. Will it be looked at? Certainly. Did he do anything wrong? Unknown until the investigations occur.

    5. Re:Intel stock sold by Anonymous Coward · · Score: 0

      The well-known exploit for 10b-51 is to preplan stock sales/purchases on a regular basis, then cancel the sales/purchases that you don't want to happen. So all he had to do to here was not cancel his scheduled sale. He's free to schedule new product announcements for the day after his scheduled purchase goes through so he gets it cheap (which is the most common use for this exploit) though occasionally it works out with negative news like it did here.

  23. Intel Atoms by DrYak · · Score: 1

    If I'm reading this correctly, older Intel Atoms are safe because they are in-order CPUs ( https://spectreattack.com/#faq). I still have an Atom from 2010, and it's already slow enough so I'd rather leave it without KPTI. Of course, my important servers are all AMD.

    ...and same for Xeon Phi.
    (Which are basically the same kind of in order approach like Atoms, but linked together with a ginormous SIMD unit - the AVX512 - some kind of ultra-SSE/AVX on steroids that border onto GPU territory. That shouldn't be a surprise, as Xeon Phi are basically what Intel salvaged out of their failed Larrabee GPU experiments).

    According to the Wikipedia article about Atom architecture, there's only one single micro-ops ever in flight from a given process (though they DO hyperthreading and might fill unused slot with micro-ops coming from a different thread), and don't do any speculative execution at all :
    At no time can you reach a situation were some check (e.g.: a software "rust-style" boundary check, like in the bug also affecting AMD too, or the MMU enforcing memory protection as the bug affecting Intels only) hasn't completed yet, but the invalid read has already started entering the pipeline.

    You cannot leak stuff using speculative execution on a CPU that lacks any form of speculative execution, indeed.

    (So if the rushed correction enables kpti on your setup, you can safely disable it by giving "nokpti" to it).

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
    1. Re:Intel Atoms by Anonymous Coward · · Score: 0

      A pedantic comment, more to the original question though: in-order and speculative execution are different things though, so in-order CPUs can be affected.
      It seems that the reason ARM's in-order CPUs are not affected is not because they are in-order (since some still have speculative execution), but because the speculative execution window is too small. I.e. they are not designed to execute ahead much speculatively (which is probably related to both being in-order and designed to be small), and you need to execute a long-ish instruction sequence speculatively to trigger these issues (at least: a load, a address calculation, and another load or store).

  24. The problem: arbitrary code by DrYak · · Score: 1

    Leaking a user space program's own information can be a serious risk especially if that program can also execute arbitary code.

    Yes, but although the fact that checks (e.g.: array limit checks done in software) don't work perfectly is a problem per se, the fact that YOU ARE RUNNING ARBITRARY CODE in the first place is the main problem here.

    In other words, using rust is a nice thing, but it doesn't stop you from writing stupid code in the first place.
    (to play with all the usual "rust-troll" that come screaming for out-of-bound checks whenever there's memory overflow exploit mentioned)

    A web browser is an example of such code. They have done a proof-of-concept where Javascript running on Chrome can leak information to a remote attacker information within Chrome's memory space. This could include sensitive information such as authentication tokens, private keys, the content of Chrome's password manager, etc.

    This is the main reasons why there's been efforts in trying to separate things into isolated processes.

    Chrome is using separate process tabs.
    Back in the old XUL days, Firefox was using a separate process for Flash (a.k.a.: exploits fire hose).
    Now with the big XUL-to-webextension, Mozilla can even turn on electrolysis in Firefox and join the "separate process" bandwagon.

    No matter of checks, etc. will be enough in browsers.
    - You need to keep the sensitive information and the abitrary remotely-provided code in separate process. (A javascript running while you browse Facebook can logically access your FB token/cookie, but should in no way read the rest of your password manager's content).
    - You need to keep the amount of remotely-provided arbitrary code as low as possible (ideally, using a white-listing pluging like the NoScript web extension).

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
  25. Details. by DrYak · · Score: 1

    Presumably there is some other patch on the way to fix spectre.

    And according the cited article, the mitigation to fix spectre is much less costly.

    Also Spectre exploits only basically works around things like array-boundary checks.
    i.e.: the check that controls if you're not reading past out-of-bound memory might not have finished yet, and the actual invalid read might have entered the pipeline.

    Basically, it's a slap in the face of all "rust-trolls" who are touting array limits check, whenever there's a buffer overflow exploit mentioned.

    Using bound checking doesn't excuses you from writing stupid code (here: allowing arbitrary code in the same context as some sensitive data. In Google's demo : enabling some non-standard kernel options that enable abitrary user supplied JITed byte-code in the kernel space)

    But basically an application, under spectre, is only accessing memory that it should have accessed anyway.
    The trouble starts only when the application does some check to avoid reading some of its memory, but the attacker has a way to send a complicated construct that speculatively execute stuff based on that checked location.

    It might be exploitable in some situations (e.g.: running JIT-ed eBPF in-kernel, a javscript running in the same browser process as where the password manager stores its data), but although it's unfortunate that checks don't work, the main problem in these case is the over-all design
    (What the fuck is user-supplied bytecode doing in-kernel ? Why should remotely provided javascript and password manager execute in the same context ? etc.)
    In these cases Spectre is just *one* way to exfiltrate the data. But by the end of the current year, there's sure to be a couple of other completely different methods that will show up in those badly-designed pieces of software to exfiltrare the same process-accessible sensitive data.

    The other Spectre vulnerability and the meltdown don't affect Zen. Meltdown is the vulnerability that needs the KPTI patch.

    And Meltdown is the extremely scary stuff.
    With it, all the guarantee that normal memory protection gives you fly out of the window.
    You might as well set your MMU on fire.
    All hell breaks lose.
    It's the proverbial cats and dogs sleeping together mass hysteria.

    And the mitigation comes at a big cost :
    each time a process calls a system call (e.g.: filesystem to read a file), the kernel needs to flush itself out of the accessible memory space.
    According to Intel it might be noticeable to the average user (basically people who only use their laptop to surf the web and whose cpu rarely go above 40%), but realistic benchmarks have shown important slowdowns (so gamers are going to be pissed).

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
    1. Re:Details. by Anonymous Coward · · Score: 0

      I guess another way to put it is: some of the exploited things actually are closer to a software issue and mostly mean that writing a JIT compiler for untrusted code is actually much, much harder than the people writing them thought.

  26. Flushing by DrYak · · Score: 1

    The flushing it self is time consuming.

    The thing is, once flushed, there's no address that the exploited user-land software can attempt to read to guess stuff based on timings.

    The memory-protection-violating speculative access still could happen, but there's no sensitive address at which you could send it.

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
  27. Attack class vs. whole design by DrYak · · Score: 4, Informative

    The concern is that we have a whole new class of attack, exploiting a fundamental feature of the architecture of all modern CPUs. Yes, AMD is less vulnerable to the attacks so far devised, but that is an accident. AMD didn't design to protect against this class of attack, because they didn't know about it.

    Maybe the attacks are tiny bit interesting because they abuse the speculative execution.
    (CPU starting to execute stuff before hand, for performance reason).

    But there's a big major difference.

    In the case of the Meltdown exploit, the stuff that affect Intel-only CPU, the whole guarantee that memory protection gave don't hold anymore.
    The MMU is made completely irrelevant.
    It entirely breaks whole concepts of computer security.
    You might as well go back to MS-DOS era / pre-68030 era, when any piece of code could read/write any arbitrary memory location without any restriction.

    It's BIG.

    Intel has made a bit of a gamble : for speed purpose, it's a bit faster to postpone the check a little bit further down the pipeline.
    AMD has made a conscious security choice : check rights as soon as possible, because that's what is the most security sensible stuff to do, even if it means taking a tiny performance hit because you need to make more checks on more potential branches. It's more correct this way.

    AMD hasn't specifically planned the Meltdown exploit ahead of time, but they have taken the formally correct way to handle security, and it has payed in the long term (the CPU didn't end up affected once Meltdown was discovered) even if it did take a small performance hit in the short term (didn't benefit from the tiny performance increase that Intel did).

    Again, due to Meltdown exploit Intel has broken fundamental tenet of memory protection. (Which just happened to not have been made clearly visible until recently, because nobody though about this specific timing exploit. But this has been "at risk" since the first Pentiums whose speculative execution was allow to go past security checks).

    The Spectre exploits, of which one is also affecting AMD CPUs is in an entirely different league.
    Whereas Meltdown on Intel CPUs goes across limits that should have been held by memory protection,
    nothing in Spectre exploit is accessing something that the exploited application didn't have already access to.

    It's simply a way for getting around some checks that might be in the way.
    i.e.: that application might be making checks to array boundaries, before accessing them.
    Due to speculative execution, the check that controls if we're not accessing out of bound might not have finished yet, and yet the actual invalid read might be in the pipeline already.
    I doesn't give you sudden access to things that you shouldn't have access to. It just gives a way around some type of safety checks that might exist in the code you're trying to abuse.

    It's a bit exotic and has some air of novelty, because it uses the speculative execution of modern CPU for a change.
    But fundamentally it's a timing side-channel, not much different than other timing attacks done for quite some time (even remotely), hence the big work against data-dependent jumps in cryptography code.

    And although it does open a couple of opportunity, the big deal isn't that much in the exploit itself.

    Mostly, it's a big slap in the face of all "rust-troll" who come trumpeting for array limits checks whenever there's a buffer overflow exploit:
    Memory access check should lift any responsibility from writing stupid code.

    Yes, to bad that some of the checks can be slightly by passed, but:
    - Why the fuck are you enabling non-standard kernel option to enable user-supplied JITed byte-code in the kernel ? User-supplied stuff in-kernel, what could possibly go wrong ?
    - Is keeping sensitive stuff, like the storage of the password manager, and dangerous stuff, like execution remotely-provided javascript, in the same process a reasonable stuff to do ?

    The k

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
    1. Re:Attack class vs. whole design by swillden · · Score: 1

      Note that the attack does allow code to spy on memory in the same process on AMD. This seems at first glance to be a non-issue... until you consider that lots of processes -- like your web browser -- run JITed code from untrusted sources. Malicious Javascript able to read any data from the browser process is a big deal. Even if your browser uses a separate process per tab, this means that resources on a page can break the same origin policy. With Chrome you can optionally enable strict site isolation which will run the content from every origin in a different process, but that comes at a performance cost.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    2. Re:Attack class vs. whole design by Anonymous Coward · · Score: 0

      You might as well go back to MS-DOS era / pre-68030 era, when any piece of code could read/write any arbitrary memory location without any restriction.

      No. For single user systems, the number one advantage of proper memory protection is that code can't write an arbitrary memory location *by accident*. This requires a deliberate attack, not someone assuming that a certain pointer was initialized to null and ending up writing to whatever random address happened to be in that memory location.

    3. Re:Attack class vs. whole design by Anonymous Coward · · Score: 0

      > With Chrome you can optionally enable strict site isolation

      Firefox:

      about:config

      privacy.firstparty.isolate true

      A feature taken from the TOR Browser, where it's already active.

  28. GPU: user-supplied code by DrYak · · Score: 1

    The problem is, due to the Unix architecture, a lot of the GPU system lives in the kernelspace while still executing userspace code, and a process can thus straddle both.

    Yeah, but actually... Nope. Not at all.

    The only tiny bit that is running in kernel is the driver that receives the command stream and passes it to the actual physical GFX hardware for rendering.
    That's the DRM module, the tiny stuff with ".ko" at the end ("amdgpu.ko", etc.)
    Everything else in the rendering stack is handled by libraries (mesa's "libGL.so", "libdrm.so" and its hardware specific variants). All these libraries are in charge of handling all the simpler and nicer language and API that your software uses and converting them into the stream of low-level instruction that needs to be passed to the rendering hardware.

    The only point where you can provide arbitrary code, is shaders. As in pixel/geometry/etc.
    Even if you abuse the GPGPU interface to send specitally crafted bytecode (that doesn't even map valid GSL / CL code) :
    you're pretty much limited.

    There are only two situation :

    - There's an actual GPU in the machine (not necessarily a discrete one) : the whole stack (which again runs in your context anyway) never executes anything, it only manipulates the bytecode you've given to convert it into commands that the hardware understands. If the API used happens to be Vulkan, as opposed to OpenGL - this might even happen in several threads, but still in your process contexts, no juicy bits to access.
    Once ready, this low-level stuff leaves your process and eventually get sent to your hardware. The only bit of software running in the kernel mode is the one in charged of channeling this data to the actual hardware. It doesn't execute it, it only moves data around. For all it knows, this might not even be valid executable code.

    In short, if there's GPU hardware, the only bit of stuff that get executed in kernel mode is a tiny fixed routine that is in charge with sending you code to the hardware for rendering. None of the user-supplied stuff is ever executed in the CPU at all.

    - There's no actual GPU, graphics are 100% done in software (e.g.: you use LLVMpipe mesa driver). In which case the user supplied code is gathered, compiled into CPU binary code, and executed. All this happens from within your process' context, being executed with the same context (but in multiple thread). At no point in time could the sharder code ever see anything that the process doesn't see already. At not point is any user-supplied code ever executed in kernel mode. The only kernel mode stuff that is ever going to be executed anyway is some unrelated frame-buffer handling stuff (At some point in time the window composer is going to take the buffer into which your application was rendering, and paint it on the screen. At which point some kernel code is going to jump in to map the framebuffer into the address space of the composer).

    That's not to say that running arbitrary GPGPU code is safe. It's not :
    - older GPU don't have their own MMUs, so any shader could be trying to get data from any arbitrary graphic buffer. A WebGL javascript could be trying to snapshot your banking app window buffer. (more modern GPU are starting to feature their own MMU)
    - some consumer-level CPUs from Intel don't have a IOMMU : the GPU could be trying to read from any random location of the DRAM sticks unrestrained.

    But at no moment is any of the code provided by the user gettint executed with a kernel context.

    On Windows, due to the GPU drivers being usermode, that's mitigated somewhat, but still not entirely safe.

    Windows GPU drivers being usermode has nothing to do with arbitrary user code getting executed in the kernel mode.

    It's just a safety mechanism, where the 100% of the blob shit that the no-name manufacturer of your graphic card has provided is executed as a user-land app, and none of it getting executed in kernel context.

    Think

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
    1. Re:GPU: user-supplied code by Shinobi · · Score: 1

      Yes, the tiny DRM bit, that controls mode setting, memory management via DMA-BUF(which conveniently also allows for CPU access...) and a whole lot of other neat kernelspace stuff.

      DMA-BUFs kmap in particular, used together with Spectre, will definitely need to be tested.

      Also, with CUDA, some OpenCL implementations, and some Vulkan implementations, you can build Compute Kernels that run both on GPU and CPU.

      Couple all those above, with the move towards UMA, and you have some serious testing that needs to be done, and just handwaving it away by immediately assuming that everything is safe because "drm is just a tiny little bit" is inane.

  29. Discovered Last Year by PPH · · Score: 2

    So, five days ago?

    --
    Have gnu, will travel.
    1. Re:Discovered Last Year by HiThere · · Score: 1

      Reports say the info was sent to Intel, AMD, a few others (not all named) last June. So 6 months. Additional info was sent later, but the report didn't say what additional info, or when.

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
  30. PowerPc to the rescue by Anonymous Coward · · Score: 0

    I'm going back to my PowerMac G5 Tower, suckit x86!

  31. Core violations by Anonymous Coward · · Score: 0

    I've been wondering if the idea of core should be taken further in it basically being independent processors (kind of like GPUs). Your OS will run independently communicating across an internal bus.

  32. The Intel humour will save us by Anonymous Coward · · Score: 0

    You may laugh, but if Intel thought it would save this mess they would use.

  33. Software designed flaw by DrYak · · Score: 1

    This seems at first glance to be a non-issue... until you consider that lots of processes -- like your web browser -- run JITed code from untrusted sources.

    As I've mentionned in the end of my long rant, here the main problem isn't that this peculiar flaw enables the process to inspect its own data.

    The main problem is the actually stupid design of putting sensitive data and remotely-provided arbitrary code in the same security container.

    Spectre is just one possible attack in this context. By the end of 2018, there's surely going to be another exploit that could hose the same browser.

    The stupid mainly comes from the way browser are designed (or in Google's demo, the way somebody would enable the in kernel user-supplied JIT-ed bytecode).

    With Chrome you can optionally enable strict site isolation which will run the content from every origin in a different process, but that comes at a performance cost.

    But should be done by default (as the TOR browser does, apparently, given the other ansers). To bad there's some hit, but that's the safest way to handle stuff.

    This should be the automatic way to go : keep sensitive stuff appart.
    Today it might be a Spectre attack on an AMD CPU, and tomorrow it might be yet a different exploit affecting the Javascript engine or some other component of your browser.
    Whining about Spectre affecting the AMD CPUs is just diverting attention from the very bad over all design of keeping sensitive stuff there.

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
  34. JIT correctedness by DrYak · · Score: 2

    mostly mean that writing a JIT compiler for untrusted code is actually much, much harder than the people writing them thought.

    Well, though you'll have to conceed that they didn't make any fundamental flaw in the actual JIT implementation - this time.

    It's on the much larger scale of design flaw of putting a JIT running externally supplied arbitrary code in the same context. Something bad is going to happen eventally.

    Today it might be more exploiting some weird CPU behaviour,
    tomorrow it might be exploiting a straight flaw in the JIT compiler.

    Still putting both in the same place was a bad idea. Something was going to happen no matter what. Spectre happens to be the first one exploiting it.

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
  35. LastPass vs. Yubukeys by Anonymous Coward · · Score: 0

    That breaks LastPass and Yubikeys.

    1. Re: LastPass vs. Yubukeys by Anonymous Coward · · Score: 0

      Good

  36. Last year? by rcharbon · · Score: 1

    That's 5 days ago.

  37. Array bound checks by DrYak · · Score: 1

    how do you get a pointer to kernel memory in JS without needing to break the virtual machine?
    var *p = (char *)0xdeadbeef;

    Answering the "how to do random memory access in a language without pointers" part of the question: by abusing arrays and boundary checks (link to a Spectre abuse) (Note that it's a Spectre abuse, not a Meltdown abuse. For the meltdown I'll have to track the CCC link).

    If a piece of javascript is using the ASM.js specific sub-dialect, it will be JITed to actual x86-64 machine code (in the example each statement of the javascript is translated into one or two machine code instructions).
    If you carefully craft you code, the produced code is still entirely valid, but the actual memory accessing functions aren't to far away.

    As said, the code is valid, if you mentally trace through it :
    - if the provided index is within bound of the "simpleByte" array, the rest of the step will get executed (including the write, which is forced to stay within bounds of the target "probe" array).
    - if the provided index is out-of-bound, the conditional will be false, and the conditional jump will skip the entire block, nothing bad happens.

    But when executed on a deeply pipelined CPU that does speculative execution :
    - before the condition has finished getting executed (it takes some time: it needs to read the value of the lenght from memory, compare it with index, and only then do the jump), the CPU will try to feed instructions in the pipeline.
    - its best guess is that the execution will run through (based on some predictors: e.g. code jumping backward is usually loops and is likely to be taken most of the time (except on the last iteration), code jumping forward is usually error checks and usually not jumping - error happening less often than normal execution. That's a real-world heuristic used in some processors).
    - so it begins preparing the next instruction, and the instructions afterward.
    - by the time that the "if" condition finished (the compare and conditional jump are executed), the rest of the instructions might be well into the pipeline
    - that means that the memory page of the target "probe" array might already have been moved into the cache, to be ready to be written if the condition was actually correct.

    So even if you call this function with a too-big index, even if the CPU throws away all the work it has done wrongly due to erroneous speculation ("probe" array will never actually get written to), there are still some measurable effect ( "probe" array will be in the cache, even if nothing ended up being written to it).

    So, if you call this function with beyond-boundary index, you'll end up with a situation where nothing is written to "probe" BUT the specific page (which depends on the content of the out-of-bound location) were "probe" would have been written ends up being stored into cache.

    If you use a stupidly big enough index, you might end up accessing something which is way beyond the limit of what the javascript code is supposed to access.
    So in short, even if you don't have pointers to read at an arbitrary address, you can ask javascript to read an arbitrary point way beyond the end of an array, and even if there's a boundary check (here explicit in the javascript example), due to speculative execution the CPU will attempt to peek at that arbitrary point anyway.

    Now if you repeat this read a lot, and then try to time in turn which part of "probe" is more often faster to read from (because it was already loaded into cache by the previous function), you can guess what that arbitrary point of memory contained.

    (i.e.: you choose a random index "0xdeadbeef".
    Then 10000 in a row, you call the function with the invalid index and then read "probe[0]", you time it and get XX ms.
    Then run it again 10000 in a row, but this time read "probe[4096]". You time it and get YY ms, rought in

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
  38. Arbitrary code. by DrYak · · Score: 1

    Yes, the tiny DRM bit, that {... long list skipped ..}

    None of which executes arbitrary code provided by the end-user, which was the entire point of the discussion.
    All the long list you give are fixed functions that the DRM performs when called.

    When given arbitrary code, none of it gets executed in kernel space. The kernel code only performs the task of pushing that code to the GPU for execution, it doesn't execute anything itself.

    (Also, compared to the actual Mesa userland, the DRM bit *is* small, even the parts which are not concerned by the execution of arbitrary code).

    Also, with CUDA, some OpenCL implementations, and some Vulkan implementations, you can build Compute Kernels that run both on GPU and CPU.

    And which all run in user space (which is specially important, since CUDA allows arbitrary pointer arithmetics, and you CAN actually write code that does invalid access. Even on the GPU).
    None of this kernel will ever get executed while in kernel mode. They all get executed in the context of your application (thought it might be in many background threads).

    and just handwaving it away by immediately assuming that everything is safe because "drm is just a tiny little bit" is inane.

    I'm not assuming that every thing is safe, I've patiently shown that DRM only plays a an extremely tiny role in regards of user-supplied code, none of which concern *running* the user code.

    So the whole "Linux sucks because there's a (much smaller than the user-land libs) part that runs in-kernel" isn't relevant here.

    The parts that run in-kernel concern a reduced amount of function, none of which executes arbitrary code.

    The user-supplied arbitrary code (shaders, kernels, etc.) is executed either by the GPU, or in the user-land mode of the calling process (but not necessarily the main thread).

    The fact that a small subset of the drivers lives in kernel space on line, doesn't directly lead to any of the arbitrary user-supplied code getting executed in-kernel as part of the normal way things work.

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
  39. Can this see into intel SGX ? by Anonymous Coward · · Score: 0

    Intel SGX is supposed to provide cryptographic isolation of memory .. but does this vulnerability defeat that too?