Skip to content
Memory corruption Disclosed report Intermediate CVE-2017-7782

A single RWX page is getting allocated on Windows

Firefox on Windows allocates one or two 4 KB pages with read, write and execute permissions, which breaks the browser's W^X/DEP protection. An attacker who can write to such a page could run code from it.

Arthur Edelstein Follow

Originally disclosed on Mozilla

  • Fixed in 3 months
  • Paid in 4 months
  • Disclosed after 3 months
Text
On Windows, I frequently see a single RWX ("Execute/Read/Write") 4k block (a single page). Occasionally I see two. This was observed with both Firefox Nightly and Release. This violates Firefox's W^X/DEP protection.

STR:
1. Download VMMap (https://technet.microsoft.com/en-us/sysinternals/vmmap.aspx) and run it.
2. Choose File > Select Process... > Launch and Trace a New Process > Application and select firefox.exe
3. Look at the "Details" block (bottom half of the VMMap window) and sort by "Protection". One or two "Execute/Read/Write" blocks of 4k each are typically visible.

(I have tried to click the "Heap Allocations..." button to examine the RWX page's allocation call stack, but the button remains disabled. I don't know why.)

Desired result:
No "Execute/Read/Write" blocks should be produced.
 
Also, it would be nice to add an automated test that detects such RWX blocks in the future.

The original report as published on Mozilla's Bugzilla, by Arthur Edelstein. 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 a code path in Firefox or a third-party component allocates a page with PAGE_EXECUTE_READWRITE instead of using separate writable and executable pages.

What the attacker needed

Windows operating system; Firefox Nightly or Release; VMMap tool

How it was found

  1. Download and run VMMap.
  2. Choose File > Select Process... > Launch and Trace a New Process > Application and select firefox.exe.
  3. Look at the Details block, sort by Protection, and observe one or two Execute/Read/Write blocks of 4k.

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.

Normally a program's memory pages are either writable or executable, not both, so that an attacker who can write data cannot also run it as code. This report shows Firefox on Windows sometimes creates a page that is both writable and executable, which weakens that protection.

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.