News for hackers. Stuff that matters.
Re:What Spectre and Meltdown Mean for WebKit by krapp on Tuesday January 09, 2018 @06:24AM (#16105278)
> I wonder if this shouldn't question whether we should still allow all websites to run javascript by default.

Plenty of harmful things are done with C and C++ but no one is saying we should deactivate native apps written in unsafe languages, or not allow anyone to program a GUI unless they can justify the use of canvas space. Yet the web, arguably the most successful and free (as in both beer and freedom) and accessible software platform yet devised, is the only one on which people - erstwhile hackers - say that code should be a considered a privilege and not a right, or that it doesn't really belong on the web at all, despite javascript being on the web for ~20 years now.

What you're describing seems a lot like adding Windows UAC prompts to the web - no one would find that better, particularly given that anyone can simply turn javascript off in their browser already. This isn't even a javascript problem per se - you could erase javascript from the universe and make the web as plain as you like and Spectre and Meltdown would still exist.

> also at the very least it should lead us to question the chain of trust of javascript. When I visit abc.com I should only execute javascript from abc.com or a subdomain. No script either hosted on a non abc.com domain or appearing in an iframe should be executed.

That seems reasonable, and I would be willing to bet, possible to configure with modern tools. But pretending javascript is a second-class citizen on the web isn't the answer.

Re:What Spectre and Meltdown Mean for WebKit by cm2187 on Tuesday January 09, 2018 @07:35AM (#16105697)
Random, unexpected, untrusted c/c++ written code doesn't execute on my machine every time I browse a website. The only c/c++ code is code I downloaded and installed or that my OS vendor trusted to include in the OS. It's quite different from javascript where the code is literally executing uninvited, often by 3rd or 4th or 5th parties of the website I visit.
Re:What Spectre and Meltdown Mean for WebKit by seba_dos1 on Tuesday January 09, 2018 @08:27AM (#16105952)
No. Unless the application downloads and executes new code from third parties neither you nor application author can control every time you launch it, it's absolutely not comparable to most of the websites.
Re:What Spectre and Meltdown Mean for WebKit by krapp on Tuesday January 09, 2018 @08:12AM (#16105875)
>Random, unexpected, untrusted c/c++ written code doesn't execute on my machine every time I browse a website.

It does every time you run a native application, for the same values of "random, unexpected and untrusted."

>It's quite different from javascript where the code is literally executing uninvited, often by 3rd or 4th or 5th parties of the website I visit.

Fine. Turn it off then. That's an option you don't really have in any other runtime, so take advantage of it. But just because you don't want javascript on the web doesn't mean it doesn't belong there when authors choose to include it as part of the content they serve.

Also, how exactly does one run "3rd, 4th or 5th party" javascript?

Re:What Spectre and Meltdown Mean for WebKit by cm2187 on Tuesday January 09, 2018 @08:22AM (#16105928)
> Also, how exactly does one run "3rd, 4th or 5th party" javascript?

You load a page that includes 3rd party scripts/iframes that themselves load 4th party scripts that themselves load 5th party scripts, etc. You often notice that when you start blocking an ad in your browser and suddenly 10 others disappear at the same time.

Re:What Spectre and Meltdown Mean for WebKit by sillysaurus3 on Tuesday January 09, 2018 @10:53AM (#16107029)
The only c/c++ code is code I downloaded and installed or that my OS vendor trusted to include in the OS.

You never brew install anything? Or brew cask install, or git clone followed by make, or...

Even npm install sometimes compiles C.

It's hard to get away from c/c++ code.

Re:What Spectre and Meltdown Mean for WebKit by mort96 on Tuesday January 09, 2018 @04:21PM (#16110226)
Maybe he's running Linux? There, software installed through the package manager from the distro's repos count as code which the OS vendor trusted.
Re:What Spectre and Meltdown Mean for WebKit by alien_at_work on Tuesday January 09, 2018 @08:32AM (#16105973)
>Plenty of harmful things are done with C and C++ but no one is saying we should deactivate native apps written in unsafe languages,

That's not remotely a valid comparison. If I run a native app, I had to get that app somehow and install it. I know it can modify my computer (and probably have to give it persmission to do so). A web page can automatically load other pages, even in the background and do who knows what. For most of the existance of the web we've all had the mental model of "sandbox". We never had that for native apps.

Re:What Spectre and Meltdown Mean for WebKit by hnonlyforu on Tuesday January 09, 2018 @08:58AM (#16106145)
Same thing could happen to apps. There was a Baidu app in China that secretly downloaded random videos just to eat up the users' data plan, so they will buy more data.
Re:What Spectre and Meltdown Mean for WebKit by alien_at_work on Tuesday January 09, 2018 @09:05AM (#16106196)
Again: we've always known that desktop apps were risky and could do anything to our computer (and for years, a lot of "free" windows software installed malware and viruses). We were always told that JavaScript is "sandboxed".
Re:What Spectre and Meltdown Mean for WebKit by Nursie on Tuesday January 09, 2018 @09:07AM (#16106209)
>> Plenty of harmful things are done with C and C++ but no one is saying we should deactivate native apps written in unsafe languages

This is not in any way equivalent to browsing an informational site and having arbitrary code execute.

>> Yet the web ... is the only one on which people - erstwhile hackers - say that code should be a considered a privilege and not a right,

Hell no, code execution is a privilege in all situations! I don't just download scores of random executables and run them. Do you?

>> But pretending javascript is a second-class citizen on the web isn't the answer.

Making it one might be an improvement though. There's no way in hell I should be (to give a recent example) browsing a keyboard review and notice that my laptop now sounds like an aircraft about to take off because the site is running something unidentified as fast as it can (likely a coin miner).

Re:What Spectre and Meltdown Mean for WebKit by Can_Not on Wednesday January 10, 2018 @08:22AM (#16114702)
NoScript is really easy to install and use.
Re:What Spectre and Meltdown Mean for WebKit by Nursie on Wednesday January 10, 2018 @08:31AM (#16114751)
I've always meant to try it. The various blacklist options have been good but are always leaky.
Re:What Spectre and Meltdown Mean for WebKit by ancarda on Tuesday January 09, 2018 @11:34AM (#16107360)
>Plenty of harmful things are done with C and C++ but no one is saying we should deactivate native apps written in unsafe languages

Isn't that exactly what a lot of people have been saying ever since Rust started taking off? Every time there's a security vulnerability, someone suggests rewriting the program in Rust, if not some other safe program.

Re:What Spectre and Meltdown Mean for WebKit by UncleEntity on Tuesday January 09, 2018 @08:27AM (#16105950)
> ...say that code should be a considered a privilege and not a right, or that it doesn't really belong on the web at all, despite javascript being on the web for ~20 years now.

Same could be said about advertising and I'm infringing on all these innocent corporations' natural rights by running an adblocker.

For random code to run on my machine a few (IMHO reasonable) steps need to happen: 1) somehow entice me to click on a link 2) get past AdBlock 3) get past Privacy Badger

Seems like a privilege to me --and I'm not someone who cares all that much about the shenaganians the big webcorps get up to since I have no money so spend on their ad campaigns anyway.

Re:What Spectre and Meltdown Mean for WebKit by Matt3o12_ on Tuesday January 09, 2018 @08:41AM (#16106034)
Be aware that Adblock doesn’t block all JavaScript code. It blocks code after people have identified that code X run on website Y does something bad (tracking, ads, etc) and they decided to block it. This works well for visible ads because people see them. For tracking scripts, it still happens because most of them have obvious giveaways (come from a different domain, etc) but chances are that you still run random code because it is better hidden (comes from the same domain and does nothing obvious bad). Just because you use Adblock, malicious code will still be able to run. You are just less likely to notice it because it does nothing obvious so people don’t notice it as quickly and it will not get blocked. If you don’t want to run malicious code at all unless you trust this website, you should probably consider running NoScript.
Re:What Spectre and Meltdown Mean for WebKit by UncleEntity on Tuesday January 09, 2018 @09:36AM (#16106405)
> Be aware that Adblock doesn’t block all JavaScript code.

That's fine as long as it keeps the annoying stuff to a minimum and Privacy Badger seems to do a good job on the tracking stuff.

Re:What Spectre and Meltdown Mean for WebKit by Matt3o12_ on Tuesday January 09, 2018 @09:52AM (#16106511)
I get that (and that’s why I use it too) but you made it sound like Adblock is blocking malicious code and thus you do not need to worry about Spectre and meltdown, which is defentily not true (though it does prevent some malicious code).
Re:What Spectre and Meltdown Mean for WebKit by xtanx on Tuesday January 09, 2018 @07:30AM (#16105657)
> no one is saying we should deactivate native apps written in unsafe languages

No we should definitely not, but we should encourage using something like rust or whatever comes after rust.

Re:What Spectre and Meltdown Mean for WebKit by iainmerrick on Tuesday January 09, 2018 @08:45AM (#16106066)
The language is a red herring here.

Javascript is a safe language, but it's powerful enough to exploit Spectre and Meltdown. Rust would be the same. It's not badly-written programs we need to worry about in this context, it's well-written malicious programs exploiting badly-designed hardware.

We don't need apps written in safe programming languages to fix this problem, we need secure browsers, OSes and hardware. (And yes, those bits should be written in safe languages.)