Skip to content
Memory corruption Disclosed report Advanced CVE-2016-9897

Memory corruption @ libGLESv2!rx::VaryingPacking::isFree

A WebGL shader that constructs a vector from an element of a large varying array causes Firefox to crash within a second or two. The reporter suspects this memory corruption could be a security issue, though the text does not demonstrate exploitation.

Aral Yaman Follow

Originally disclosed on Mozilla

  • Fixed in 4 months
  • Paid in 3 months
  • Disclosed after 4 months
Text
Created attachment 8789367
crash.html

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
Build ID: 20160907030427

Steps to reproduce:

Open crash.html


Actual results:

Firefox crashes after 1-2 sec.

The reason is when using vector constructor with varying array:

precision mediump float;  
varying  vec4 niqqki[100]; 
void main() {  
vec4 (niqqki[0]);
} 

This could be a security issue ?



Expected results:

No crash or compiler error.

The original report as published on Mozilla's Bugzilla, by Aral Yaman. 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 the shader compiler's varying-packing logic mishandles a vector constructor applied to an element of a large varying array, leading to memory corruption.

Impact

The browser process crashes, which could potentially be exploited for memory corruption, though the report only demonstrates a denial of service.

What the attacker needed

Victim opens a crafted web 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.

WebGL lets web pages run small programs called shaders on the graphics card. A shader here used a large array of values passed between shader stages and built a vector from one entry, which made the browser crash. A crash like this can sometimes be turned into code execution, but the report only shows the crash.

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 Aral Yaman

View all

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