Skip to content
Info disclosure Disclosed report Advanced CVE-2026-4715

Uninitialized stack info leak in `FilterNodeTableTransferSoftware` via PCanvas IPC

A filter node in Firefox's graphics code declares a 1024-byte lookup table on the stack without initialising it, and an early return leaves it unfilled when no table values are supplied. A compromised content process can enable the filter channels and read back the uninitialised stack bytes of the GPU process through the canvas IPC interface.

varde Follow

Originally disclosed on Mozilla

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

Created attachment 9547002 diff.patch

Summary

FilterNodeComponentTransferSoftware::Render() (gfx/2d/FilterNodeSoftware.cpp, line 1822-1877) declares an uninitialized uint8_t lookupTables[4][256] (1024 bytes) on the stack. When a TABLE_TRANSFER filter channel is enabled (mDisable*=false) but no table values are provided, FillLookupTableImpl returns without filling the table. The uninitialized stack data is then used as a byte-to-byte mapping over attacker-controlled input pixels, allowing a compromised content process to read 1024 bytes of GPU process stack memory via PCanvas IPC.

C++
uint8_t lookupTables[4][256];                              // line 1828: uninitialized
GenerateLookupTable(B8G8R8A8_COMPONENT_BYTEOFFSET_R,       // line 1829: calls FillLookupTable
                    lookupTables, mDisableR);               //   when mDisableR == false

// FillLookupTableImpl (line 1951-1956):
uint32_t tvLength = aTableValues.size();
if (tvLength < 2) {
  return;                                                  // early return, table NOT filled
}

// TransferComponents<4> (line 1797-1804):
for (uint32_t i = 0; i < BytesPerPixel; i++) {
  targetData[targetIndex + i] =
      aLookupTables[i][sourceData[sourceIndex + i]];       // reads uninitialized table
}

Root Cause

The vulnerability involves three components:

  1. Uninitialized declaration (line 1828): uint8_t lookupTables[4][256] is declared on the stack without initialization.

  2. Early return without fill (line 1951-1956): FilterNodeTableTransferSoftware::FillLookupTableImpl checks if (tvLength < 2) { return; }. When no table values have been set (empty std::vector<Float>), tvLength=0 < 2, and the function returns immediately without writing anything to aTable[256].

  3. Channel enable path (line 1766-1774): GenerateLookupTable fills an identity table only when aDisabled=true. When aDisabled=false, it calls FillLookupTable, which dispatches to FillLookupTableImpl. Since the table values vector is empty by default, the early return is taken, leaving the 256-byte table uninitialized.

The constructor (line 1742-1743) sets all mDisable* flags to true, but a compromised content process can set them to false via SetAttribute(uint32_t, bool) (line 1745-1764) using the PCanvas FILTERNODESETATTRIBUTE event with ARGTYPE_BOOL (valid enum value 1 within the accepted range [0, 13]).

Triggerability

A compromised content process can reliably trigger this by sending PCanvas IPC events that:

  1. Create a TABLE_TRANSFER filter node (FilterType::TABLE_TRANSFER = 6).
  2. Set ATT_TRANSFER_DISABLE_R/G/B/A (indices 0-3) to false via FILTERNODESETATTRIBUTE with ARGTYPE_BOOL.
  3. Do NOT set ATT_TABLE_TRANSFER_TABLE_R/G/B/A (indices 4-7), leaving the table values vectors empty.
  4. Draw a surface through the filter.

The input surface pixel values serve as indices into the uninitialized lookup tables. By crafting a 256x1 input surface where pixel x has channel value x, the attacker queries every byte of all four 256-byte tables, extracting the full 1024 bytes of uninitialized stack data.

Note: Firefox debug builds enable -ftrivial-auto-var-init=pattern (build/moz.configure/toolchain.configure, line 2930-2944), which fills uninitialized stack variables with 0xAA. This masks the leak in debug builds but confirms the table IS uninitialized. Release builds do not enable this flag and expose real stack data.

Tested on Firefox commit:

Text
f8345be3cabc1944760d536c4a43192a02000406
Sun Feb 15 23:53:08 2026 +0000

