Skip to content
Memory corruption Disclosed report Advanced

SVG: Invalid memory access at 0x00009fdf8004 in isNothing

A crafted SVG file causes Firefox to read from an invalid memory address when resolving a paint server URL, leading to a crash. The report shows an AddressSanitizer segmentation fault in the isNothing function.

Holger Fuhrmannek Follow

Originally disclosed on Mozilla

Critical View original
  • Fixed in 37 hours
  • Paid in 14 days
  • Disclosed after 37 hours
Text
Created attachment 8911711
testcase.html

The current nightly build of firefox crashs with the attached testcase. 
ASAN:
==7339==ERROR: AddressSanitizer: SEGV on unknown address 0x00009fdf8004 (pc 0x7f64e9cc1700 bp 0x7ffcd1419ab0 sp 0x7ffcd14199a0 T0)
==7339==The signal is caused by a READ memory access.
    #0 0x7f64e9cc16ff in isNothing /obj-firefox/dist/include/mozilla/Maybe.h:225:36
    #1 0x7f64e9cc16ff in mozilla::css::URLValueData::IsLocalRef() const /layout/style/nsCSSValue.cpp:2961
    #2 0x7f64ea54332d in ResolveURLUsingLocalRef(nsIFrame*, mozilla::css::URLValueData const*) /layout/svg/SVGObserverUtils.cpp:1011:14
    #3 0x7f64ea53fc12 in GetPaintURI /layout/svg/SVGObserverUtils.cpp:1067:10
    #4 0x7f64ea53fc12 in SVGObserverUtils::GetPaintServer(...) /layout/svg/SVGObserverUtils.cpp:652
...

The original report as published on Mozilla's Bugzilla, by Holger Fuhrmannek. 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 or incorrect null check when resolving a local reference in an SVG paint server URL, causing a read from an invalid memory address.

What the attacker needed

Victim opens a malicious SVG file

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.

This is a crash bug in Firefox. When the browser tries to draw a special SVG image, it follows a bad memory pointer and reads from an address that does not exist, so the browser stops working. The report includes a test file that triggers 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 Holger Fuhrmannek

View all

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