一句话:提出 Sugar,用 GPU 虚拟化为 Web 应用提供隔离的专用虚拟图形平面,从设计上增强 WebGL 安全并保持高性能。
现代个人计算机的 GPU 日益强大,Web 应用通过 WebGL 获得类 OpenGL 图形加速,但 WebGL 带来严重安全风险。浏览器现有防护多为被动式:修补漏洞并添加运行时检查,难以抵御零日攻击,且图形平面可信计算基较大。Sugar 是操作系统级方案,核心是为每个 Web 应用借助现代 GPU 虚拟化分配专用虚拟图形平面;该平面包含专用 vGPU 及包括设备驱动在内的软件图形栈,并与系统其余部分完全隔离。评估表明,尽管存在虚拟化开销,Sugar 仍实现高性能;若有两块物理 GPU,还可用一块承载 Web 应用虚拟平面、另一块提供系统主图形平面,以增强性能隔离。
Modern personal computers have embraced increasingly powerful Graphics Processing Units (GPUs). Recently, GPU-based graphics acceleration in web apps (i.e., applications running inside a web browser) has become popular. WebGL is the main effort to provide OpenGL-like graphics for web apps and it is currently used in 53% of the top-100 websites. Unfortunately, WebGL has posed serious security concerns as several attack vectors have been demonstrated through WebGL. Web browsers» solutions to these attacks have been reactive: discovered vulnerabilities have been patched and new runtime security checks have been added. Unfortunately, this approach leaves the system vulnerable to zero-day vulnerability exploits, especially given the large size of the Trusted Computing Base of the graphics plane. We present Sugar, a novel operating system solution that enhances the security of GPU acceleration for web apps by design. The key idea behind Sugar is using a dedicated virtual graphics plane for a web app by leveraging modern GPU virtualization solutions. A virtual graphics plane consists of a dedicated virtual GPU (or vGPU) as well as all the software graphics stack (including the device driver). Sugar enhances the system security since a virtual graphics plane is fully isolated from the rest of the system. Despite GPU virtualization overhead, we show that Sugar achieves high performance. Moreover, unlike current systems, Sugar is able to use two underlying physical GPUs, when available, to co-render the User Interface (UI): one GPU is used to provide virtual graphics planes for web apps and the other to provide the primary graphics plane for the rest of the system. Such a design not only provides strong security guarantees, it also provides enhanced performance isolation.