Closed Bug 779078 Opened 9 years ago Closed 9 years ago

nsFrame::HandleRelease may cast aEvent to nsMouseEvent even if aEvent is a TouchEvent

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17
Tracking Status
firefox15 --- unaffected
firefox16 + fixed
firefox17 --- fixed
firefox-esr10 --- unaffected

People

(Reporter: smaug, Assigned: wesj)

References

Details

(Keywords: csectype-wildptr, regression, sec-moderate)

Attachments

(1 file)

This is a recent regression from the bug where we started to call ::HandleRelease with
non-nsMouseEvents
Blocks: 732052
Attached patch PatchSplinter Review
::HandlePress just bails for touch events. I guess handleRelease should as well?
Attachment #647586 - Flags: review?(bugs)
Comment on attachment 647586 [details] [diff] [review]
Patch

Perhaps
if (aEvent->eventStructType != NS_MOUSE_EVENT) {
  return NS_OK;
}
Attachment #647586 - Flags: review?(bugs) → review+
Comment on attachment 647586 [details] [diff] [review]
Patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 732052
User impact if declined: bad behavior with setCapture and touch events. bug 774190.
Testing completed (on m-c, etc.): landed on inbound today 7/31/13
Risk to taking this patch (and alternatives if risky): low risk. This is reverting us back to old behavior.
String or UUID changes made by this patch: none.
Attachment #647586 - Flags: approval-mozilla-aurora?
http://hg.mozilla.org/mozilla-central/rev/be1b9c66071a
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Comment on attachment 647586 [details] [diff] [review]
Patch

Low risk, approving for Aurora.
Attachment #647586 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Possibly exploitable because there are virtual methods and data members all in different locations in the two kinds of events, although there's not a lot of precision you could elicit out of a victim on a touch event.
Group: core-security
Target Milestone: --- → mozilla17
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.