Skip to content
Memory corruption Disclosed report Advanced CVE-2023-29531

Firefox WebGL glvmInterpretFPTransformFour Memory Corruption Vulnerability

An out-of-bounds memory access occurs in Firefox's WebGL implementation when processing a drawElements command, causing the browser process to crash. The report does not demonstrate code execution or data leakage, only a crash.

D4ni31 Follow

Originally disclosed on Mozilla

  • Fixed in 6 months
  • Paid in 6 months
  • Disclosed after 6 months

Created attachment 9297729 poc.html

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

Steps to reproduce:

Title

  • Firefox WebGL glvmInterpretFPTransformFour OOB Access Vulnerability

Summary

  • A OOB Access vulnerability exists in the WebGL glvmInterpretFPTransformFour
  • The browser process crashes when triggering this bug.

Test environment

  • Product : Mozilla Firefox 105.0.3
  • OS : macOS Monterey 12.6 (M1 Pro ARM)

Root Cause Analysis

* thread #25, name = 'CanvasRenderer', queue = 'OpenGLMT', stop reason = EXC_BAD_ACCESS (code=2, address=0x1715efff8)
  frame #0: 0x00000001ade070cc libsystem_pthread.dylib`___chkstk_darwin + 60
libsystem_pthread.dylib`:
->  0x1ade070cc <+60>: ldur   x11, [x11, #-0x8]
  0x1ade070d0 <+64>: mov    x10, sp
  0x1ade070d4 <+68>: cmp    x9, #0x1, lsl #12         ; =0x1000
  0x1ade070d8 <+72>: b.lo   0x1ade070f0               ; <+96>
Target 0: (firefox) stopped.
(lldb) bt
* thread #25, name = 'CanvasRenderer', queue = 'OpenGLMT', stop reason = EXC_BAD_ACCESS (code=2, address=0x1715efff8)
* frame #0: 0x00000001ade070cc libsystem_pthread.dylib`___chkstk_darwin + 60
  frame #1: 0x000000020f692db4 libGLProgrammability.dylib`glvmInterpretFPTransformFour + 424
  frame #2: 0x000000020f913b88 GLRendererFloat`gldLLVMFPTransformFallback + 444
  frame #3: 0x000000020f915cb8 GLRendererFloat`gldLLVMVecPointRender + 6940
  frame #4: 0x000000020f90e5c0 GLRendererFloat`gldRenderPoints + 76
  frame #5: 0x000000020f8e0524 GLEngine`gleLLVMVecPrimPointRender + 1684
  frame #6: 0x000000020f83b88c GLEngine`glDrawArraysInstanced_STD_GL3Exec + 1296
  frame #7: 0x000000020f83acd8 GLEngine`glDrawArrays_UnpackThread + 48
  frame #8: 0x000000020f87689c GLEngine`gleCmdProcessor + 116
  frame #9: 0x00000001adc481b4 libdispatch.dylib`_dispatch_client_callout + 20
  frame #10: 0x00000001adc57414 libdispatch.dylib`_dispatch_lane_barrier_sync_invoke_and_complete + 56
  frame #11: 0x000000020f7e2ac8 GLEngine`glFlush_ExecThread + 32
  frame #12: 0x000000011106ac50 XUL`___lldb_unnamed_symbol52768 + 40
  frame #13: 0x00000001114e90c8 XUL`___lldb_unnamed_symbol63264 + 2252
  frame #14: 0x00000001146fd0a4 XUL`___lldb_unnamed_symbol207810 + 980
  frame #15: 0x0000000113c48764 XUL`___lldb_unnamed_symbol166963 + 312
  frame #16: 0x0000000110e907e8 XUL`___lldb_unnamed_symbol49031 + 756
  frame #17: 0x0000000110e91a24 XUL`___lldb_unnamed_symbol49039 + 168
  frame #18: 0x0000000110c15b4c XUL`___lldb_unnamed_symbol41826 + 4308
  frame #19: 0x0000000110e945d0 XUL`___lldb_unnamed_symbol49067 + 476
  frame #20: 0x0000000110e5ceb8 XUL`___lldb_unnamed_symbol48460 + 80
  frame #21: 0x0000000110c0ea24 XUL`___lldb_unnamed_symbol41796 + 288
  frame #22: 0x0000000100f46fa8 libnss3.dylib`___lldb_unnamed_symbol2250 + 260
  frame #23: 0x00000001ade0c26c libsystem_pthread.dylib`_pthread_start + 148
(lldb) mem read 0x1715efff8
error: memory read failed for 0x1715efe00
  • If you debug at the point where the crash occurred, you can see that the crash occurred in OpenGLMT.

  • This bug is an Out-Of-Bounds Access vulnerability that occurs in WebGL's handling of the drawElements command.

Proof-of-Concept

  • Please check the attached file!

Reproduce

  • open a poc.html in Firefox
  • Wait a few seconds.

CREDIT Information

  • Dohyun Lee (@l33d0hyun) of SSD Labs

Actual results:

.

Expected results:

.

The original report as published on Mozilla's Bugzilla, by D4ni31. 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 memory access in the WebGL drawElements handling path, specifically in the glvmInterpretFPTransformFour function.

Impact

The browser process crashes, causing a denial of service; the report does not claim any further impact such as code execution.

What the attacker needed

Victim opens a malicious HTML file; Firefox on macOS with WebGL enabled

How it was found

  1. Open the provided poc.html file in Firefox.
  2. Wait a few seconds for the crash to occur.

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.

WebGL lets web pages draw 3D graphics using the computer's graphics card. A bug in how Firefox handles a particular drawing command can make the browser read memory outside the intended area, which crashes the browser. The report shows only a crash, not a way to run malicious code.

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 D4ni31

View all

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