New issue
Advanced search Search tips

Issue 825845 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Feature



Sign in to add a comment

Disable WebAssembly via flags or user prompt

Reported by detroniz...@gmail.com, Mar 26 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36

Steps to reproduce the problem:
1. Find example WebAssembly application (ex. https://coinhive.com/)
2. Check WebAssembly correctly works (ex. it mines just fine)
3. Load chrome:://flags
4. Disable all WebAssembly related flags: enable-asm-webassembly, enable-webassembly, enable-webassembly-streaming
5. Apply changes and relaunch Chrome
6. Repeat 1. and 2. and let the sadness take over you

What is the expected behavior?
That any WebAssembly based application should stop working.

What went wrong?
WebAssembly disabling flag doesn't seem to do anything or have any effect.

Did this work before? N/A 

Chrome version: 65.0.3325.181  Channel: stable
OS Version: OS X 10.13.3
Flash Version: 

With the advent of Ads networks that use WebAssembly to leverage user's CPU and do crypto-mining, it will be increasing the number of people that have to resolve to AdBlock plugins to ensure their hardware is not jeopardized.

Just disabling WebAssembly (or allowing on a per-domain basis!) would greatly improve the situation, and permit users fine grained control over how this works.

But even before you do that, please fix those flags.
 

Comment 1 by woxxom@gmail.com, Mar 26 2018

You can add the following command line switch to your Chrome shortcut: --js-flags=--noexpose_wasm
I'll try that immediately woxxom. But is there a list of those `js-flags` somewhere?
I have found it in the source code https://chromium.googlesource.com/v8/v8/+/master/src/flag-definitions.h - but a doc for this stuff would be lovely.
Labels: Needs-Triage-M65
Nope, not even that way.
Tried all the flags and it's simply ignored.

I believe there is an actual bug here.

Comment 6 by woxxom@gmail.com, Mar 27 2018

Works here. Make sure you've terminated all Chrome processes completely before relaunching with the new command line. Make sure the command line is actually used in chrome://version

Comment 7 by woxxom@gmail.com, Mar 27 2018

Also, do note, coinhive uses a js fallback when wasm is not available, so to check if the command line in #1 works you need to use a different site e.g. https://wasdk.github.io/WasmFiddle/ or http://webassembly.org/demo/
Woxxom I will definitely try again after having shut down ALL chrome instances. I was doing this test via Selenium (that launches ChromeDriver and a separate Chrome process) but I will make sure I verify your hint.

Thanks for the help so far.

Regarding the JS fallback in coinhive.com, I'm aware, I did check when was testing that was ACTUAL wasm being run and not their fallback.

The more I look at Wasm to more I think this is just too much power unleashed with almost no restriction. This should be behind a user approval... at the very least.
Well, I come bearing bad news.

I tried and it didn't work either. I have tested this against both the CoinHive website (checking it was not using the fallback) and the WasmFiddle kindly suggested above.

The options I tried are:
* `--js-flags="--noexpose-wasm --nowasm-async-compilation --nowasm-stream-compilation"`
* `--disable-features=AsmJsToWebAssembly,WebAssembly,WebAssemblyStreaming`
* both at the same time

Nothing changed.

I'll attach some screenshots of the results as well as `chrome://version` to show the arguments are definitely being processed by Chrome.

If you have any other suggestions of things to try, I'm all ears.

And thanks for the help so far
Screen Shot 2018-03-28 at 15.50.25.png
519 KB View Download
Screen Shot 2018-03-28 at 15.50.34.png
411 KB View Download
Screen Shot 2018-03-28 at 15.50.51.png
415 KB View Download
Screen Shot 2018-03-28 at 16.04.09.png
422 KB View Download
Screen Shot 2018-03-28 at 16.04.12.png
444 KB View Download
Screen Shot 2018-03-28 at 16.07.27.png
245 KB View Download
Screen Shot 2018-03-28 at 16.08.27.png
444 KB View Download

Comment 10 by woxxom@gmail.com, Mar 28 2018

Since the --js-flags trick works in Windows, I guess there's a bug in Chrome for MacOS and/or when Chrome is used with Selenium.
Looks like it :(

Thanks for all your help

Comment 12 by lgrey@chromium.org, Mar 28 2018

Components: Blink>JavaScript>WebAssembly
Labels: -Type-Bug Type-Feature
Owner: nattestad@chromium.org
Status: Assigned (was: Unconfirmed)
Summary: Disable WebAssembly via flags or user prompt (was: Disabling WebAssembly via flags doesn't work)
Assigning to PM for further triage.
Owner: bradnelson@chromium.org
From my reading it seems like the flags are just broken. @Brad, can you pick someone to assign this to? I'd say priority of 2 seems appropriate. 

Comment 15 by titzer@chromium.org, Jan 16 (6 days ago)

Owner: titzer@chromium.org

Sign in to add a comment