The Deathray: A simple way for an untrusted site to freeze a Mac
273 points
• 4 days ago
• Article
Link
一项名为 Deathray 的新漏洞显示,一个简单的 WebGPU 着色器就能冻结 Mac 的桌面界面,使机器在强制重启前无法使用。用户只需访问恶意网站,就可能在 macOS 上的主流浏览器(包括 Chrome 、 Firefox 和 Safari)触发这种死机。虽然该手法会持续锁死 Mac,但对其他操作系统通常只会导致浏览器标签页卡死,关闭标签页即可恢复。
该漏洞通过同时使用 compute shader 和 render shader 造成 GPU 死锁:compute shader 进入无限忙循环,不断向共享缓冲区写入数据;与此同时,vertex shader 试图从同一缓冲区读取,由于 compute 进程永远不会完成,读取操作被阻塞。这种"交通拥堵"进一步蔓延到 WindowServer 进程,导致桌面环境无响应并偶尔出现图形伪影。
这一问题暴露了 Apple 面临的反复挑战。早在 2023 年就曾发现一个针对 WebGL 的类似漏洞 ShadyShader,当时产生了 CVE 并尝试通过输入校验进行缓解,但 Deathray 表明 WebGPU 目前缺乏防止此类失控循环的有效防护。专家认为,问题可能与 M-series chips 的架构有关:操作系统内核无法直接抢占 GPU,这一职责由独立协处理器上的固件承担。
Deathray 在 2026 年 7 月被披露给 Apple 。 Apple 最初承认问题并表示会修复,但随后改变立场,将此类行为归类为潜在的挂起或崩溃,而非正式的安全问题,因此不会列为优先处理。这一回应引发争议,凸显了严格的安全技术定义与公众期望浏览器作为可靠、隔离的 web 内容沙箱之间的冲突。
尽管 Deathray 不会导致数据窃取或远程代码执行,但它只需一次点击就能扰乱系统,带来严重不便。发现该漏洞的研究人员主张应通过长期修复来改进系统对无响应着色器的处理,而非简单禁用 WebGPU 。在采取此类修复之前,这一漏洞再次提醒我们:在现代硬件上浏览互联网时,用户对 web 浏览器的信任是多么脆弱。
A newly discovered vulnerability dubbed the Deathray demonstrates how a simple WebGPU shader can freeze a Mac's desktop interface, rendering the machine effectively unusable until a forced restart. By merely visiting a malicious website, a user can trigger this hang across major browsers including Chrome, Firefox, and Safari on MacOS. While the technique consistently locks up Mac systems, the impact on other operating systems remains limited to browser-tab freezes, which are easily resolved by closing the tab.
The exploit functions by utilizing a combination of compute and render shaders that essentially create a GPU deadlock. The compute shader executes an infinite busy loop, constantly writing data to a shared buffer. Simultaneously, a vertex shader attempts to read from that same buffer, becoming trapped because the compute process never completes. This traffic jam overflows into the WindowServer process, causing the desktop environment to become unresponsive and occasionally displaying graphical artifacts.
This issue highlights a recurring challenge for Apple, as a similar exploit involving WebGL, known as ShadyShader, was identified in 2023. While that incident led to a CVE and an attempt at mitigation through input validation, the Deathray suggests that WebGPU currently lacks the robust defenses needed to prevent such runaway loops. Experts believe this difficulty may stem from the architecture of M-series chips, where the OS kernel cannot directly pre-empt the GPU, leaving that responsibility to firmware on a separate coprocessor.
Following the discovery of the Deathray, the issue was disclosed to Apple in July 2026. Although the company initially acknowledged the problem and indicated an intent to fix it, they later reversed their stance. Apple now classifies the behavior as a potential hang or crash rather than a formal security issue, suggesting it will not be prioritized. This response has sparked debate, as it pits a strict technical definition of security against the expectation that a browser should act as a reliable, isolated sandbox for web content.
While the Deathray does not facilitate data theft or remote code execution, its ability to disrupt a system via a single click remains a significant inconvenience. The researcher who discovered the exploit advocates for a long-term fix that improves how the system handles unresponsive shaders, rather than simply disabling WebGPU. Until such a resolution is implemented, the vulnerability serves as a stark reminder of the fragile trust users place in web browsers when navigating the internet on modern hardware.
194 comments • Comments Link
WebGPU 和 WebGL 使浏览器中的代码能够直接与系统硬件交互;如果脚本在缺乏恰当抢占机制的情况下过度占用 GPU 资源,可能会导致整机死锁。 macOS 在遭遇高强度 GPU 任务后无法自我恢复,这一点尤其令人担忧;相比之下,Windows 和 Linux 往往能通过断电重启 GPU 从导致系统挂起的命令中恢复。
认为用户会主动避开有害网站的"自我纠正"观点忽视了一个事实:用户通常难以建立因果关系,尤其是在浏览器崩溃后会自动恢复标签页的情况下。长时间的冻结为社会工程学攻击提供了可乘之机:攻击者可以先把机器锁死,再以修复虚构的病毒或系统故障为由勒索受害者。浏览器厂商推动将更多硬件功能暴露给网页,扩大了攻击面,使浏览器越来越像一个不稳定的"操作系统之上的操作系统"。
整机冻结本身就是一个明确的可用性风险,不论是否会导致数据被窃取或账户被劫持,都应被视为安全问题。现代浏览器缺乏对高风险 API 的细粒度站点级控制,导致用户只能在"全开"或"全关"之间抉择,不得不在功能与稳定性之间妥协。许多用户无法判断系统冻结的真正原因,常把责任归咎于防病毒软件订阅等无关因素,这使得攻击者在强制重启后仍能维持对机器的控制。
尽管一些编译器引入了诸如有限循环计数器等缓解措施,但在不牺牲性能的前提下,复杂负载和内存总线饱和仍难以消除风险。当前 GPU 开发生态以追求性能为优先,而非架构稳定性;这种由市场驱动的取向进一步增加了在浏览器环境中发生整机死锁的可能性。
本次讨论聚焦于现代浏览器作为复杂硬件加速应用平台时,与系统稳定性风险之间的矛盾。虽然有人认为这些冻结问题无关紧要或可自我修复,但许多参与者认为其被滥用为拒绝服务攻击和社会工程手段的潜力,使其成为切实的安全与可靠性问题。普遍共识倾向于认为浏览器厂商在暴露硬件级 API 上走得过远,而底层操作系统(尤其是 macOS)还没有足够的弹性来安全处理这些 API 。关于 Web 是否应继续走向作为应用分发层的道路也存在更深的哲学分歧,因为基于浏览器的攻击会周期性地重演历史性的失败。 • WebGPU and WebGL allow browser-based code to interact with system hardware, which can lead to system-wide hangs if a script consumes excessive GPU resources without proper preemption.
• The inability of macOS to recover from heavy GPU tasks is a significant concern, especially compared to Windows and Linux, which typically power-cycle the GPU if a command hangs the system.
• A "self-correcting" view suggests users will simply avoid malicious sites, yet this ignores that users often struggle to connect cause and effect, especially when browsers automatically restore tabs after a crash.
• The persistence of these freezes creates a plausible vector for social engineering, where attackers can lock a machine and then demand payment to "fix" a fabricated virus or system issue.
• Browser vendors' drive to expose hardware capabilities creates a larger attack surface, turning the browser into an increasingly unstable "operating system on the operating system."
• System-wide freezes represent a clear availability risk that should be treated as a security concern, regardless of whether they allow for data theft or account hijacking.
• Modern browsers lack robust per-site control for high-risk APIs, leaving users with all-or-nothing security settings that compromise between functionality and stability.
• Many users are ill-equipped to diagnose why their computer freezes, often blaming unrelated factors like antivirus subscriptions, which allows malicious actors to maintain their grip after a forced reboot.
• While technical fixes like finite loop counters are implemented in some compilers, complex workloads and memory-bus saturation remain difficult to mitigate without sacrificing performance.
• The current environment in GPU development prioritizes speed over architectural stability, driven by market demand for performance, which exacerbates the potential for system-wide deadlocks in browser environments.
The discussion centers on the tension between the modern browser's role as a platform for complex, hardware-accelerated applications and the resulting risks to system stability. While some characterize these freezes as minor or self-correcting issues, many contributors argue that the potential for denial-of-service and social engineering makes them a legitimate security and reliability concern. The consensus leans toward the idea that browser vendors are overreaching by exposing hardware-level APIs that the underlying operating systems—particularly macOS—are not yet resilient enough to handle safely. There is also a broader philosophical disagreement about whether the web should continue down the path of becoming an application distribution layer, given the recurring cycle of browser-based exploits that mirror the failures of previous eras.