4 ms·
How would you define bare-metal? WebGL is proxied via ANGLE, so there's no risk of crashing or other forms of leaky processes, which is typically the primary th
by gfodor 6y ago
How would you define bare-metal? WebGL is proxied via ANGLE, so there's no risk of crashing or other forms of leaky processes, which is typically the primary thing I think of when I worry about low-level APIs.
- choeger 6y agoRegardless of how you define bare-metal, OP has a point here. Besides from bespoke web applications (which should be fully packages and signed, btw.), execution of turing-complete code inside the browser is pointless. At best, it helps to workaround certain limitations (bandwidth, browser quirks), or proves the UX of a page. But mostly it is just getting in the way or outright used against the user.
- lifthrasiir 6y agoANGLE is not a virtual machine but a translation layer from OpenGL ES (on which WebGL is based) to Direct3D. Inappropriate translation would result in a direct exploit unlike VM, since AFAIK there is no practical means to sandbox shaders. In some sense it is akin to JIT in a kernel which has the roughly same security ramification.
- labawi 6y agoDon't forget bugs in the driver and/or GPU firmware.
- TazeTSchnitzel 6y agoNote that most of a GPU driver runs in user mode, trapped inside the browser's process sandbox.
- reader_mode 6y ago>Inappropriate translation would result in a direct exploit unlike VM, since AFAIK there is no practical means to sandbox shaders. What does it mean to sandbox shaders in this context ? GL ES shaders are sent down in a high level language and can't really do much besides do computation on input parameters to generate output in a pipeline. I wish they were more general purpose and worthy of sandboxing but the web GL shaders are really limited.
- pjmlp 6y agoWell, not so. https://www.contextis.com/us/blog/webgl-more-webgl-security-flaws https://www.contextis.com/us/blog/webgl-more-webgl-security-... https://www.hpcwire.com/2018/05/31/gpus-excellent-performance-but-what-about-security/ https://www.hpcwire.com/2018/05/31/gpus-excellent-performanc... https://www.cs.utexas.edu/users/witchel/pubs/zhu17gpgpu-security.pdf https://www.cs.utexas.edu/users/witchel/pubs/zhu17gpgpu-secu...
- reader_mode 6y agoFirst link demonstrates reading from uncleared buffered to capture screen contents - and is from Windows XP era. Second one is about running a bitcoin miner on the GPU, hypothetical memory breaches, and GPU DoS. You can stall the graphics pipeline without shaders, run a miner on CPU, and I'm going to need a demonstration of a usefull GPU memory breach with WebGL. On top of that any such breach is likely driver dependent and will only work on some specific driver/HW combination - that's such a low attack surface I doubt anyone will bother developing exploits targeting that. I didn't bother going through third because I wasted enough time on first and second, I don't see how anything here suggest you need to sandbox shaders.
- pjmlp 6y agoUntil it eventually happens on your computer I guess.
- TazeTSchnitzel 6y agoModern GPUs have process isolation just like CPUs, and if that is not enough for you, GPU APIs allow an application (in this case the browser) to request bounds-checked execution for extra safety.
- cptskippy 6y agoWhat's used on platforms where Direct3D doesn't exist?
- jcelerier 6y agoOpenGL directly, no ?
- cptskippy 6y agoWhat about MacOS? Isn't OpenGL deprecated?
- olliej 6y agoANGLE is used to to a source to source translation irrespective of backend - it normalizes the source input to various GPUs (dropping things that have historically been funky like comment parsing, #controls, dodgy constructs, disallowed constructs, etc) [Source: I worked on the original spec and spent a lot of time trying to prevent the more egregious security and privacy problems]
- pjmlp 6y agoBesides Apple devices, not on game consoles.
- jcelerier 6y ago... but Google Chrome is not running on game consoles anyways ? Blink likely can, but then it does not necessarily use ANGLE, e.g. for instance QtWebEngine definitely does not use ANGLE on Mac / Linux but does native GL calls instead.
- pjmlp 6y agoPS 4 dashboard was done in WebGL. https://news.softpedia.com/news/The-PS4-UI-Is-Built-Using-WebGL-a-Web-3D-Graphics-Technology-400937.shtml https://news.softpedia.com/news/The-PS4-UI-Is-Built-Using-We...
- tedunangst 6y agoI'm not optimistic. https://medium.com/@afd_icl/crashes-hangs-and-crazy-images-by-adding-zero-689d15ce922b https://medium.com/@afd_icl/crashes-hangs-and-crazy-images-b...