Security: drive-by cache attacks on Chrome/End-to-End/Chromebook via PNaCl
Reported by
eran.tro...@gmail.com,
Jun 27 2017
|
|||||||||||||||||
Issue descriptionI write to disclose new academic research findings, about side-channel cache attacks that use Chrome's PNaCl as the attack vector. Using these, we demonstrated key extraction from End-to-End running on Chromebook. The abstract is as follows: ------ We show how malicious web content, served by a webpage or an online ad, can extract cryptographic secret keys from the user's computer. The attack does not rely on bugs in the browser's nominal sandboxing mechanisms, or on user actions, but rather on cache side-channel attacks. The malicious web content uses PNaCl (an efficient alternative to JavaScript, supported by Chrome) to induce contention for CPU cache resources with other programs running on the user's computer, and makes deduction about those programs' data. We show that even on Chromebook devices (a secure, locked-down platform that that can only browse web content), a malicious online ad can extract ElGamal decryption keys from Google's End-to-End cryptographic library. ------ A detailed writeup is attached. We have not publicly disclosed these findings yet (though we have submitted them to a conference, under confidential peer review). We wish to publish them soon, and will be happy to coordinate with you. Please let us know whether coordination will be necessary, and of course, we would appreciate any comments you may have. Also, if you issue a CVE, please let us know ASAP so we can include a reference to it in our paper.
,
Jun 27 2017
Thanks for your report. Just to let you know, (P)NaCl has been deprecated and its support will be removed in Q1 2018: https://developer.chrome.com/native-client/migration. CC'ing more folks who can be interested / may help triaging this.
,
Jun 27 2017
,
Jun 27 2017
(Although (P)NaCl is on the way out, wasm and SharedArrayBuffer and friends are on their way in and the paper mentions them briefly.) On the crypto side of things, I think it's generally accepted that crypto code should be resistant to timing side channels and that this includes memory access patterns. I think End-To-End's table lookup in their modular exponentiation should be considered a bug to be fixed there. (Though, yes, high-level languages in general, JS or even C, do not have a way to express these constraints, so crypto code is sadly often at the mercy of the compiler.) This seems to match the conclusions in the paper as well? The alternative worldview where we decide web content must never get access to sufficiently performant ways to run code seems hard to justify to me.
,
Jun 30 2017
bradnelson@ -- assigning to you based on some of the other bugs in the component. If you are not the right owner, could you please help find the right owner? Thanks! - Secondary Security Sheriff
,
Jun 30 2017
Please be advised that putting puns in your paper's subtitle is very enjoyable. :) Calling it Medium, but I'm open to arguments otherwise. +somogyi since I agree with #4 that E2E might have a bug to fix. Please feel free to CC anyone who needs to know. It might also be that there's nothing for PNaCl/WASM crew to do. Let's at least determine that one way or the other by M-61?
,
Jun 30 2017
,
Jun 30 2017
,
Jun 30 2017
I'm not going to shut this down by wontfixing, but I have a very hard time seeing this as anything other than reinforcing the argument that you cannot safely write crypto in a language that cannot provide constant execution time guarantees. That stated, I am dropping this to low-severity, since medium-severity implies a trivial, large scale information leak, such as an arbitrary out-of-bounds read. Whereas even if we assume this to be within the scope of Chrome's threat model, the attack must account for very significant mitigating factors in any real-world scenario.
,
Jun 30 2017
Strictly speaking, that leaves just assembly, but agreed with the high order bit. :-) At some point when we've solved the rest of the world's problems w.r.t. crypto, I would love for someone to work out a coherent set of constant-time primitives in LLVM... Though we're not even at worrying about languages yet in that E2E code. Indexing based on secret indices is not constant-time in any language. Crypto code should not do that.
,
Jul 1 2017
,
Jul 1 2017
Eran - thanks a lot for your report. This might be a bug in End-to-End. While e2e doesn't claim to be constant time (because JavaScript), we do intend the algorithms to at the very least be constant time, and it seems we missed it here. It's a bit weird this is in Chrome's bug tracker, but we can track it here for the time being. I've cc'd the people that are involved on this. @Chrome, please let us know if you would like to use this bug to discuss the Chrome-specific bits of this, and we'll move the conversation to security@google.com. Thanks
,
Jul 1 2017
,
Jul 3 2017
Eran - do you have any code you can share with us?
,
Jul 6 2017
We prefer not to share the code, but will be happy to answer your questions. Meanwhile, as discussed we wish to publish this research. Is there a need for coordinating this with you? Can you assign a CVE number we can include in our publication, so people can track it in the future? Also, can someone add my coauthors to the bug CC list? Daniel Genkin <danielg3@cs.technion.ac.il> Yuval Yarom <yval@cs.adelaide.edu.au> Lev Pachmanov <levp92@gmail.com>
,
Jul 6 2017
evn@ - Since this is an e2e issue, I'm closing this bug in our tracker. To the bug reporters, please email security@google.com to continue the conversation (and include a link to this bug for reference).
,
Aug 1 2017
For those with access, the changes we are making are: - cl/163856999 - cl/163826935 - cl/162379636 In particular, we are making the following statement in the first CL: * Utility function to clone an array of bignums into a new array. This is * necessary because repeated access to the same memory location can be * detected by other websites, which could be used to leak information * about the computations being made across origins. Is this correct? Any suggestions on how to rephrase the paragraph?
,
Aug 2 2017
c17, did the mitigations defeat the attack?
,
Aug 15 2017
we have no idea, the reporter did not provide a PoC.
,
Aug 15 2017
,
Aug 30 2017
Any update on the mitigation in the library? For reference, Mozilla inquired about this paper and would like to coordinate on this an future issues around shared memory + timing attacks.
,
Aug 30 2017
,
Sep 14 2017
,
Sep 14 2017
,
Oct 13 2017
This bug has been closed for more than 14 weeks. Removing security view restrictions. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
|||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||
Comment 1 by mmoroz@chromium.org
, Jun 27 2017