326 points · by Arubis · 7y ago · 146 comments
Instead of standardizing something low-level to input/output audio and query the hardware, like an OS; it standardizes soooo many things and filters, including downmixers, panners, quadfilters and Convolution (for reverbs); which is where the issue is in this exploit.
The resulting complexity is huge, almost impossible to implement correctly in a cross-browser way, and a lot more code in C/C++ is written.
I do advocate simpler APIs for audio, low-level, and let JS or Wasm do the filtering, using the JS sandboxing model.
And, of course, this does not apply only to WebAudio, but I think WebAudio is a good symptom.
Their users are already on Windows and Microsoft already has telemetry on them. And we’re talking about the browser guts and not the surface, which is where most of UX lives. But none of this means that Microsoft is browser incompetent.
There’s really no excuses in this case for WebAudio, of all things, to be able to write to disk. And it’s dubious that Chrome should be able to launch any processes outside of the few specific child jobs it needs for process isolation.
My tests for codecs is now around 20% slower than native code, for the naive implementation. And SIMD.wasm helps a lot.
Parties opposing that must be expelled from standard bodies.
P.S. Just look at completely outrageous effort to push payment APIs into the browser and stuff they want to bundle along https://www.w3.org/2019/09/15-wpwg-minutes.html
This is the opposite: this FFT and convolution code is in C++, and therefore OUTSIDE of the JS sandbox.
My point is that there should be a minimum in C++ and MORE inside the JS sandbox.
So having a simple audio API + ability to do pro-audio like things in JS is not really possible in a browser. They have to expose a complex framework with a nuanced API to the underlying engine to make some of this stuff even possible in a web browser.
Absolutely not: wasm does not have GC pauses.
This is why C++ needs to be retired; and why we need to use safer languages. Not even Google can write safe C++. Thankfully Mozilla have already realised this.
These problems can easily happen in a language like Go, unfortunately. Go is memory safe for sequential code, but that guarantee does not extend to in-process concurrency - Goroutines can access shared state without synchronization, and create memory unsafety.
That gets debatable as soon as you start using concurrency, like I said. There are idiomatic patterns in concurrent Go that are very much not safe.
The kind of logic bug that the Rust compiler prevents due to stronger typing is typically a crash in Go, not a security issue.
Furthermore you're talking about memory safety vs business logic bugs, two different things.
None of the languages around, that are in major production use, are really completely memory safe in practise. There is always a runtime lurking under it, most times a libc (not in Go tho, IIRC) and assortment of various libraries written in memory unsafe languages and always a kernel.
While it's probably harder to exploit Go, as, as far as I know, most of the Go runtime is written in Go, it's not impossible, just a lot less likely.
Go has a garbage collector (i.e memory safety) & race detection tooling built in. https://golang.org/doc/articles/race_detector.html
Even if a race condition bug does sneak in, it won't be as catastrophic as C/C++.
Writing concurrent code is hard in any language. There's no magic bullet & Go or Rust are not immune to concurrency bugs. If anything, tools like the race detector should always come built in and every dev working on concurrent code should use one.
Google has a C++ race detector based on the Go one and it did not detect this issue (or was ignored).
Neither of those things you listed reduce the severity of the bug, and both are available in well written C++ code as google tends to do.
A lot of the exploits would be rendered harmless by employing well established technique of splitting one huge monolithic app into processes with limited capabilities and communicating via simple and narrow channels. Qmail[1] is a good example of such architecture. The architectural support is already present in common OSes.
--
It doesn't matter if userspace is fully safe, when the basement looks like a Swiss cheese of security.
Occasionally you do just end up with straight-up exploitable optimizer bugs, though. The literature has some powerful techniques to let us get rid of those too over time, but it's not as simple as rewrite-it-in-Rust. One thing that might help is simple layering: if the JIT could compile to something like wasm as an intermediate target, then you would have an extra layer of defense against optimizer bugs. This is something that's been talked about, but I don't know if anyone has seriously looked into how practical it is.
Technically it was a samsung engineer that introduced the vuln.
fix: https://chromium-review.googlesource.com/c/chromium/src/+/18...
git blame: https://chromium.googlesource.com/chromium/src.git/+/e1fa6d4...
https://www.reddit.com/r/privacy/comments/di5rn3/startpage_i...
For example current version of Iridium is 2019.04.73.0(based on Chromium 73.0.3683.103), it doesn't get updated that often but a useful and stable browser.
Anyway to mitigate this exploit via any setting or extension?
Edit-just realized you actually asked for how to tell if you were infected. Check the windows task scheduler for unknown tasks. It installs items there for persistence. Edit-search your history and hard drive for “behindcorona” domains. That’s where it loads things from. There are more specifics in the page.
http://franklincoveysouthasia.com/TrainingConsulting/Trainin...
The fix was sent for review Oct 29 4:29 PM PDT and submitted at 5:47 PM[6]. It was cherrypicked Oct 30 at 9:51 AM[7].
>Date Entry Created
> 20190718
> Disclaimer: The entry creation date may reflect when the CVE ID was allocated or reserved, and does not necessarily indicate when this vulnerability was discovered, shared with the affected vendor, publicly disclosed, or updated in CVE.
[1] https://cve.mitre.org/cgi-bin/cvename.cgi?name=2019-13720
[2] https://chromereleases.googleblog.com/2019/10/stable-channel...
[3] https://bugs.chromium.org/p/chromium/issues/detail?id=101922...
[4] https://bugs.chromium.org/p/chromium/issues/detail?id=101922...
[5] https://bugs.chromium.org/p/chromium/issues/detail?id=101922...
[6] https://chromium-review.googlesource.com/c/chromium/src/+/18...
[7] https://chromium.googlesource.com/chromium/src/+/f1b501721e5...
Non-same origin Javascript does not have economic purpose either. I believe, that it will be completely eradicated from browsers within this century (if not in couple of decades).
So I definitely think the smartest of more recent generations who are employing their skills in these software hacks and ad tracking are perhaps saintly in comparison :-)
Don’t lose weight, just buy bigger trousers!
Don’t take personal responsibility, just blame society!
Personal responsibility is important. And even if you're bored, there are things to do other than hacking.
But working mind-numbing jobs , way below one's skills and talents happens to such a large share of people.
Maybe it's a sign to a problem with society ?
Why would they. People who break DRMs for fun and profit look with disdain at their whitehat counterparts.
Same with ad fraud. People in that particular business take pride at being able to fool boatload of best and brightest computer scientists who work at bot detection
As for people in good old browser exploit scene, I think they have good time laughing at vain efforts, and ineptness of their counterparts too
I think people are wrong thinking of it as a money thing
https://en.m.wikipedia.org/wiki/Return-oriented_programming
Note that this was a heap attack (free after use)
Simply gaining control of the instruction pointer through a stack overflow as you describe stopped working a decade or so ago due to these mitigations.