Cursor mouse move automatically after fullscreen mode (using requestPointerLock()) lead to clickjacking
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: sas.kunz, Assigned: edgar)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
(4 keywords, Whiteboard: [overlap with 1857430--eval bounties at the same time][reporter-external] [client-bounty-form] [verif?][adv-main123+][adv-esr115.8+])
Attachments
(11 files, 2 obsolete files)
3.07 MB,
video/mp4
|
Details | |
243 bytes,
text/html
|
Details | |
1.89 KB,
text/html
|
Details | |
800 bytes,
text/html
|
Details | |
4.02 KB,
image/jpeg
|
Details | |
1.34 KB,
text/html
|
Details | |
642.25 KB,
video/mp4
|
Details | |
48 bytes,
text/x-phabricator-request
|
tjr
:
sec-approval+
|
Details | Review |
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-esr115+
|
Details | Review |
362 bytes,
text/plain
|
Details |
i found vulnerability where Cursor mouse move automatically after fullscreen mode lead to spoof (it allow permission)
- open new.html
2.,click open button - after popup shown click once on 3-5 click button until popup window shown , then click 3-5 times
OS: Windows 10
119.0b9 (64-bit)
Comment 6•1 year ago
|
||
I don't understand the "spoof" in the summary. The URL bar is visible and shows the right things, as far as I can tell?
ISTM the think this is about is clickjacking because requestPointerLock
moves the mouse. Is that right?
Yes, it's true that this is clickjacking because the mouse cursor moves automatically after fullscreen mode
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Comment 8•1 year ago
|
||
I think this should be an S2. It does require some specific user interaction, but the results are rather bad. We should at least figure out how hard it is to fix.
Reporter | ||
Comment 10•1 year ago
|
||
i created simple poc
Reporter | ||
Comment 11•1 year ago
|
||
Reporter | ||
Comment 12•1 year ago
|
||
Reporter | ||
Comment 13•1 year ago
|
||
POC:
- open lock2-5_new.html
- click fastly on the button 3-6 times
Reporter | ||
Comment 14•1 year ago
|
||
I don't understand why this bug is given sec-moderate while my other report with something similar like this is given sec-high (https://bugzilla.mozilla.org/show_bug.cgi?id=1857430)
Comment 15•1 year ago
|
||
They are both in the mushy borderline of potentially high impact vs requiring too much victim participation. "click here to win a prize" exploits are a true sec-high. "play my game" exploits will have high impact, but only on a limited number of victims because no one's got time for games like that. If you've got the skills to make a compelling enough game you would make more legit money on games than scamming people for camera permission.
As a result the ratings in this zone depend a lot on the people in the room when we triage and probably our mood. Today when I look at these two bugs again I might call this one sec-high as more convincing, and the other bug sec-moderate. But they're obviously related. Depending on how bug 1857430 is fixed that might make this bug even less convincing, because in part you're taking advantage of the same "button-enable timer is already running during the transition" effect.
Bug bounties for highest-moderate and lowest-high are in the same range, if that's your concern. I'll raise this one for now, but we need to reevaluate when we know how much the fix for one affects the other.
Updated•1 year ago
|
Comment 16•1 year ago
|
||
Bug 1863083 is about using moveTo to trick the user into clicking on a permission dialogue which is kind of in the same general ballpark.
Comment 17•1 year ago
|
||
Paul, is this something that should be dealt with in the permissions code like bug 1857430? If so, we can move it over there. Thanks.
Comment 18•1 year ago
|
||
Isn't the bug here rather that pointerlock changes the mouse position? Bug 1857430 doesn't address the mouse move issue. It does however make the issue less severe by making sure the button isn't clickable for longer.
Comment 19•1 year ago
|
||
I don't know what the bug is, that's why I was asking. Thanks, I'll leave it here then.
Assignee | ||
Comment 20•1 year ago
|
||
When pointer lock is requested, we store the mouse position and attempt to reset the mouse to the same position after pointer lock is released. These actions are all handled in content process, but content process might not always know the precise position of the mouse, e.g. mouse is not on the web content, but somewhere else. In such case, mouse is reset to top-left of content after pointer lock. We probably should handle that in parent process, rather than content process.
Comment 21•1 year ago
|
||
Edgar, assigning this to you since you've been investigating this and exploring the best solution.
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 22•1 year ago
|
||
The fix might require two things,
- Lock pointer to <xul browser> also in parent process when content requests pointer lock.
- Handle reset-pointer-to-central in parent process (now it is handled in content process).
Assignee | ||
Comment 23•1 year ago
|
||
Bug 1255338 is a more generic change which should also fix this.
Assignee | ||
Comment 24•1 year ago
|
||
When I am working on bug 1255338, I found there is a simpler patch that can improve this bug, though it doesn't fully fix the underlying issue, but the patch is simpler and can be uplifted safely. The full fix will still be handled in bug 1255338.
Reporter | ||
Comment 25•1 year ago
|
||
Can security bugs depend on non-security bugs?
Assignee | ||
Comment 26•1 year ago
|
||
Comment 27•1 year ago
|
||
(In reply to Hafiizh from comment #25)
Can security bugs depend on non-security bugs?
Yes, that's fine. The dependence is hidden from people who don't have security access. The main issue is ensuring that the patch gets uplifted everywhere that is appropriate, but that can usually be tracked in the security bug.
Updated•1 year ago
|
Assignee | ||
Comment 28•1 year ago
|
||
Comment on attachment 9368856 [details]
Bug 1860065 - Use sLastScreenPoint to restore mouse position after releasing pointer lock; r?smaug
Security Approval Request
- How easily could an exploit be constructed based on the patch?: It may not be difficult; the patch indicates that the problem is related to the mouse position resetting after exiting pointer lock.
- Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem?: No
- Which older supported branches are affected by this flaw?: All
- If not all supported branches, which bug introduced the flaw?: None
- Do you have backports for the affected branches?: Yes
- If not, how different, hard to create, and risky will they be?: The patch should be applied without too much conflicts.
- How likely is this patch to cause regressions; how much testing does it need?: It should be safe; the change is not complicated.
- Is Android affected?: Yes
Comment 29•1 year ago
|
||
Comment on attachment 9368856 [details]
Bug 1860065 - Use sLastScreenPoint to restore mouse position after releasing pointer lock; r?smaug
Approved to land and uplift if desired
Comment 30•1 year ago
|
||
![]() |
||
Comment 31•1 year ago
|
||
Assignee | ||
Comment 32•1 year ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D196544
Updated•1 year ago
|
Comment 33•1 year ago
|
||
Uplift Approval Request
- String changes made/needed: None
- Risk associated with taking this patch: Low
- Explanation of risk level: Using last screen pointer to restore the mouse position is pretty straightforward
- User impact if declined: Cursor mouse might move automatically after releasing pointer lock and lead to clickjacking
- Steps to reproduce for manual QE testing: Use the test script in https://bugzilla.mozilla.org/show_bug.cgi?id=1860065#c13
- Code covered by automated testing: no
- Is Android affected?: yes
- Fix verified in Nightly: yes
- Needs manual QE test: yes
Updated•1 year ago
|
Updated•1 year ago
|
Comment 34•1 year ago
|
||
We also need a patch and uplift request for the ESR115 branch if all branches are affected, thanks.
Updated•1 year ago
|
Assignee | ||
Comment 35•1 year ago
|
||
(In reply to Pascal Chevrel:pascalc from comment #34)
We also need a patch and uplift request for the ESR115 branch if all branches are affected, thanks.
I will prepare a patch for ESR115. Thanks!
Assignee | ||
Comment 36•1 year ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D196544
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 37•1 year ago
•
|
||
I have reproduced this issue on Win 11 x64 using STR from comment 0 and comment 13, on an affected Nightly build (2023-10-18).
Confirming this issue as verified fixed on 124.0a1(20240130045011) using Windows 11, Ubuntu 22 and macOS 14.
Updated•1 year ago
|
Updated•1 year ago
|
Comment 38•1 year ago
|
||
uplift |
Assignee | ||
Comment 39•1 year ago
|
||
Updated•1 year ago
|
Comment 40•1 year ago
|
||
Uplift Approval Request
- User impact if declined: Cursor mouse might move automatically after releasing pointer lock and lead to clickjacking
- Fix verified in Nightly: yes
- Steps to reproduce for manual QE testing: Use the test script in https://bugzilla.mozilla.org/show_bug.cgi?id=1860065#c13
- Risk associated with taking this patch: Low
- Needs manual QE test: yes
- Explanation of risk level: Using last screen pointer to restore the mouse position is pretty straightforward
- String changes made/needed: None
- Is Android affected?: yes
- Code covered by automated testing: no
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 41•1 year ago
|
||
Confirming this issue as verified fixed on 123.0b4(20240129091730) using Windows 11, Ubuntu 22 and macOS 14.
Updated•1 year ago
|
Comment 42•1 year ago
|
||
uplift |
Updated•1 year ago
|
Comment 43•1 year ago
|
||
Confirming this issue as verified fixed on 115.8.0esr(20240212204114) using Windows 11, Ubuntu 22 and macOS 14.
Updated•1 year ago
|
Updated•1 year ago
|
Comment 44•1 year ago
|
||
Updated•1 year ago
|
Updated•9 months ago
|
Updated•9 months ago
|
Updated•5 months ago
|
Description
•