Skip to content
Memory corruption Disclosed report Advanced CVE-2026-84126

AddressSanitizer: heap-buffer-overflow in TextContainsLineBreakerWhiteSpace layout/generic/nsTextFrame.cpp

A crafted HTML page triggers a heap-buffer-overflow in Firefox's text layout code when checking for line-breaker white space, causing the tab to crash. Resizing or moving the window can also produce use-after-poison crashes with varying stacks.

Irvan Kurniawan Follow

Originally disclosed on Mozilla

  • Fixed in 5 days
  • Paid in 52 days
  • Disclosed after 5 days

Created attachment 9627055 testcase.html

After visiting the testcase.html in web server e.g. python -m http.server, the Firefox tab crash with AddressSanitizer: heap-buffer-overflow in TextContainsLineBreakerWhiteSpace layout/generic/nsTextFrame.cpp.

When resizing or moving the Firefox window, it can also crash with use-after-poison with various different crash stack.

When running the testcase with mozregression asan build, it able to crash after commit Bug 2054166 - Force reflow floats when the last column is reflowed with an unconstrained block-size

Steps to reproduce

  1. Download attached testcase.html
  2. Run python -m http.server to serve the testcase
  3. Open Firefox ASan
  4. Visit http://127.0.0.1:8000/testcase.html
  5. Tab crashed with heap-buffer-overflow

If it still doesn't crash on the first try, try resizing the Firefox window while the testcase tab is open.

The original report as published on Mozilla's Bugzilla, by Irvan Kurniawan. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely an out-of-bounds read in the text line-breaking check, introduced or exposed by a change to float reflow when the last column has an unconstrained block-size.

Impact

A malicious page could crash the browser tab and, through window resizing, trigger use-after-poison memory corruption that may be exploitable.

What the attacker needed

Victim opens a crafted HTML page; AddressSanitizer build to observe the crash

How it was found

  1. Download the attached testcase file.
  2. Serve it locally with a simple HTTP server.
  3. Open an AddressSanitizer build of Firefox.
  4. Visit the testcase URL in the browser.
  5. Observe the tab crash with the heap-buffer-overflow report.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Firefox lays out text on screen using code that reads characters from a buffer. A bug in that code lets it read past the end of the buffer, which a memory checker (AddressSanitizer) flags as a heap-buffer-overflow. The result is a crashed tab, and in some cases memory corruption that could potentially be exploited.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by Irvan Kurniawan

View all

72 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.