News for hackers. Stuff that matters.
Re:Reading privileged memory with a side-channel by theptip on Wednesday January 03, 2018 @07:07PM (#16066741)
I think this means we should consider all browser processes to be completely insecure, until mitigations are applied (e.g. Chrome's Site Isolation: https://www.chromium.org/Home/chromium-security/ssca).

Looks like any session token/state could be exfiltrated from your Gmail tab to a malicious JS app running in-process, for example.

Am I overreacting here?

Re:Reading privileged memory with a side-channel by kibwen on Wednesday January 03, 2018 @07:39PM (#16066921)
> Am I overreacting here?

Still skimming the paper, but the JS attack appears to be processor-intensive (please chime in if you interpret it differently!). Any widespread, indiscriminate use of such an attack in the wild seems like it would eventually be detected as surely as client-side cryptocurrency mining was discovered. If you aren't a valuable target, if you don't visit sites that are shady enough to discreetly mine bitcoin in your browser, and if you use an adblocker to defang rogue advertisers, then you probably shouldn't lose too much sleep over this (which is not intended to diminish how awesome (in the biblical sense) this attack is).

That said, if there were ever a time to consider installing NoScript, now's it: https://addons.mozilla.org/en-US/firefox/addon/noscript/

Re:Reading privileged memory with a side-channel by jwilk on Wednesday January 03, 2018 @07:42PM (#16066942)
And if you're a web developer, now it the good moment to make sure your site works correctly when JS is disabled.
Re:Reading privileged memory with a side-channel by deckard1 on Wednesday January 03, 2018 @08:05PM (#16067090)
We'll have to dig a time machine out and go back to 1998 then.

I'm being a facetious ass. But you know I'm not wrong, either.

Re:Reading privileged memory with a side-channel by dmm on Wednesday January 03, 2018 @08:12PM (#16067129)
You are wrong. Install the NoScript extension and you can see your site without js. NoScript also allows you to selectively enable js per site on a temporary or permanent basis. This is the default way that I and many other people browse the web.

https://noscript.net/

Re:Reading privileged memory with a side-channel by TikiTDO on Wednesday January 03, 2018 @08:30PM (#16067222)
Just looking around, general available figures for public internet (as opposed to tor) suggest that anywhere between 0.1% to 1.0% of users have JS disabled. These numbers have also been consistently going down over time. That's a fairly small number to dictate how a system should be designed.
Re:Reading privileged memory with a side-channel by losteric on Wednesday January 03, 2018 @08:51PM (#16067339)
That depends on your target demographic. JS is more frequently disabled among tech-literate customers, so a cloud provider's home page would probably benefit from working without JS.
Re:Reading privileged memory with a side-channel by gatmne on Wednesday January 03, 2018 @11:08PM (#16067964)
> These numbers have also been consistently going down over time.

That trend might reverse if vulnerabilities like these continue to surface.

Re:Reading privileged memory with a side-channel by alkonaut on Thursday January 04, 2018 @03:55AM (#16068882)
Right. It’s like designing for any other tiny group: color blind, blind, people who don’t read any of the 3 languages your site is already translated to, etc.

I’m not saying that shouldn’t be done, but business wise its probably usually best to instead add design changes for the latest smartphone screen.

The web isn’t a hypertext graph anymore, it’s a large JavaScript program with a thin html front now.

Re:Reading privileged memory with a side-channel by chrisseaton on Wednesday January 03, 2018 @08:33PM (#16067236)
I think you’re misunderstanding. The person you’re replying to wasn’t saying you couldn’t disable JavaScript. They are saying the websites they and many in the industry develop won’t work like that and haven’t since the turn of the century. That’s what they were claiming to be not wrong about, and they aren’t. Turning on NoScript shows the problem but doesn’t solve it.
Re:Reading privileged memory with a side-channel by jerrycruncher on Wednesday January 03, 2018 @11:34PM (#16068064)
"Turn of the century"? JS was used for little more than swapping images on mouseover and changing/"animating" title bar text back then. The "you will see absolutely nothing or a ream of {{blah}} text" without js enabled really only became prevalent in the last 5-or-so years. Even in the halcyon days of jQuery usage you could get around quite comfortably without js, as js was still being used to augment webpages rather than replace them entirely.
Re:Reading privileged memory with a side-channel by jeremyjh on Thursday January 04, 2018 @01:03AM (#16068377)
It wasn't common practice, but fully Javascript rendered applications were a thing as early as 2001. That was when my company developed the first one that I know of. It was a godawful ugly pig but it worked.

Most sites did nothing like that, but they did use Javascript and would break in various ways without it. At that time, there were a lot of people admonishing web developers to test their applications with Javascript disabled. Sort of like now.

ETA: I had to look it up - XHR was first available in IE 5 as an ActiveX control. The internet at large couldn't really expect it to be available but I believe that is where we first used it.

Initial release: March 18, 1999; 18 years ago

Re:Reading privileged memory with a side-channel by vanviegen on Thursday January 04, 2018 @03:08AM (#16068722)
Before XHR, there was an iframe trick that could be used to the same effect. We were abusing that to do streaming updates (stalling requests until the server had new data) on then likes of IE5 back in 2004. WebSocket eat your heart out! :-)
Re:Reading privileged memory with a side-channel by jerrycruncher on Thursday January 04, 2018 @02:22PM (#16073231)
I'm not denying that the technology was sort of there (especially/only if you were writing a corporate app that targeted one and only one browser, probably as a replacement for an in-house VB/WinForms app). My point, which you mostly reinforced, was that it was not at all common for a user opting not to enable javascript to see a completely broken public-facing site until relatively recently.
Re:Reading privileged memory with a side-channel by theclaw on Wednesday January 03, 2018 @08:53PM (#16067347)
That doesn't make the effort required of a developer to remove an existing JS dependency any easier, though, other than allowing them to see how the site breaks which can already be done using the F12 dev tools.

A lot of sites rely on JS to function even at a basic level these days and I think the parent was saying it's unlikely that that's going to change.

Re:Reading privileged memory with a side-channel by nostrademons on Wednesday January 03, 2018 @09:04PM (#16067402)
As a developer, it's even easier to test without Javascript: open Chrome Developer Tools, select Settings from the hamburger menu, and check "Disable Javascript".

As the other comments point out, though, the biggest problem is that this is economically irrational for most site owners. The figures on JS-disabled usage I had when I was still at Google (3+ years ago now) were at the lower end of TikiTDO's range. It generally doesn't make economic sense to spend developer time on an experience used by 0.1% of users, particularly if this requires compromises for the 99.9% of users who do have JS enabled.

Re:Reading privileged memory with a side-channel by confounded on Thursday January 04, 2018 @02:28AM (#16068629)
Culling all that JS can make things faster for everyone.

If you have a web app there’s no point, but if you’re displaying text and images and your site doesn’t work without JS, you’ve over-egged a solved problem.

(... While increasing perceived latency, especially for mobile users.)

Re:Reading privileged memory with a side-channel by keltor on Wednesday January 03, 2018 @10:58PM (#16067935)
I'd bet a certain percentage of THOSE were actually lynx/links/elinks users rather than no script users.
Re:Reading privileged memory with a side-channel by propogandist on Thursday January 04, 2018 @09:26AM (#16070487)
you are better off with uMatrix which gives the user significantly more control on what loads/executed: https://github.com/gorhill/uMatrix

(it's the more advanced version of uBlock, from the same dev)

Re:Reading privileged memory with a side-channel by yborg on Thursday January 04, 2018 @10:06AM (#16070783)
The old NoScript. The new WebExtension compatible version just blocks, it has no way to disable js.
Re:Reading privileged memory with a side-channel by Pyxl101 on Wednesday January 03, 2018 @09:02PM (#16067388)
I browse with NoScript and quite a lot of the web works just fine, in fact. I can selectively enable JavaScript for sites that need it, and that I trust.
Re:Reading privileged memory with a side-channel by CogitoCogito on Wednesday January 03, 2018 @10:28PM (#16067812)
Why was this downvoted? This is clearly true. I am in fact doing it right now. I am sitting in an airport and clicked around 20 different comment sections and articles from HN so that I could read them later. None of them gave any issues. The only js that I decided to allow was from HN so that I could expand/hide comments.

Does this mean that all websites work? Of course not. But this allows the user to choose which sites to allow to run js. I'm not going to pretend that this is an easy task for non-technical users, but we should be promoting these kinds of habits, not scoffing at them. We should educate as many users as possible that they can still (for now) control much of the web-based code executing on their machines.

Re:Reading privileged memory with a side-channel by pastage on Thursday January 04, 2018 @04:33AM (#16069037)
Well it's a severe case of confirmation bias. The people I know that uses NoScript like tools white list sites and third parties, that makes it seem like it works better than it really does. Further more they choose not to visit sites that work poorly. All the problems are visible as a new user, sure it's obviously possible to use NoScript but I need to white list too many sites to be able to say it actually works.
Re:Reading privileged memory with a side-channel by gspetr on Thursday January 04, 2018 @04:47AM (#16069082)
Some sites like NYT wouldn't even render text (!) for me by default with noscript on.

Then there was that time when I read on HN about Forbes loading 35 MB worth of crap (lots of JS too) when you first access it, sure enough it's completely broken with noscript too if you don't allow it.

Re:Reading privileged memory with a side-channel by thisacctforreal on Wednesday January 03, 2018 @08:01PM (#16067066)
Yes please!

Long live progressive enhancement and graceful degradation.

At least until we get a JS interpreter with proper permission controls and sandbox limits. Something closer to how Lua is embedded sounds nice.

Re:Reading privileged memory with a side-channel by voidmain on Wednesday January 03, 2018 @08:01PM (#16067064)
It seems like practical attacks rely on having a reasonably precise timer available. The spectre paper uses SharedArrayBuffer to synthesize a timer, which is a recent and obscure feature:

https://groups.google.com/a/chromium.org/forum/#!topic/blink...

https://groups.google.com/forum/#!topic/mozilla.dev.platform...

Chrome and Firefox's "intent to ship" posts both contain claims to the effect that there probably aren't any really serious timing channel attacks, which... seems to have been disproved. Why isn't SharedArrayBuffer already being disabled as a stopgap? I think users can turn it off in firefox, how about Chrome?

Re:Reading privileged memory with a side-channel by jncraton on Wednesday January 03, 2018 @09:49PM (#16067610)
SharedArrayBuffer will be disabled by default as a stopgap:

https://blog.mozilla.org/security/2018/01/03/mitigations-lan...

performance.now() accuracy is also being reduced.

Re:Reading privileged memory with a side-channel by kibwen on Wednesday January 03, 2018 @08:05PM (#16067093)
> I think users can turn it off in firefox, how about Chrome?

This month's stable Chrome release will be outright disabling SharedArrayBuffer until additional mitigations are enacted.

Re:Reading privileged memory with a side-channel by londons_explore on Wednesday January 03, 2018 @08:56PM (#16067358)
Which sucks for people who've built sites which rely on it.

It isn't exactly polyfillable.

Re:Reading privileged memory with a side-channel by erichurkman on Wednesday January 03, 2018 @10:12PM (#16067734)
That shouldn't be that many sites. It only hit Chrome stable in July 2017; Firefox in August 2017; and Edge November 2017.
Re:Reading privileged memory with a side-channel by olliej on Wednesday January 03, 2018 @08:06PM (#16067094)
I believe SAB is being disabled, and apparently precision of performance.now() as well? (based on other comments)
Re:Reading privileged memory with a side-channel by caf on Wednesday January 03, 2018 @08:32PM (#16067234)
about:config javascript.options.shared_memory in Firefox.
Re:Reading privileged memory with a side-channel by kiwijamo on Thursday January 04, 2018 @03:03AM (#16068709)
Turned off by default for me in 57.0.3/macOS. Is it usually on by default on other platforms?
Re:Reading privileged memory with a side-channel by scarygliders on Thursday January 04, 2018 @05:02AM (#16069144)
Just checked on Windows and it was on by default for me for Firefox 57.0.3
Re:Reading privileged memory with a side-channel by drdrey on Wednesday January 03, 2018 @07:53PM (#16067002)
Doesn't each tab run in a separate process?
Re:Reading privileged memory with a side-channel by theptip on Wednesday January 03, 2018 @08:14PM (#16067133)
That's true to first approximation in Chrome, but apparently not always.

This recent article contains a bit more detail on Site Isolation: https://arstechnica.com/gadgets/2017/12/chrome-63-offers-eve...

> Chrome's default model is, approximately, to use one process per tab. This more or less ensures that unrelated sites are kept in separate processes, but there are nuances to this set-up. Pages share a process if they are related through, for example, one opening another with JavaScript or iframes embedding (wherein one page is included as content within another page). Over the course of a single browsing session, one tab may be used to visit multiple different domains; they'll all potentially be opened within a single process. On top of this, if there are already too many Chrome processes running, Chrome will start opening new pages within existing processes, resulting in even unrelated pages sharing a process.

Which suggests there are a number of cases where multiple tabs could share a process.

Re:Reading privileged memory with a side-channel by zetafunction on Wednesday January 03, 2018 @08:32PM (#16067233)
Note that it's not just tabs sharing processes that's an issue: prior to the site isolation work, any iframe in the same page would always be in the same process as the main frame. With site isolation, it's possible to host cross-site [1] iframes in a separate process.

[1] Two pages are considered cross-site if they cannot use document.domain to become same origin. In practice, this means that the effective TLD + 1 component match.

Re:Reading privileged memory with a side-channel by kibwen on Wednesday January 03, 2018 @08:02PM (#16067074)
Chrome starts putting multiple tabs in the same process once certain resource thresholds are reached. There's an experimental "site isolation" option that you can toggle on to enforce this better, currently with some caveats: https://www.chromium.org/Home/chromium-security/site-isolati... .

Curious to know whether Firefox has anything similar in the pipe, since it uses a fixed number of content processes rather than a variable number of processes.

Re:Reading privileged memory with a side-channel by notriddle on Thursday January 04, 2018 @07:04PM (#16075306)