69 points · by patrickaljord · 15y ago · 44 comments
Even if Microsoft fixes this particular issue, they either can't fix every possible variation or the same techniques that make this fixable can be used to fix it in WebGL.
As long as you can send an arbitrary shader (which is essentially a small piece of executable code that GPU executes) to a GPU, you can overload the GPU. This capability is available in WebGL, Silverlight 5 and Flash.
You don't want to remove this capability, because it's the core reason GPUs can do some things so much faster than a CPU.
You can try to sanitize shaders as much as possible (and I'm sure both Silverlight and WebGL implementation will do their best) but it's not even theoretically possible to decide a time complexity of arbitrary assembly code.
Writing code is about features vs. risk trade offs. Microsoft clearly has decided that the risks are acceptable for Silverlight but somehow the same category of risks is not acceptable for WebGL.
And if you ask me, I agree with WebGL folks and the Silverlight part of Microsoft. The worst that can happen is slowing down your computer. This is an annoyance but also an issue we encounter daily: both my Mac and Windows software, including the OSes, crash and misbehave rather regularly. I accept that because the annoyance that it causes is much less important than my desire to use the software.
It's also an annoyance that can be generated with technologies that already are part of the browser. A web page can exhaust any computer's memory (causing swapping) but sending arbitrarily large images. It's easy to write JavaScript that will eat CPU cycles. It's easy to DOS a browser by creating arbitrarily complex DOM and update it frequently enough. All those issues can be mitigated by browser implementors but none of them can really be fixed. And yet we happily use the internet and we'll happily keep using it after WebGL is implemented.
Luckily, the kernel component of graphics drivers (at least the NVIDIA one) is comparatively small these days, and mainly concerns memory/buffer allocation and resource scheduling. Apart from that, it provides a memory-mapped command queue directly to the GPU. Memory protection is enforced in hardware.
The user-space part of the driver, on the other hand, is the complex beast that handles all the GL rendering commands. It's much more likely that an exploit would happen there (still not good, but heh it sounds less scary and can be controlled with user-space security restrictions).
notice that khronos and the webgl implementers have not responded with content-less dismissals of these concerns. they have outlined the exact steps they've taken to secure their API from the limits of the GPU model and their work to prevent buggy GPUs/drivers from executing webgl content at all. If someone can actually demonstrate (or even speculate on a mechanism of action of) an actual attack that isn't addressed by their current systems or (in the case of DoS attacks) their ongoing work with OS and GPU vendors, then we can talk about fundamentally flawed. Until then it's a matter of risk assessment.
If a group is claiming that this kind of system interaction is securable (for some given definition of "securable"), we can evaluate both that claim and if that level of security is sufficient. For instance, we can enumerate the ways that WebGL can interact with buffers; given those, what attacks are possible at those points and how are they being defended against?
Obviously a web forum isn't the best place for this, but it's important to keep in mind.
Microsoft's reply is at the top of the comments to the article and reads:
"DoS mitigations are implemented in current internal builds and will ship with Silverlight 5 RTM."
I get that the anti-Microsoft droids are out in full force after the article from that Google employee, but come on, a little reading goes a long way.
Either way it's hypocritical.
It would seem like the WG should work with MS and Adobe to get Silverlight and Flash working really well. Get it out in peoples hands for a year or two. And then come back and say, "OK, we generally get 3D on the web now. Now lets standardize it."
It really feels like this WG is in a race to hurry to get something out the door as fast as possible.
WebGL is a standard developed in an open way. If someone wants to contribute, including Microsoft, they can send an e-mail to a mailing list and that will reach other people working on WebGL and hopefully a productive conversation would ensue.
Microsoft choose not to do that. Instead they issued a blanket statement to the whole world that WebGL is insecure. They made no effort to improve the security of WebGL and didn't leave any opening for the discussion. They just communicated a decision.
Silverlight or IE engineers are not easily reachable and cannot be engaged in an open, technical dialogue the way WebGL folks can.
The only venue that Microsoft provides to give feedback and bug reports is their connect website. This is the venue that Benoit used because it was the only venue available to him, as an individual.
No one, including WebGL engineers, has special powers to engage Microsoft in discussion about their products. No one needs special powers to engage WebGL folks in discussion about WebGL. So you really have your power structure backwards.
Notice also how this bug report is constructive: it shows a specific problem that Microsoft can fix.
Notice how Microsoft's FUD wasn't constructive: they just labeled WebGL insecure using non-specific (therefore non-fixable) arguments.
That's not at all true, is it?
My complaint isn't with the bug report per se. I think filing bugs is a very valid mechanism for handling defects.
WebGL is a standard developed in an open way. If someone wants to contribute, including Microsoft, they can send an e-mail to a mailing list and that will reach other people working on WebGL and hopefully a productive conversation would ensue.
My point is that open standards shouldn't be blazing new trails with somewhat unknown security surfaces (etc). Open standards should take what works and say, "This is now the accepted way to do it, we have good evidence that this way works best in practice."
They made no effort to improve the security of WebGL and didn't leave any opening for the discussion. They just communicated a decision.
They just communicated their decision. Just as Apple said they wouldn't support Flash. In fact MS went into a fair bit more detail why they wouldn't. Honestly, I think that was a mistake. They simply should have just said they wouldn't support WebGl, and left it at that.
But my broader point is that I don't like standards bodies trying to bully organizations into supporting a nascent standard that AFAICT hasn't really been vetted or sufficiently thought through yet.
The C++ standards committee ran into this last time with export. They pushed in a feature no one had used in practice and hadn't really been vetted by thousands of hours of testing. The end result, a dead feature, and lots of wasted person hours.
Take the time, do it right, let the vendors push forward first, and learn.
The C# code is here: http://people.mozilla.org/~bjacob/SilverLight5DOSJustLikeWeb... And the pixel shader: http://people.mozilla.org/~bjacob/SilverLight5DOSJustLikeWeb...
EDIT: I forgot to mention that this is very similar to the WebGL DOS example, https://cvs.khronos.org/svn/repos/registry/trunk/public/webg...
"DoS mitigations are implemented in current internal builds and will ship with Silverlight 5 RTM." - Microsoft
This issue is already addressed. It's a non-issue being drummed up by Microsoft competitors. Even John Carmack agrees with Microsoft about WebGL.