Crash in mozilla::EditorEventListener::MouseClick

RESOLVED FIXED in Firefox 52



2 years ago
2 years ago


(Reporter: philipp, Assigned: masayuki)


({crash, csectype-nullptr, testcase-wanted})

46 Branch
Windows 7
crash, csectype-nullptr, testcase-wanted
Bug Flags:
qe-verify -

Firefox Tracking Flags

(firefox49 wontfix, firefox50 wontfix, firefox51 wontfix, firefox52 fixed, firefox53 fixed, firefox54 fixed)


(Whiteboard: [sg:dos], crash signature)

MozReview Requests


Submitter Diff Changes Open Issues Last Updated
Error loading review requests:


(1 attachment)



2 years ago
This bug was filed from the Socorro interface and is 
report bp-59b189b4-3f80-413d-a89b-1dbf42161105.
Crashing Thread (0)
Frame 	Module 	Signature 	Source
0 	xul.dll 	mozilla::EditorEventListener::MouseClick(nsIDOMMouseEvent*) 	editor/libeditor/EditorEventListener.cpp:673
1 	xul.dll 	mozilla::EditorEventListener::HandleEvent(nsIDOMEvent*) 	editor/libeditor/EditorEventListener.cpp:453
2 	xul.dll 	mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, nsIDOMEvent*, mozilla::dom::EventTarget*) 	dom/events/EventListenerManager.cpp:1133
3 	xul.dll 	mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, nsIDOMEvent**, mozilla::dom::EventTarget*, nsEventStatus*) 	dom/events/EventListenerManager.cpp:1286
4 	xul.dll 	mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) 	dom/events/EventDispatcher.cpp:357
5 	xul.dll 	mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, nsIDOMEvent*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) 	dom/events/EventDispatcher.cpp:710
6 	mozglue.dll 	mozilla::TimeStamp::Now(bool) 	mozglue/misc/TimeStamp_windows.cpp:529
7 	xul.dll 	nsTArray_base<nsTArrayInfallibleAllocator, nsTArray_CopyWithMemutils>::EnsureCapacity<nsTArrayFallibleAllocator>(unsigned int, unsigned int) 	obj-firefox/dist/include/nsTArray-inl.h:169
8 	xul.dll 	nsCOMPtr_base::assign_with_AddRef(nsISupports*) 	xpcom/glue/nsCOMPtr.cpp:52
9 	xul.dll 	PresShell::HandleEventWithTarget(mozilla::WidgetEvent*, nsIFrame*, nsIContent*, nsEventStatus*) 	layout/base/nsPresShell.cpp:8103
10 	xul.dll 	mozilla::EventStateManager::CheckForAndDispatchClick(mozilla::WidgetMouseEvent*, nsEventStatus*) 	dom/events/EventStateManager.cpp:4642
11 	xul.dll 	mozilla::EventStateManager::PostHandleEvent(nsPresContext*, mozilla::WidgetEvent*, nsIFrame*, nsEventStatus*) 	dom/events/EventStateManager.cpp:3143

this is a low level crash on windows 7 and above.

some of the user comments indicates that this is happening when they are using alternative input devices like a pen or the win10 touch keyboard.

many comments also seem to suggest that it is happening repeatedly on certain sites:
*keeps crashing at credit union site
*same problem- crashing at credit union site
*This is about the 4th or 5th time today I've had a crash. Starting to suspect it's the website but submitting anyway in case it's something else.
*This is getting ridiculous. EVERY time I try to transfer money the site crashes. What gives?
*it appears this happens once i try to put in a dollar amount on my banking site. This has happened four times this morning..kind of worried.
*What is wrong with this site. It continually crashes!!!!!!!!!
*Fourth crash. Happens every time I go on this site.


2 years ago
Priority: -- → P2
Keywords: csectype-nullptr, testcase-wanted
Whiteboard: [sg:dos]
Why is mEditorBase null even if we already refcounted?
Although, I still don't have any idea to reproduce this, we should fix this and uplift because this bug will be "hidden" by another security fix but it won't be uplifted.
Assignee: nobody → masayuki
Comment hidden (mozreview-request)

Comment 5

2 years ago
Comment on attachment 8831642 [details]
Bug 1315450 EditorEventListener::MouseClick() should check if mEditorBase is available before calling its ForceCompositionEnd()
Attachment #8831642 - Flags: review?(bugs) → review+

Comment 6

2 years ago
Pushed by
EditorEventListener::MouseClick() should check if mEditorBase is available before calling its ForceCompositionEnd() r=smaug

Comment 7

2 years ago
Last Resolved: 2 years ago
status-firefox54: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Comment on attachment 8831642 [details]
Bug 1315450 EditorEventListener::MouseClick() should check if mEditorBase is available before calling its ForceCompositionEnd()

Approval Request Comment
[Feature/Bug causing the regression]: Perhaps, ancient crash bug.
[User impact if declined]: Meets this crash when editor has gone at clicking in editor.
[Is this code covered by automated tests?]: No.
[Has the fix been verified in Nightly?]: Still not sure how to reproduce this crash.
[Needs manual test from QE? If yes, steps to reproduce]: No.
[List of other uplifts needed for the feature/fix]: No.
[Is the change risky?]: No.
[Why is the change risky/not risky?]: Because just adding nullptr check of mEditorBase before calling its method.
[String changes made/needed]: No.

FYI: This crash will be "hidden" by fixing bug 1314053 but the fix won't be uplifted due to risk management. So, I'd like to uplift only the fixes of crash safely.
Attachment #8831642 - Flags: approval-mozilla-beta?
Attachment #8831642 - Flags: approval-mozilla-aurora?
Comment on attachment 8831642 [details]
Bug 1315450 EditorEventListener::MouseClick() should check if mEditorBase is available before calling its ForceCompositionEnd()

avoid null dereference in editor, aurora53+, beta52+
Attachment #8831642 - Flags: approval-mozilla-beta?
Attachment #8831642 - Flags: approval-mozilla-beta+
Attachment #8831642 - Flags: approval-mozilla-aurora?
Attachment #8831642 - Flags: approval-mozilla-aurora+

Comment 10

2 years ago
status-firefox53: --- → fixed

Comment 11

2 years ago
status-firefox52: affected → fixed
Flags: qe-verify-
Too late for 51. Mark 51 won't fix.
status-firefox50: affected → wontfix
status-firefox51: affected → wontfix
You need to log in before you can comment on or make changes to this bug.