touchend and click should share a UserGestureToken
Reported by
bogema...@gmail.com,
Oct 21 2016
|
||||||
Issue descriptionVULNERABILITY DETAILS In the mobile application chrome can do a redirect to the current page, and further open two new tabs to bypass the protection against pop-ups. It can be used to redirect users to malicious or advertising links. VERSION Chrome Version: 52.0.2743.98 stable Operating System: Android 4.1.2; LT26w Build/6.2.B.1.96
,
Oct 24 2016
seems like touchend and click don't share the same user gesture token :-/
,
Oct 24 2016
given that the repro actually manages to open two popups on one user gesture, I'd consider this a low risk security issue
,
Oct 24 2016
Yeah getting two pop-ups instead of only one on a tap is known limitation of our current design (considered very low severity). Still we should track fixing it - it _might_ not be that hard. We'd have to cache the token in blink and try to re-use it on GestureTap events. But we'd have to be careful to create a new token if none exists (eg. may not have gotten any touch events) and not to re-use a really old unrelated token (will have timed out).
,
Oct 26 2016
There's m_lastMouseDownUserGestureToken https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/input/EventHandler.h?rcl=1477451763&l=368 which is used to connect mousedown/click/mouseup I think we can just use that for the touch events as well
,
Oct 26 2016
Technically someone could click with the mouse at the same time as tapping the touch screen and those would be two user gestures, but this is a niche scenario probably not worth worrying about. The only non-trivial bit I see is knowing when to clear the token. If we just saved a token on touchend and re-used it for GestureTap, that would break in the cases where the page has no touch listeners so we hit the optimization where touchend events aren't sent to blink at all. But perhaps we could just clear the saved token after every GestureTap (and LongPres etc.) as well as every touchstart. Still might be quite simple. Note that there's also TouchEventManager::m_touchSequenceUserGestureToken which is more directly applicable here, but I was hoping to delete that: https://codereview.chromium.org/2414273003/
,
Oct 26 2016
Maybe we just need to plumb a flag through that tells the event handler that the mouse events are actually touch events, so they should use the touch flag. that would also solve the real touch + real click at the same time issue
,
Oct 26 2016
We have that flag, but I don't think we need it. The UGI is taken in code that's already not shared between the touch and mouse paths. This isn't a problem about sharing the mouse token and the touch token. It's about sharing the touch token with the gesture token (https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/input/GestureManager.cpp?type=cs&sq=package:chromium&l=185)
,
Jan 23 2017
Rick, is this issue still open? I'm not sure what the state of the gesture interventions currently is..
,
Jan 23 2017
Yes this is still open. Gesture events (like GestureTap which generates click) and Touch events (like touchend) are almost completely disconnected in blink. So sharing a gesture token between them is probably difficult. I'd call this Pri-3 myself (given my guess at low benefit and non-trivial cost). But it's up to the input folks (dtapuska, nzolghadr, mustaq). Perhaps it's simpler to implement correctly than I'm guessing?
,
Jun 12 2017
Let's block it on our simple user gesture project.
,
Nov 1 2017
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by mbarbe...@chromium.org
, Oct 22 2016Labels: -Type-Bug-Security -Restrict-View-SecurityTeam Type-Bug
Status: Untriaged (was: Unconfirmed)