Attack Scenario

A compromised content process:

  1. Creates a PCanvas actor via CanvasManagerChild.
  2. Serializes initial recorded events into shared memory:
    • CANVAS_DRAW_TARGET_CREATION (initializes translator draw target)
    • SETCURRENTDRAWTARGET (sets active draw target)
    • PAUSE_TRANSLATION (puts translator into Paused state)
  3. Calls SendInitTranslator to start GPU-side translation.
  4. After the translator reaches Paused state, serializes attack events:
    • CREATESOURCESURAFCEFROMPREVIOUSLYSNAPSHOTTEDSURFACE (creates input surface)
    • CREATEFILTERNODE with FilterType::TABLE_TRANSFER (creates the filter node)
    • FILTERNODESETATTRIBUTE x4 with ARGTYPE_BOOL=1, setting ATT_TRANSFER_DISABLE_R/G/B/A (indices 0-3) to false
    • FILTERNODESETINPUT with IN_TRANSFER_IN=0 (connects input surface to filter)
    • DRAWFILTER (triggers Render() which uses the uninitialized lookup tables)
    • SNAPSHOT (captures the output surface containing leaked stack data)
    • CACHE_DATA_SURFACE (caches the snapshot)
    • GET_DATA_FOR_SURFACE (reads the data back into shared memory)
  5. Calls SendResumeTranslation to process the attack events on the GPU process.
  6. GPU process executes the filter in FilterNodeComponentTransferSoftware::Render():
    • lookupTables[4][256] is allocated on the stack (uninitialized).
    • GenerateLookupTable is called with mDisableR/G/B/A = false.
    • FillLookupTableImpl returns immediately because aTableValues.size() == 0 < 2.
    • TransferComponents<4> maps each input byte through the uninitialized table: targetData[i] = lookupTables[ch][sourceData[i]].
    • The output surface now contains GPU process stack data indexed by attacker-controlled input pixel values.
  7. The output surface data is written to shared memory via GET_DATA_FOR_SURFACE.
  8. Content process reads back the shared memory, recovering 1024 bytes of GPU process stack.
  9. The leak can be repeated to obtain fresh stack data on each invocation, potentially revealing return addresses (defeating ASLR), function pointers, or other sensitive data from the GPU process.

Reproduction

Build Firefox with tests enabled (release mode recommended to see real stack data):

Text
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-release

ac_add_options --disable-install-strip
ac_add_options --enable-debug-symbols
ac_add_options --enable-tests

ac_add_options --with-ccache=sccache

Apply the attached patch (diff.patch) and rebuild, then run:

Bash
./mach mochitest dom/bindings/test/test_tableTransferLeak.html

Expected result:

  • The test output shows leaked:N/1024 where N > 0, indicating bytes that differ from identity mapping.
  • In debug builds, leaked bytes are all 0xAA due to -ftrivial-auto-var-init=pattern.
  • In release builds, leaked bytes contain actual GPU process stack data.

The original report as published on Mozilla's Bugzilla, by varde. 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 missing initialisation of the stack lookup table combined with an early return in FillLookupTableImpl when fewer than two table values are supplied, so the table is used while still holding stale stack contents.

Impact

A compromised content process could leak GPU process stack memory, potentially revealing return addresses and defeating ASLR; debug builds mask the leak with a pattern fill, so only release builds expose real data.

What the attacker needed

Compromised content process; release build to see real stack data

How it was found

  1. Create a TABLE_TRANSFER filter node through the canvas IPC interface.
  2. Set the four channel-disable attributes to false without providing any table values.
  3. Connect an input surface whose pixel values act as indices into the table.
  4. Draw through the filter and snapshot the output surface.
  5. Read the surface data back into shared memory and recover the leaked stack bytes.

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.

Some programs keep short-lived data in a memory area called the stack, and that area can still hold leftovers from earlier work. Here a graphics filter forgot to clear a small table before using it as a lookup, so whatever was left on the stack got copied into the output image. A malicious page that has already broken out of its sandbox could then read those leftovers, which may include memory addresses useful for further attacks.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by varde

View all

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

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.