logoalt Hacker News

The Deathray: A simple way for an untrusted site to freeze a Mac

125 pointsby auberoneduyesterday at 7:34 PM79 commentsview on HN

Comments

gucci-on-fleektoday at 4:14 AM

Huh, this completely crashed my Firefox on Linux, which I've never had happen before. At least the rest of the programs on my desktop seem to have been completely unaffected.

washadjeffmadtoday at 2:47 AM

Back in the 90s when the web was non-commercial and fun, I added a "Don't Click Me" link that loaded a 'browser test' page (after a series of "are you really really sure?" dialogs) that exploited every historical browser bug I could find. Infinite popups, inescapable dialogs, ActiveX quirks, various hangs and crashes, the works.

If it didn't crash your computer, it eventually displayed a single popup that said "Congrats on not using Internet Explorer!". I wish I still had the hate emails.

show 3 replies
mitxelatoday at 3:35 AM

Is there a reason you need the fake for loop and the vertex shader? Can a single infinitely looping shader not do the same thing?

And what happens in WebGL?

show 2 replies
xoatoday at 12:10 AM

While I'm sure it has its uses, particularly if someone really does want to game or do complex computational stuff purely within a web browser, I'll admit I've grown pretty cautious/tired around the ever increasing amount of hardware attack surface area the browser vendors seem to be rushing to expose as Google in particular appears determined to try to be the "operating system on the operating system" as much as it can. In this particular case it made me realize I'd awhile ago set dom.webgpu.enabled and pdfjs.enableWebGPU to false in Firefox, same as I disabled WebGL. Kinda figured if I ever saw something ultra cool I could enable it just that one time but so far I haven't. Semi-related, reviewing the available settings now for the first time in a bit I notice they have a dom.webgpu.blocked-domains with the sole entries being "easyeda.com,*.easyeda.com", I wonder what that's about?

show 3 replies
davsti4today at 2:32 AM

I supposed you could just turn it off?

In Chrome on Linux:

WebGPU is experimental on this platform. See https://github.com/gpuweb/gpuweb/wiki/Implementation-Status#... deathray/:9

Failed to create WebGPU Context Provider main @ deathray/:9 (anonymous) @ deathray/:113

Uncaught (in promise) TypeError: Failed to execute 'configure' on 'GPUCanvasContext': Failed to read the 'device' property from 'GPUCanvasConfiguration': Required member is undefined. at main (deathray/:17:17)

monster_truckyesterday at 11:31 PM

Remember when that unicode string nuked iOS 7 and you could set it as your SSID to get them stuck in a loop? good times.

show 1 reply
SugarReflextoday at 12:31 AM

On a Windows 11 work machine - this is causing my Teams to blink black and come back randomly. Yes I used my work machine.

slicendiceyesterday at 11:45 PM

I want to click it so bad, but I can't bring myself to do it.

show 3 replies
StilesCrisistoday at 12:20 AM

Metal is based on C++14, which means you can write Duff's Device in a shader. I've tried it on various Macs and it causes all sorts of critical failures in the compiler, but never an actual kernel panic. (It's pretty trivial to reproduce in KodeLife)

krackerstoday at 12:15 AM

>This spills over into other processes wanting to use the GPU, namely the WindowServer.

Why does this spill over? Unlike CPU which is multiplexed by the kernel's scheduler (so infinite loops can't lock out other programs), is the GPU not multiplexed in the same fashion?

show 2 replies
eliwangtoday at 3:03 AM

Jesus Christ! My mac reopen the windows when it restarts. And it opens the Deathray again! I had to quit safari immediately I saw the dot below its icon. And it took me yet another restart to fix the weird problems in other apps.

xcc3641today at 3:24 AM

Does this reproduce with just the compute pass, or does WindowServer deadlock on the canvas drawable?

show 1 reply
ilnmtlbnmyesterday at 8:00 PM

Amazing!

I encountered the same type of death freeze when trying (and failing) to run models in browser tabs, but didn't spend much time trying to understand how severe it is.

Hope they don't disable WebGPU...

splittydevtoday at 1:03 AM

It kind of froze my Mac Studio M2 Ultra, but I was able to still move the mouse and force-quit Safari using Command+Q. Once I did, everything immediately went back to normal.

TedDoesntTalkyesterday at 11:39 PM

Is this why Oregon Trail Deluxe freezes on Mac?

https://oregontrail.ws/games/the-oregon-trail-deluxe/play/

sgentleyesterday at 11:41 PM

Could be a useful way to force user-interaction-gated flows. A "your computer is infected, click this button in 10 seconds or it will crash" type button which, at this point, most modestly-knowledgeable users would know not to click. However, after seeing their computer actually crash when the countdown hits 0, perhaps they would be more inclined to click "allow" on whatever prompt follows when they see it again.

Of course, plenty of other uses. Disable your adblocker or we crash your computer. Watch the whole ad or we crash your computer. Click the follow button or we crash your computer.

Maybe I'm crazy, but "crash your computer" as a building block seems powerful enough to be a security issue. Is denial of service not a security thing anymore?

itstrueitriedyesterday at 11:59 PM

    while (true) console.log('this will freeze/crash dev tools') 
For more of a "I've been hacked!" effect, load infinite 3D models in Three.js that have millions of vertices each. You get those black boxes where the system has so low RAM it can't even draw the browser window.
show 2 replies
LoganDarkyesterday at 11:56 PM

Apple Silicon Macs have a lot of GPU problems. I find that after running any significant GPU workload, the entire operating system starts getting super slow until a reboot. Even if the entire process tree that ever touched the GPU has been completely terminated for days.

achieriustoday at 12:29 AM

Not 100% surprised that this wasn't picked up as a security issue; denial-of-service is bad, but ultimately doesn't give you a direct path to stealing secrets / hijacking identity / etc.

It is pretty egregious though, I hope they fix this. I expect there'll be a Radar tracking this now that it's made it to the HN front page.

stevomacdaddytoday at 12:44 AM

This froze my S26 Ultra on chrome

selectodudeyesterday at 11:04 PM

Zero impact on iOS 27.

show 5 replies
vivzkestreltoday at 3:39 AM

[flagged]

show 1 reply
hyperhelloyesterday at 11:12 PM

The code is just an infinite loop counter. You can cause all kinds of Safari issues with an infinite loop in JavaScript too, which is sure annoying when trying to figure out large codebases. There was a student in Japan who showed that you could do this trivially and they were arrested.

show 4 replies
fuzzfactoryesterday at 8:31 PM

Maybe that would be better than a meltdown . . .