Firefox · Graphics
CVE-2026-2806
Uninitialized Memory in Graphics
Overview
Low
Severity
—
CVSS
No
Exploited ITW
Fixed
Fix Status
Changed Functions
| Function | Change | Notes |
|---|---|---|
ifgfx/thebes/gfxSVGGlyphs.cpp |
modified |
Files Changed
gfx/tests/crashtests/2006199.htmlgfx/tests/crashtests/badsvgfont.ttfgfx/tests/crashtests/crashtests.listgfx/thebes/gfxSVGGlyphs.cpp
Patch
diff --git a/gfx/tests/crashtests/2006199.html b/gfx/tests/crashtests/2006199.html
new file mode 100644
index 00000000000..d08d09a93a0
--- /dev/null
+++ b/gfx/tests/crashtests/2006199.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<style>
+@font-face {
+ font-family: 'PoCFont';
+ src: url('badsvgfont.ttf');
+}
+</style>
+<div style="font-family: PoCFont; font-size: 100px;">L</div>
diff --git a/gfx/tests/crashtests/badsvgfont.ttf b/gfx/tests/crashtests/badsvgfont.ttf
new file mode 100644
index 00000000000..b0b5be6ef88
Binary files /dev/null and b/gfx/tests/crashtests/badsvgfont.ttf differ
diff --git a/gfx/tests/crashtests/crashtests.list b/gfx/tests/crashtests/crashtests.list
index 8cd34acffd8..b44c8e47eec 100644
--- a/gfx/tests/crashtests/crashtests.list
+++ b/gfx/tests/crashtests/crashtests.list
@@ -231,3 +231,4 @@ load 1938548.html
load 1962172-1.html
load 1983053.html
load 1999841-1.html
+load 2006199.html
diff --git a/gfx/thebes/gfxSVGGlyphs.cpp b/gfx/thebes/gfxSVGGlyphs.cpp
index e9c3983a27e..dd76d27701c 100644
--- a/gfx/thebes/gfxSVGGlyphs.cpp
+++ b/gfx/thebes/gfxSVGGlyphs.cpp
@@ -281,8 +281,7 @@ gfxSVGGlyphsDocument::gfxSVGGlyphsDocument(const uint8_t* aBuffer,
if (Z_OK == inflateInit2(&s, 16 + MAX_WBITS)) {
int result = inflate(&s, Z_FINISH);
if (Z_STREAM_END == result) {
- MOZ_ASSERT(size_t(s.next_out - outBuf.Elements()) == origLen);
- ParseDocument(outBuf.Elements(), outBuf.Length());
+ ParseDocument(outBuf.Elements(), s.total_out);
} else {
NS_WARNING("Failed to decompress SVG glyphs document");
}
Loading diff…
Regression Test / PoC
shipped with the fix
diff --git a/gfx/tests/crashtests/2006199.html b/gfx/tests/crashtests/2006199.html
new file mode 100644
index 00000000000..d08d09a93a0
--- /dev/null
+++ b/gfx/tests/crashtests/2006199.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<style>
+@font-face {
+ font-family: 'PoCFont';
+ src: url('badsvgfont.ttf');
+}
+</style>
+<div style="font-family: PoCFont; font-size: 100px;">L</div>
diff --git a/gfx/tests/crashtests/badsvgfont.ttf b/gfx/tests/crashtests/badsvgfont.ttf
new file mode 100644
index 00000000000..b0b5be6ef88
Binary files /dev/null and b/gfx/tests/crashtests/badsvgfont.ttf differ
diff --git a/gfx/tests/crashtests/crashtests.list b/gfx/tests/crashtests/crashtests.list
index 8cd34acffd8..b44c8e47eec 100644
--- a/gfx/tests/crashtests/crashtests.list
+++ b/gfx/tests/crashtests/crashtests.list
@@ -231,3 +231,4 @@ load 1938548.html
load 1962172-1.html
load 1983053.html
load 1999841-1.html
+load 2006199.html
Loading diff…
References
On This Page