Skip to content
Disclosed report

SEGV in nsStandardURL::BuildNormalizedSpec

Atte Kettunen Follow

Originally disclosed on Mozilla

  • Fixed in 3 days
  • Paid in 9 days
  • Disclosed after 3 days

Created attachment 8675300 firefox-SEGV-nsStandardURLBuildNormalizedSpec-min.html

Tested on:

OS: Ubuntu 14.04

Firefox: ASAN prebuild from http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/mozilla-central-linux64-asan/1445080291/

I hope that the repro-file survives the uploading to the bugzilla. Interesting thing is that with "regular" editor the repro-file looks like:

<link href="http:/‌" />

Which would hexdump: 0000000 bbef 20bf 3c20 696c 6b6e 6820 6572 3d66 0000010 6822 7474 3a70 222f 3e2f 000a

But the actual content is:

0000000 bbef 20bf 3c20 696c 6b6e 6820 6572 3d66 0000010 6822 7474 3a70 e22f 8c80 2f22 0a3e
000001e

ASAN-trace:

ASAN:SIGSEGV

==1085==ERROR: AddressSanitizer: SEGV on unknown address 0x7f7c2ee1395f (pc 0x7f7b24ef9509 sp 0x7ffc03c447a0 bp 0x7ffc03c44fd0 T0) #0 0x7f7b24ef9508 in nsStandardURL::BuildNormalizedSpec(char const*) /builds/slave/m-cen-l64-asan-000000000000000/build/src/netwerk/base/nsStandardURL.cpp:437:0 #1 0x7f7b24f01734 in nsStandardURL::SetSpec(nsACString_internal const&) /builds/slave/m-cen-l64-asan-000000000000000/build/src/netwerk/base/nsStandardURL.cpp:1226:0 #2 0x7f7b24f15180 in nsStandardURL::Init(unsigned int, int, nsACString_internal const&, char const*, nsIURI*) /builds/slave/m-cen-l64-asan-000000000000000/build/src/netwerk/base/nsStandardURL.cpp:2850:0 #3 0x7f7b25194cbc in NewURI /builds/slave/m-cen-l64-asan-000000000000000/build/src/netwerk/protocol/http/nsHttpHandler.cpp:117:0 #4 0x7f7b25194cbc in mozilla::net::nsHttpHandler::NewURI(nsACString_internal const&, char const*, nsIURI*, nsIURI**) /builds/slave/m-cen-l64-asan-000000000000000/build/src/netwerk/protocol/http/nsHttpHandler.cpp:1857:0 #5 0x7f7b24e62896 in nsIOService::NewURI(nsACString_internal const&, char const*, nsIURI*, nsIURI**) /builds/slave/m-cen-l64-asan-000000000000000/build/src/netwerk/base/nsIOService.cpp:619:0 #6 0x7f7b24e8c4e1 in NS_NewURI(nsIURI**, nsACString_internal const&, char const*, nsIURI*, nsIIOService*) /builds/slave/m-cen-l64-asan-000000000000000/build/src/netwerk/base/nsNetUtil.inl:102:0 #7 0x7f7b24e8c765 in NS_NewURI(nsIURI**, nsAString_internal const&, char const*, nsIURI*, nsIIOService*) /builds/slave/m-cen-l64-asan-000000000000000/build/src/netwerk/base/nsNetUtil.inl:113:0 #8 0x7f7b294b1aed in nsGenericHTMLElement::GetURIAttr(nsIAtom*, nsIAtom*, nsIURI**) const /builds/slave/m-cen-l64-asan-000000000000000/build/src/dom/html/nsGenericHTMLElement.cpp:1733:0 #9 0x7f7b294b169d in nsGenericHTMLElement::GetHrefURIForAnchors() const /builds/slave/m-cen-l64-asan-000000000000000/build/src/dom/html/nsGenericHTMLElement.cpp:716:0 #10 0x7f7b293972bd in mozilla::dom::HTMLLinkElement::GetHrefURI() const /builds/slave/m-cen-l64-asan-000000000000000/build/src/dom/html/HTMLLinkElement.cpp:441:0 #11 0x7f7b2702f54c in mozilla::dom::Link::GetURI() const /builds/slave/m-cen-l64-asan-000000000000000/build/src/dom/base/Link.cpp:127:0 #12 0x7f7b29398501 in GetStyleSheetURL /builds/slave/m-cen-l64-asan-000000000000000/build/src/dom/html/HTMLLinkElement.cpp:453:0 #13 0x7f7b29398501 in non-virtual thunk to mozilla::dom::HTMLLinkElement::GetStyleSheetURL(bool*) /builds/slave/m-cen-l64-asan-000000000000000/build/src/obj-firefox/dom/html/Unified_cpp_dom_html1.cpp:455:0 #14 0x7f7b273799da in nsStyleLinkElement::DoUpdateStyleSheet(nsIDocument*, mozilla::dom::ShadowRoot*, nsICSSLoaderObserver*, bool*, bool*, bool) /builds/slave/m-cen-l64-asan-000000000000000/build/src/dom/base/nsStyleLinkElement.cpp:372:0 #15 0x7f7b27378e52 in nsStyleLinkElement::UpdateStyleSheet(nsICSSLoaderObserver*, bool*, bool*, bool) /builds/slave/m-cen-l64-asan-000000000000000/build/src/dom/base/nsStyleLinkElement.cpp:228:0 #16 0x7f7b2661baf4 in nsHtml5DocumentBuilder::UpdateStyleSheet(nsIContent*) /builds/slave/m-cen-l64-asan-000000000000000/build/src/parser/html/nsHtml5DocumentBuilder.cpp:76:0 #17 0x7f7b266d6741 in nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor*, nsIContent**) /builds/slave/m-cen-l64-asan-000000000000000/build/src/parser/html/nsHtml5TreeOperation.cpp:800:0 #18 0x7f7b266c8b79 in nsHtml5TreeOpExecutor::RunFlushLoop() /builds/slave/m-cen-l64-asan-000000000000000/build/src/parser/html/nsHtml5TreeOpExecutor.cpp:448:0 #19 0x7f7b266cefdb in nsHtml5ExecutorFlusher::Run() /builds/slave/m-cen-l64-asan-000000000000000/build/src/parser/html/nsHtml5StreamParser.cpp:127:0 #20 0x7f7b24ccdcbf in nsThread::ProcessNextEvent(bool, bool*) /builds/slave/m-cen-l64-asan-000000000000000/build/src/xpcom/threads/nsThread.cpp:972:0 #21 0x7f7b24d4713a in NS_ProcessNextEvent(nsIThread*, bool) /builds/slave/m-cen-l64-asan-000000000000000/build/src/xpcom/glue/nsThreadUtils.cpp:297:0 #22 0x7f7b255f1b19 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/slave/m-cen-l64-asan-000000000000000/build/src/ipc/glue/MessagePump.cpp:95:0 #23 0x7f7b2556009c in RunInternal /builds/slave/m-cen-l64-asan-000000000000000/build/src/ipc/chromium/src/base/message_loop.cc:234:0 #24 0x7f7b2556009c in RunHandler /builds/slave/m-cen-l64-asan-000000000000000/build/src/ipc/chromium/src/base/message_loop.cc:227:0 #25 0x7f7b2556009c in MessageLoop::Run() /builds/slave/m-cen-l64-asan-000000000000000/build/src/ipc/chromium/src/base/message_loop.cc:201:0 #26 0x7f7b2a6bbe67 in nsBaseAppShell::Run() /builds/slave/m-cen-l64-asan-000000000000000/build/src/widget/nsBaseAppShell.cpp:156:0 #27 0x7f7b2c518cb2 in XRE_RunAppShell /builds/slave/m-cen-l64-asan-000000000000000/build/src/toolkit/xre/nsEmbedFunctions.cpp:785:0 #28 0x7f7b2556009c in RunInternal /builds/slave/m-cen-l64-asan-000000000000000/build/src/ipc/chromium/src/base/message_loop.cc:234:0 #29 0x7f7b2556009c in RunHandler /builds/slave/m-cen-l64-asan-000000000000000/build/src/ipc/chromium/src/base/message_loop.cc:227:0 #30 0x7f7b2556009c in MessageLoop::Run() /builds/slave/m-cen-l64-asan-000000000000000/build/src/ipc/chromium/src/base/message_loop.cc:201:0 #31 0x7f7b2c51839c in XRE_InitChildProcess /builds/slave/m-cen-l64-asan-000000000000000/build/src/toolkit/xre/nsEmbedFunctions.cpp:621:0 #32 0x48d740 in content_process_main(int, char**) /builds/slave/m-cen-l64-asan-000000000000000/build/src/ipc/app/../contentproc/plugin-container.cpp:237:0 #33 0x7f7b22645ec4 in __libc_start_main ??:0:0 #34 0x48ca9c in _start ??:0:0

AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV ??:0 ?? ==1085==ABORTING

###!!! [Parent][MessageChannel] Error: (msgtype=0x280082,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv

[Parent 360] WARNING: pipe error (35): Connection reset by peer: file /builds/slave/m-cen-l64-asan-000000000000000/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 459

The original report as published on Mozilla's Bugzilla, by Atte Kettunen. 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.

What is known

A high-severity security bug in Networking. Mozilla made it public on 20 October 2015.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

More by Atte Kettunen

View all

62 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

Same bug class and techniques, clearest first.