File Picker window is not closed after associated web content window is closed
Categories
(Core :: Widget: Win32, defect)
Tracking
()
People
(Reporter: jayateertha043, Unassigned)
Details
(Keywords: reporter-external, Whiteboard: [reporter-external] [client-bounty-form] [verif?])
Attachments
(1 file)
470 bytes,
application/x-zip-compressed
|
Details |
Description - File Picker window is not closed even after associated web content window is closed.
Impact -
- Parent process which initiated child process is responsible for management of lifecycle of child process which includes proper termination which other wise would lead to unintended resource usage(CPU/Memory) or zombie process.
- Excessive memory/cpu resource usage than required due to improper process lifecycle management. (Affects availability triad in security point of view, this is more important when working in a resource restrictive environment)
- There's a ongoing topic in whatwg which discusses about getting updates from file picker cancel event in the parent window, if this is implemented in future might again lead to unintended vulnerabilities/memory leaks as file picker will update to a inexistent tab in the call back.
Steps Of Reproduction -
- Open parent.html, This will automatically open child.html in new tab (ensure open pop up is allowed).
- child.html window has a file input, click on it file picker will open.
- Now in the parent.html window, click on Close POP UP Button, which will close the child.html window, Notice that File Picker of child.html is still open.
- Now Close the parent.html window, Notice that File Picker of child.html is still open even after whole firefox browser is closed (all tabs & windows).
parent.html -
<button onclick="openPop()">Open POP UP</button>
<button onclick="closePop()">Close POP UP</button>
<script>
w = window.open("child.html","","popup");
function openPop(){
w = window.open("child.html","","popup");
}
function closePop(){
w.close()
}
</script>
child.html -
<input type="file" id="file1"></input>
Reporter | ||
Comment 1•1 year ago
|
||
Affected Version: 117.0.1 (64-bit) (Windows 11)
Reporter | ||
Comment 2•1 year ago
|
||
Keeping the File Picker Window Open for sometime (may be 2-5 mins) after all the associated window & tabs are closed, causes crash. (This might be UAF or some memory issue, have already submitted a similar report to chromium team too)
Note: Chrome didn't crash as In chrome file picker is closed of browser(all tabs & windows) is closed.
Updated•1 year ago
|
Comment 3•1 year ago
|
||
What OS are you on? I can't reproduce this on MacOS because I am unable to interact with any browser windows while the file picker is open.
Could you please go to about:crashes and attach the link from https://crash-stats.mozilla.org/ for the crash? This will help us triage the bug. Thanks.
Comment 4•1 year ago
|
||
I'm changing the summary to be more specific. "Insecure" could mean a lot of things.
Reporter | ||
Comment 5•1 year ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #4)
I'm changing the summary to be more specific. "Insecure" could mean a lot of things.
Here's the crash report url - https://crash-stats.mozilla.org/report/index/4122cf2b-463e-47f0-90df-d77960230919
I am using 117.0.1 (64-bit) (Windows 11)
Comment 6•1 year ago
|
||
Ray, Nika said you've been looking at file picker stuff. Does this sound like a familiar issue? Thanks.
Comment 7•1 year ago
|
||
This sounds like a Window widget issue, at most, and a shutdown hang is not a security issue. Having a random file picker hanging around doesn't seem like an issue either.
Comment 8•1 year ago
|
||
The not-closing-on-window-closure bug is Bug 1837008, despite the different phrasing. I concur that it's not a security bug, even in the hypothetical case described in the reporter's #3. (That already has to be handled: the user could select a file in that state rather than cancelling.)
The "crash" if the file picker is left open in that state can be easily reproduced, as seen here; as the signature on both it and the user's provided crash report implies, this is a deliberate termination due to a detected shutdown hang, rather than a memory issue.
Updated•1 year ago
|
Updated•4 months ago
|
Description
•