News for hackers. Stuff that matters.
Re:The Browser Is the Worst Sandbox Ever Designed by amluto on Friday July 15, 2016 @05:05AM (#12099686)
I mostly disagree. A sandbox like seccomp with a truly minimal set of system calls allowed through (read, write, close, exit) is a tiny attack surface and provides functionality roughly equivalent to raw Nacl. As far as I know, no holes have been found in seccomp configured like that. The problem isn't the sandbox per se, it's the set of services (3D! Audio! USB!) that are allowed through the sandbox. This proposal does nothing to help address that problem.
Re:The Browser Is the Worst Sandbox Ever Designed by lucian1900 on Friday July 15, 2016 @05:19AM (#12099735)
Exactly.

Every sandboxed app ever has needed native access of some sort to do something useful.

The best example of this difficulty is probably graphics (WebGL). To provide a compelling user experience, the API must allow apps to upload almost arbitrary code (shaders).

Re:The Browser Is the Worst Sandbox Ever Designed by dahart on Friday July 15, 2016 @10:35AM (#12101232)
I'm genuinely curious what WebGL shaders can be used to do maliciously, and in what ways they can be considered arbitrary code?
Re:The Browser Is the Worst Sandbox Ever Designed by dietrichepp on Friday July 15, 2016 @11:00AM (#12101444)
They are arbitrary code, they just have to be written in GLSL. One of the vectors is the fact that less effort has been put into isolating and securing GPU memory, since previously, it was not considered sensitive. This is compounded by the fact that WebGL shader code and API calls are often processed by a layer with escalated privileges, written in C or C++, completely opaque, with lots of unknown bugs.

http://www.kitguru.net/gaming/security-software/carl/webgl-e...

http://www.contextis.com/resources/blog/webgl-more-webgl-sec...

http://www.pcworld.com/article/227438/dangerous_webgl_flaw_p...

Re:The Browser Is the Worst Sandbox Ever Designed by dahart on Friday July 15, 2016 @12:25PM (#12102110)
Can you be more specific about what you mean by arbitrary code? I agree the code can be arbitrary GLSL, but what are the actual risks? GLSL doesn't have access to the CPU, network, filesystem, peripherals, or anything other than (indirectly) VRAM, as far as I know. If I'm wrong, please help me understand.

My feeling having written a few GLSL shaders is that the language is already sandboxed by design, making it a safer environment to execute 'arbitrary code' than just about any other viable option. In a shader, I get access only to the input I'm given, and can only affect the color of a pixel, and nothing more.

The 'graphics memory theft' exploit (your 2nd link) cannot have been a primary result of a GLSL exploit, as I understand it. That would have required use of an improperly authorized API call like glGetPixels(), and so arbitrary code execution is not the issue there. WebGL's API design and the browser's sandboxing are accountable -- and anyway, it sounds like that got fixed a long time ago?

The first link says the main risk is crashing, so some sort of DOS attack I suppose. That is true of all computing systems, and also isn't exclusive to arbitrary code execution. I'd speculate it's probably easier to get WebGL to crash using the API than shaders. Either way yes, this is a risk, but not particularly specific to WebGL and not the worst kind of security risk in most environments unless combined with something else. (I grant that crashes in hospital equipment, for example, is a high security risk. Then again, most hospitals don't actually let their sensitive equipment browse the web for a reason.)

What other real risks are there, to the average person surfing the web?

Re:The Browser Is the Worst Sandbox Ever Designed by greggman on Friday July 15, 2016 @11:47AM (#12101806)
Those 3 links are all to the same issue that was closed long ago and funded by MS as FUD.

There haven't been any real WebGL exploits I know of. No you can't upload arbitrary shaders either. They're validated and then re-written by the browsers.

Re:The Browser Is the Worst Sandbox Ever Designed by amluto on Friday July 15, 2016 @11:55AM (#12101863)
And what does the validation and rewriting? Code in the sandbox? Code outside the sandbox? Code in a different sandbox?
Re:The Browser Is the Worst Sandbox Ever Designed by btrask on Friday July 15, 2016 @05:18AM (#12099732)
The idea is that Rust (or something like it) is genuinely necessary to address it, because the necessary API is complex, as you say.
Re:The Browser Is the Worst Sandbox Ever Designed by TickleSteve on Friday July 15, 2016 @06:27AM (#12099951)
Rust does not write secure code.....

developers do...

... and they (might) use something like Rust... they could also (believe it or not) use C.

Re:The Browser Is the Worst Sandbox Ever Designed by pjmlp on Friday July 15, 2016 @08:03AM (#12100367)
The problem with C to write secure software, it not only the set of language features for numeric, array and pointer manipulation that make it so easy to write exploits.

It is also the long set of compiler specific behaviors, sometimes version specific even, and UB. All of each very hard for a human to keep all the time on its head.

Hence why we have things like static analyzers, MISRA and Frama-C and still falls through the cracks.

Re:The Browser Is the Worst Sandbox Ever Designed by loudmax on Friday July 15, 2016 @07:58AM (#12100343)
Of course it's possible to write secure code in C, just as it's possible to write non-secure code in Rust. You can also drive a car at high speed with no seatbelts or airbags. If your code absolutely needs to be written in C, then do it, and do it carefully. If you're starting a new project and security is a concern, you ought to consider wearing a seatbelt.
Re:The Browser Is the Worst Sandbox Ever Designed by Ygg2 on Friday July 15, 2016 @09:00AM (#12100614)
Sure and you can build house out of anything, including Lego Blocks and Saltine Crackers. It's just that securing a brick house against rain is a lot easier than doing the same with house made of Saltine Crackers.
Re:The Browser Is the Worst Sandbox Ever Designed by FreeFull on Friday July 15, 2016 @09:59AM (#12100965)
http://www.dailymail.co.uk/news/article-1214729/James-May-si... James May once had a house made from Lego
Re:The Browser Is the Worst Sandbox Ever Designed by Ygg2 on Friday July 15, 2016 @10:49AM (#12101354)
Yes, and it had numerous plumbing problems. Your point?
Re:The Browser Is the Worst Sandbox Ever Designed by mavhc on Friday July 15, 2016 @10:46AM (#12101329)
The Daily Mail once suggested it was a good thing "the gay gene" had been found so gay babies could be aborted, find another website
Re:The Browser Is the Worst Sandbox Ever Designed by bluejekyll on Friday July 15, 2016 @10:02AM (#12100981)
(safe) Rust allows developers the freedom to focus on logic, and not memory safety or undefined behavior. Being able to focus on just logic is why people have turned to memory safe languages for years. Rust finally does it with almost no runtime cost over that of C.

Even unsafe Rust offers more guarantees than C. But is a spot where you can remove the guard rails.

C was/is an amazingly performant language, but you're kidding yourself if you believe that most developers can write software as securely in it as they could in Rust.