Heap-buffer-overflow in mozilla::css::Declaration::GetCustomPropertyNameAt
Originally disclosed on Mozilla
- Fixed in 28 hours
- Paid in 12 days
- Disclosed after 28 hours
Created attachment 8355068
test.html
==1132==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x615000a3d6b8 at pc 0x7fa26818b3ea bp 0x7fff5ce2e850 sp 0x7fff5ce2e848
READ of size 8 at 0x615000a3d6b8 thread T0
#0 0x7fa26818b3e9 in nsAString_internal::Data() const extensions/gio/../../dist/include/nsTSubstring.h:209
#1 0x7fa268148bd7 in nsAString_internal::Replace(unsigned int, unsigned int, nsAString_internal const&) extensions/gio/../../dist/include/nsTSubstring.h:438
#2 0x7fa2682ada50 in nsAString_internal::Append(nsAString_internal const&) extensions/gio/../../dist/include/nsTSubstring.h:450
#3 0x7fa2789b8b99 in mozilla::css::Declaration::GetCustomPropertyNameAt(unsigned int, nsAString_internal&) const layout/style/../../dist/include/mozilla/css/Declaration.h:315
#4 0x7fa2789b864d in mozilla::css::Declaration::GetNthProperty(unsigned int, nsAString_internal&) const /usr/local/google/home/aarya/firefox/src/layout/style/Declaration.cpp:1152
#5 0x7fa278cf2772 in nsDOMCSSDeclaration::IndexedGetter(unsigned int, bool&, nsAString_internal&) /usr/local/google/home/aarya/firefox/src/layout/style/nsDOMCSSDeclaration.cpp:165
#6 0x7fa26e8b0945 in mozilla::dom::CSS2PropertiesBinding::DOMProxyHandler::get(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>) dom/bindings/./CSS2PropertiesBinding.cpp:19927
#7 0x7fa28654ac61 in js::Proxy::get(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>) /usr/local/google/home/aarya/firefox/src/js/src/jsproxy.cpp:2508
#8 0x7fa286566853 in proxy_GetGeneric(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>) /usr/local/google/home/aarya/firefox/src/js/src/jsproxy.cpp:2876
#9 0x7fa2865683c7 in proxy_GetElement(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, unsigned int, JS::MutableHandle<JS::Value>) /usr/local/google/home/aarya/firefox/src/js/src/jsproxy.cpp:2894
#10 0x7fa284375714 in JSObject::getElement(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, unsigned int, JS::MutableHandle<JS::Value>) /usr/local/google/home/aarya/firefox/src/js/src/jsobjinlines.h:621
#11 0x7fa284ed358f in js::GetObjectElementOperation(JSContext*, JSOp, JSObject*, bool, JS::Handle<JS::Value>, JS::MutableHandle<JS::Value>) /usr/local/google/home/aarya/firefox/src/js/src/vm/Interpreter-inl.h:348:18
#12 0x7fa284ed358f in js::GetElementOperation(JSContext*, JSOp, JS::MutableHandle<JS::Value>, JS::Handle<JS::Value>, JS::MutableHandle<JS::Value>) /usr/local/google/home/aarya/firefox/src/js/src/vm/Interpreter-inl.h:455
#13 0x7fa284ed358f in js::jit::DoGetElemFallback(JSContext*, js::jit::BaselineFrame*, js::jit::ICGetElem_Fallback*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::MutableHandle<JS::Value>) /usr/local/google/home/aarya/firefox/src/js/src/jit/BaselineIC.cpp:3978
#14 0x7fa251aeb9a7 in
0x615000a3d6b8 is located 160 bytes to the right of 24-byte region [0x615000a3d600,0x615000a3d618)
allocated by thread T0 here:
#0 0x434065 in
Shadow bytes around the buggy address:
0x0c2a8013fa80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c2a8013fa90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c2a8013faa0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c2a8013fab0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c2a8013fac0: 00 00 00 fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c2a8013fad0: fa fa fa fa fa fa fa[fa]fa fa fa fa fa fa fa fa
0x0c2a8013fae0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c2a8013faf0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c2a8013fb00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c2a8013fb10: 00 00 00 00 06 fa fa fa fa fa fa fa fa fa fa fa
0x0c2a8013fb20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
ASan internal: fe
==1132==ABORTING
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is known
A high-severity memory corruption bug in CSS Parsing and Computation. Mozilla made it public on 2 January 2014.
About 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.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
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.