Operations 5 min read

Why Firefox Crashes on Linux Image Search: Hidden Kernel & AI Code Bug

Mozilla discovered that Firefox crashes on Linux, especially older Debian‑based distributions, whenever users perform an image search on Google; the issue stems from a recent AI‑generated JavaScript function allocating excessive variables, exposing a Linux kernel stack‑limit bug that was fixed in kernel 4.20.

Programmer DD
Programmer DD
Programmer DD
Why Firefox Crashes on Linux Image Search: Hidden Kernel & AI Code Bug

Mozilla recently detected a large number of Firefox crashes affecting Linux users, particularly those on older Debian‑based distributions.

Investigation showed the crashes are not caused by Firefox itself but involve the Linux kernel and a JavaScript function from Google’s image search page.

The problem appeared suddenly; thousands of users of the Huayra Debian derivative (based on Debian 10) were impacted, and later testing revealed that almost all older Debian‑based releases suffer the same issue.

The crashes are 100 % reproducible: performing an image search on Google triggers a crash in every Firefox version, whether new or old.

Mozilla researchers concluded the root cause lies with Google and the outdated Linux environment, not Firefox.

Stack traces show the crash occurs during JIT compilation when the JIT accesses a region reserved for the next JavaScript call, causing an overflow.

Google recently changed its image search page, adding a JavaScript function that allocates about 20 000 variables, likely generated by AI.

Although Linux normally expands the stack, the kernel contains a check that aborts when stack access exceeds 64 KiB + 256 bytes; this check existed before kernel 4.20 and was fixed in that version, so newer distributions are unaffected.

Mozilla confirmed that Google has patched the image‑search code, and they continue to work on a solution for users still on older systems.

Before performing this operation we checked the stack and verified that the extra stack memory we allocated would not overflow the native stack limits we set for ourselves. Thus, there appears to be a discrepancy between the limits we impose and the OS limits, which varies by distribution and is confusing: for example, it affects Debian 10 but not Debian 11.
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

JavaScriptLinuxFirefoxDebiankernel bugBrowser Crash
Programmer DD
Written by

Programmer DD

A tinkering programmer and author of "Spring Cloud Microservices in Action"

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.