This has been around since 2011 when WebGL shipped. It's documented in the spec. It's a self correcting problem. You go to a site, it freezes your machine, you never visit the site again.<p>No data is stolen, no privacy is lost. All that happens is the perp loses any audience.<p>Turning off WebGL = no more Figma, no more Canva, no more Google Maps. A few self correcting sites seem acceptable. Evidence, it's been 15 years since this was possible and the world didn't end and the whole internet isn't freezing your machine.<p>Also, this is arguably a MacOS bug. Window and Linux have had GPU monitors that power cycle the GPU if a command takes too long. Windows since before WebGL shipped. Linux a few years after. Macs still don't recover from excessive GPU use.
Do you think a regular user knows how to block a specific website or never click a link leading to it again? And what about the ads people, adding such a thing if you don't load their ads?<p>I think this point of view is making it a bit too easy.
A user doesn't need to know anything other than "when I go to site XYZ.com my computer freezes. Guess I won't go there again"<p>> I think this point of view is making it a bit too easy.<p>It's been 15 years since this was possible. How many times have you heard of this being an issue? Again, it's self correcting. Site freezes machine, user stops going to site. There's zero incentive to do this and tons of incentive to not do it. Even an ad, your ads would get banned, not good for you, no incentive.
An average user will not know that the site caused the issue. The first time after force turning off the computer, it will restart and reopen all windows causing the computer to crash again. The next time, they might click on the button to prevent reopening all windows and everything will be fine until they opens safari which will cause the same issue. At that point, they'll call whoever is their computer expert user to help them out.
I think a lot of HN commenters are way too disconnected from the average person. You're making a big assumption that a user will even connect the dots until the same thing happens multiple times, if even then. The average computer user is extremely bad at connecting cause and effect on their computer. Think of how many times you hear "my computer is broken!" when actually it's something like the printer was unplugged/turned off and they were just having trouble printing a document (or, if you are so disconnected from average users/people, the answer is _this happens a lot_). Even what we think of as simple stuff completely befuddles them.
> I think a lot of HN commenters are way too disconnected from the average person<p>This is basically an old-man-and-the-starfish situation for me.<p>> You're making a big assumption that a user will even connect the dots<p>If they do, it’s because their wildly inaccurate mental model happened to guess the right answer. What most will think is “I was just browsing the internet and my computer froze.” Maybe they’ll connect it with that notification they just got about renewing their antivirus software subscription. Maybe it will confirm their (probably mistaken) impression that their computer has been “acting weird” since something arbitrary and unrelated happened. And similarly, some people with an accurate mental model will mistakenly assume that they deduced the cause because they’re smarter, rather than having a different focus with corresponding lacking mental models in other areas.
> A user doesn't need to know anything other than "when I go to site XYZ.com my computer freezes.<p>Not true, given any unknown link or button press can redirect/go to such a site.
As someone who supports some bottom of the barrel "regular users".. they aren't monkeys. They have brains that function enough to process "oh, I shouldn't do that again".
Ad impressions typically cost money, so there's a case to be made that this is sort of self-correcting too.<p>That being said, IMO no website should be able to freeze your machine. This is a bug. Steps should be taken to fix it.
> It's a self correcting problem. You go to a site, it freezes your machine, you never visit the site again.<p>What do regular users do about a malicious ad that runs on thousands of different sites?<p>> Turning off WebGL = no more Figma, no more Canva, no more Google Maps<p>Which is why you should probably rather turn off the actual vulnerable API, i.e. WebGPU, not WebGL.
It really ought to be something you can enable or disable per site. I was surprised to find its not.
I just don’t think people are doing malicious ads like that. Like I’m sure it exists but like what’s the point? If you are the malicious person you pay money for ads to freeze someone’s computer and that’s it? It’s not even like you would gain anything from it
> All that happens is the perp loses any audience<p>You haven't heard about rickrolling, have you?
You can lose data though. Any open documents which aren't saved...
In general Web 3D is slower than native 3D APIs anyway, due to all the sandboxing and other restrictions.<p>A OpenGL ES 3.0 application without any issues, might be super slow when ported to run on WebGL 2.0.
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.<p>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.
I remember when `alert` would lock up the entire browser UI. So if you put it on an infinite loop, that was it. You had to kill the browser process to shut it off.
I remember in the 2000s, Dattebayo fansubs had a custom 404 page (for anyone trying to download an episode before they published it I guess), that would do similar. Endless popups, a really bad full volume audio loop, and every other trick to make it impossible to close the page. Was quite the jumpscare.
there was a common "shock site" called "last measure" that did this. it loaded all sorts of offensive images, blasted a loop of a guy yelling something offensive about pornography, and then proceded to lock up your machine.
Were there multiple of these sites?<p>If not, I have fond memories of using yours!
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.
> Just hope that your browser doesn't automatically reopen the same tab when it starts up again<p>Busted. My browser is configured to do just that.
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)
There are more of these hiding in WebGPU. Some work on iOS as well. I reported them to Apple but they were closed as not having security relevance.
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?
> notice they have a dom.webgpu.blocked-domains with the sole entries being "easyeda.com,*.easyeda.com", I wonder what that's about?<p>I found this issue: <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1980392" rel="nofollow">https://bugzilla.mozilla.org/show_bug.cgi?id=1980392</a>
and commit: <a href="https://phabricator.services.mozilla.com/D262053" rel="nofollow">https://phabricator.services.mozilla.com/D262053</a><p>It looks like per-domain WebGPU blocking was added exclusively just for easyeda.com !<p>Haven't read it all, but the story seems to be that EasyEDA's WebGPU usage was broken because it relies on some aspects which Firefox hasn't implemented yet. So they made this blocklist to get Firefox to behave as if it lacked WebGPU support completely on this domain, which makes EasyEDA fallback to some other non-broken version. Maybe they couldn't get in touch with EasyEDA directly, since it seems far easier to have them just disable WebGPU for some known versions of Firefox.
incredibly, the underlying issue seems to be lack of support for <i>shadowing built-ins and reserved keywords</i><p>which seems like an <i>insane</i> thing to need or support. literally just pick a different name, there are infinitely many!<p>i can understand just deciding to ignore the site
I'm with you. WebGPU has been used to compromise and fingerprint systems. Firefox (and related forks) are usually able to disable this kind of insecure fluff but it'd be nice if other browsers did as well.
On the other hand, <i>disabling</i> WebGPU is offering entropy for fingerprinting, too. A vanishingly small % of users will have done so.
><i>On the other hand, disabling WebGPU is offering entropy for fingerprinting, too. A vanishingly small % of users will have done so.</i><p>I think near any anti-fingerprinting efforts though presume some floor level of system security and stability. If some particular hardware exposure feature lets attackers run arbitrary low level timing and hardware testing code or crash the system or break the sandbox the game is likely over for most people.<p>An extra bit of entropy isn't meaningless sure, but at some point there should be some weighing of absolute attack surface against it right? Some features just seem inherently anti-privacy/anti-security and one might just have to try to deal with that via other approaches.
True, but randomizing other data points will keep your fingerprint unique which should help prevent associating your activity across sites/sessions.
don't some of the adblock extensions randomly modify the fingerprinting you can get from this?
Hopefully, but it's good to have it disabled as well so that your system isn't screwed by the next zero day and to help cover you in case the fingerprinters manage to find a technique to get identifying data from WebGPU that your ad-blocker hasn't accounted for. It's a constant arms race after all. Hopefully the ad-blocker is still feeding them randomized data even with it disabled, but otherwise other randomized data points should keep your fingerprint unique even if a lack of WebGPU support stays consistent.
WebGPU provides ZERO extra data that wasn't already available from WebGL in 2011. The world didn't end and it's been 15 years
With Chromebooks, Chrome is in fact put in the position of being a real operating system and is the only surface exposing the hardware's capabilities!
WebGPU/WebGL is another thing that only trusted sites should be allowed to use, just like JS in general.
Quite so. When it first took off, I took no end of flames and downvotes for suggesting that WebGPU is a terrible idea. HTML and the browser were originally conceived to render documents, not serve as a bastardized application distribution platform.<p>The only arguments I've ever heard in favor of wasm/webgpu were that using native graphics/GUI toolkit APIs are a pain. That's definitely true, because I've written stuff with gtk and it sucks, but that doesn't mean we should just shovel an entire tech stack into the browser.<p>Just because we can, doesn't mean we should. I'm tired of these BigCos shitting everything up.
So, I kind of agree, but I don't know what a better solution looks like.<p>Is it really better for users to download and run straight up executables with no security model? We tried that in the 90s and 2000s and it was pretty bad. We can have OSes introduce a security model, like Android and iOS do. But then what about desktop Linux users like myself? Am I just to be excluded because I don't use a popular (and proprietary) operating system?<p>Okay, we can invent a standard, cross platform app distribution mechanism with a security model. And that's... exactly what web browsers are. In the end it seems like the least-bad solution to me. I quite like that I can run GPU accelerated programs without the dev having to put in special effort to support my Linux distro.<p>I dunno, maybe I'm missing an option?
Yeah in the end I probably agree on WebGPU, I haven't really seen a single use of it, except for running shader code examples in browser, which might as well be replaced by a looping video.<p>For WASM though, I do not agree at all! It's genuinely a great system for high performance browser code. So much stuff I use now had WASM as the backbone, and I even started applying it outside of the browser in some of my architecture. I wish we had way more enthusiasm behind things like WASM, and way less for something like WebUSB.
The BigCos are the reason you have that browser in the first place. If you don't like it, you know where to download ... links or something.
Hey you’re right, we should gladly accept every decision the big corps make. They know best, after all. We should probably lick their boots too, in gratitude for their benevolence.
The application delivery thing was done as far back as Netscape threatening to relegate Windows to "a poorly debugged set of device drivers" so Web-whatever is simply another step in that direction. Like I said, if you purists want just document delivery, you can use links or w3m or maybe Gemini.
Some kind of market forces kept Netscape in check back then. Now they aren't.<p>Like, Tesco would prefer that my operating system was a roast chicken, Baowu Group would prefer it was made of steel, Berghain would prefer that it had to queue for hours to possibly get in, and Jagex would prefer it was an in-game GUI within RuneScape. None of those companies got their way, what makes Netscape special?
I want to click it so bad, but I can't bring myself to do it.
After a long day at work I saw the page, saw the warning to not click it, and I proceeded to click it lol.<p>Locked up my entire M1 Macbook Pro, held power button and I was back into chrome in <20s but I did kinda go "why did I just do that?"
Call of the void is strong in this one
I tried it on macOS Sequoia and it froze everything except the cursor movement.
honestly i bet it feels good as fuck to click on malware, just once
For me it just caused Safari to stop working until I quit and restarted it.
On my M1 MacBook Air with MacOS 12 it hangs. The mouse pointer still moves, but I can't bring up the force quit dialogue, and couldn't get anything else to work either. A youtube video in another tab kept playing until I held the power button to force a shutdown.
A Denial of Browsing attack.
It would seem relatively easy to eliminate this sort of infinite loop by ensuring that all loops are finite, function call depth limited and so on. It isn't a case where you hit the halting problem; the halting problem applies to general programs, not programs deliberately constructed out of parts with finite and calculable limits to runtime - no building the Ackermann function for example, as it contains a recursive loop. With the resources available to Apple, they really have no excuse.
Well this is easy to detect and kind of intentionally so, but the broader issue is quite a bit harder. Replace "infinite loop" with some very difficult program that simply takes 30+ seconds to finish and you're back to the same problem.<p>It doesn't even need to be computationally difficult, you can also slam the memory bus with "far away" fetches that are randomly distributed, ensuring each fetch doesn't share a cache line with any surrounding fetches. There are popular UX effects with basically this workload, even, that's a naive implementation of a large radius gaussian blur basically...
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.
On Graphene OS, it froze Brave, but Vanadium was able to deal with it swiftly. Not sure if that has anything to do with JavaScript JIT.
On a Windows 11 work machine - this is causing my Teams to blink black and come back randomly. Yes I used my work machine.
Froze my Brave browser on Windows for about 10 seconds. Every page turned white.
then they refreshed and worked again, except the offending page.
As the author speculated that tab was frozen.
I supposed you could just turn it off?<p>In Chrome on Linux:<p>WebGPU is experimental on this platform. See <a href="https://github.com/gpuweb/gpuweb/wiki/Implementation-Status#implementation-status" rel="nofollow">https://github.com/gpuweb/gpuweb/wiki/Implementation-Status#...</a> deathray/:9<p>Failed to create WebGPU Context Provider main @ deathray/:9
(anonymous) @ deathray/:113<p>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)
>This spills over into other processes wanting to use the GPU, namely the WindowServer.<p>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?
Not many GPUs support full pre-emption. And by "not many" I mean like Nvidia desktop GPUs only added this shockingly recently ( specifically with Pascal generation: <a href="https://docs.nvidia.com/cuda/pascal-tuning-guide/index.html#compute-preemption" rel="nofollow">https://docs.nvidia.com/cuda/pascal-tuning-guide/index.html#...</a> )<p>Otherwise GPUs typically do context "pre-emption" by basically being cooperative and just injecting yield statements in the command queue or on things like tile boundaries for tile based renderers. So the smallest chunk of work they can yield between ends up actually being quite large, and with a full user-supplied program in the middle
Often not in the same way - even if there are multiple queues (that can be given a priority), they're often limited in what they can schedule between.<p>Often there's shared resources that are statically allocated to shaders (register space, local memory etc.) that means you often can't "just" add a new task if those shared resources are already in use. But <i>not</i> using those resources to their full would cause performance issues.<p>And the internal state of a GPU is often very large, much larger than a CPU, so suspending the current tasks, saving out their state and replace it with a "higher priotity" one can be <i>very</i> expensive - so often an afterthought of support at best.
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?<p>And what happens in WebGL?
In my testing, a looping compute shader was enough to crash the tab on its own, but it needed waiting render shaders to crash the WindowServer.<p>Interestingly though there was another way to make only the tab crash, even if I had all three shaders in the pipeline: If I placed the canvas far offscreen using position: absolute, only the tab would crash even if the render shaders were waiting! There's some weird interactions going on I don't yet fully understand.
Historically, for loops in shaders were limited in the number of iterations they could run for. Among other things this ensures that rasterizing a particular pixel completes in a known amount of time (and ideally that amount of time is fast enough to avoid triggering TDR on windows and making the machine bluescreen). You could of course nest loops so it's not a perfect measure. I'm not certain whether that limitation applies to WebGPU, but it should apply to WebGL.
This issue is older than the M chips: a formative OpenCL moment on my Intel MacBook involved locking it up in this way. By contrast, a similar CUDA kernel running on Linux was forcibly stopped after some short-ish time.<p>Worse and less defensible on the web of course.
Tried it and now I cant boot even in safe mode. I love it
it crashes this hardware apparently:<p><pre><code> - macOS 14.7.3 (23H417)
- Chrome 152.0.7977.84
- Hardware: MacBookPro17,1 (Apple M1)</code></pre>
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.
Amazing!<p>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.<p>Hope they don't disable WebGPU...
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.<p>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.<p>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?
I was lucky, the website is down due a certificate error.
It's at best denial of service. Except it's easily avoidable by never going back to that site again.<p>The funny thing is the page describing the problem stutters like crazy in firefox/mac while the rotating nuclear hazard wheel is displayed.
Is this why Oregon Trail Deluxe freezes on Mac?<p><a href="https://oregontrail.ws/games/the-oregon-trail-deluxe/play/" rel="nofollow">https://oregontrail.ws/games/the-oregon-trail-deluxe/play/</a>
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.
> I was surprised when it hung my computer and of course asked "Does it do that every time?"<p>A true scientist! (see <a href="https://xkcd.com/242/" rel="nofollow">https://xkcd.com/242/</a>)
Does this reproduce with just the compute pass, or does WindowServer deadlock on the canvas drawable?
<p><pre><code> while (true) console.log('this will freeze/crash dev tools')
</code></pre>
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.
Shall we term this a Denial of Memory attack. Then in order to Contain it we have a ConDoM fix?
This doesn't even always work unless you log two different messages, because some DevTools will just keep a running count of how many of the same message there has been in a row.
It freezes a Pixel 10 on Chrome, Webviews and Brave..!<p>I tried several webview-based browsers, Chrome, and Brave, with them the phone completely freezes (except that the audio keeps going for a bit).<p>I tested webview browsers because by chance the first place I ran it on was Telegram's internal browser (on which the phone does freeze).<p>It doesn't do anything on Firefox though, and weirdly enough not even on the Chromium-based Cromite (after enabling WebGL).<p>I only tried waiting for a few minutes, but it wasn't giving signs of life.<p>If someone wants to try, keep in mind that to force restart a Pixel you have to press the power button for 30 seconds (during which you might break out in a cold sweat).
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.
> recoverable data loss which we do not consider to be a security issue<p>How about the irrecoverable loss of data in RAM, though?
It's very easy to lock up your browser or machine with WebGPU, it happens on Windows too. You'll do this by accident constantly in a big WebGPU project, until the Chrome GPU trace/renderdoc/nsight shows some crazy deadlock bottleneck you have no hope of understanding at the browser level.<p>GPU driver engineering has received a tiny fraction of the resources of CPU engineering, while being significantly more complex. And GPU users will not pay for performance hits that better the architecture, they will just buy the other guy's GPU/use their driver. So it's a race to the top with performance and race to the bottom with architecture and stability.
Absolutely no effect on Firefox on Android 16, same with Vivaldi on W10. Everything works normal, not even higher CPU load, just shows some blank page.
well that was incredibly annoying lol
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.<p>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.
This froze my S26 Ultra on chrome
Zero impact on iOS 27.
The title says "freeze a mac".
Tried it on my Blackberry too, also nothing. I say it's a nothingburger.
It’s not an iOS bug to begin with.
Still impacts macOS 27 release candidate.
Yes, but it didn't kernel panic my computer, it just forced WindowServer to quit, but it "helpfully" reopens all of your windows/apps, so it reloads the tab that caused the deadlock to begin with, rinse and repeat.<p>It's always funny to me when you put computers into such states. Last time I was tickled this was was when I nuked the TCC database permissions for Zoom <i>while</i> in a meeting, sharing my screen, using my microphone and camera. The OS rrrrreally didn't like that.
[flagged]
[flagged]
Blowing up a browser tab with bad JavaScript is not considered to be a problem. But kernel panicking the computer is different--this brings us back to the bad old days of MacOS where a buggy program could force a freeze/restart at any time.
Usually you can't freeze the whole system UI with an infinite counter though. I'm pretty sure normal JS browser processes are not supposed to be able to do that.
There's more to it than just a loop. If it was just a loop, it would peg a CPU core and be done with it. But you'll have to reread TFA to find out how it takes out the window server, thus freezing the rest of the system.
Why does everyone hate this comment? Attitude? I can’t figure out the wavelength here. I’m just commenting.
Because kernel panics are a wildly different class of bug than breaking one browser tab. An "Oh Snap" is the designed outcome of a JavaScript infinite loop. Crashing the whole computer is not.
> <i>Why does everyone hate this comment?</i><p>"It's just" dismissals are annoying when they're blatantly wrong. An infinite-loop counter in Orion.app shouldn't cause my entire machine to freeze, down to being unable to force quit.
"It's just" is usually an annoying way to start a comment.
An infinite loop in JavaScript causes a different issue. It doesn't cause the rest of your tabs to stop working too. Or allegedly the entire rest of the OS though I can't reproduce that.
Hate does seem to be on the rise across the board, even for fairly trivial things. About all one person can do is try to set a non-hate example.<p>Plus provide a corrective upvote from time to time especially when a knee-jerk robot is suspected, or a maybe it's an actual person where you can't tell the difference.<p>Sometimes it gets so bad that people hate it when you try to keep a decent article from plummeting under the depths of a sea of slop.<p>I think it's well-recognized that robots are more prevalent than ever and it doesn't seem to be making things better at this point.
Maybe that would be better than a meltdown . . .