Skip to content
Memory corruption Disclosed report Advanced

use-after-free in nsFlexContainerFrame::MeasureAscentAndBSizeForFlexItem

A use-after-free was found in Firefox's flex container layout code, in the function that measures ascent and block size for flex items. The reporter says the bug was triggered while fuzzing an ASAN build, but the text does not describe what an attacker could achieve beyond the crash.

tarafans7 Follow

Originally disclosed on Mozilla

  • Fixed in 6 days
  • Paid in 49 days
  • Disclosed after 6 days
Text
Created attachment 9137027
poc.html

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36

Steps to reproduce:

A use-after-free bug is triggered when fuzzing Firefox Nightly ASAN build.
The PoC and the ASAN log reproduced by ffpuppet against the official build on Mar. 30 are attached.

Wen Xu from sslab, gatech

The original report as published on Mozilla's Bugzilla, by tarafans7. 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

What the attacker needed

Firefox Nightly ASAN build; victim loads a crafted page

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.

A use-after-free happens when a program frees a piece of memory and then keeps using it, so the data there can be replaced with something else. Here it happened inside Firefox's layout engine while it was working out the size of items in a flexible layout. The report only shows that a specially crafted page made the browser hit this bug during automated testing.

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 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.