Thu 25 Jan 2024 10:50:26 AM EET

Yet another fork()/malloc() bomb in javascript + SIGILL in Chrome

Yet another fork()/malloc() bomb in javascript + SIGILL in Chrome

Searching the web for javascript fork malloc bomb returns results, e.g. here: and here:

We got a javascript fork malloc bomb which crashed Chrome 121 on linux with SIGILL and about one in five runs the virtual machine freezes. SIGILL almost always is a sign of memory corruption :) On android it crashes the current tab without explanation. Firefox 121 on linux also crashes the current tab.

In all cases except the sporadic freezes, the browser remains functioning, not counting the crashed tab.

The javscript code is simply simple:

setInterval("document.body.innerHTML += document.body.innerHTML ",1);

Online demo: In case someone wants to test it on other browsers or debug.

The GNU/linux tests took about 1.5 minutes in a virtual machine with 4GB RAM and single core.


Posted by guninski | Permanent link