Closed
Bug 1568291
Opened 5 years ago
Closed 5 years ago
Check for and deny special process identifiers in base::KillProcess
Categories
(Core :: IPC, defect, P1)
Core
IPC
Tracking
()
RESOLVED
FIXED
mozilla70
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: jld, Assigned: jld)
References
Details
Attachments
(1 file)
This is part of bug 1314711 and bug 1564976: it's too easy to accidentally call base::KillProcess
with a process handle that's actually an in-band null, like:
- Unix pid 0, which indicates the caller's process group (i.e., kill the whole browser)
- Windows
INVALID_HANDLE_VALUE
, which is not an invalid handle value and in fact is the same value returned byGetCurrentProcess()
- Unix pid -1, which would kill every other process owned by the user
- Windows
nullptr
/NULL
/0
, which is an invalid handle value and should just fail
So we should check for that and not do it. We should also reconsider how we handle nullable process identifiers, but that's a larger project.
Comment 1•5 years ago
|
||
Type: defect → task
Assignee | ||
Comment 2•5 years ago
|
||
(In reply to Release mgmt bot [:sylvestre / :calixte / :marco for bugbug] from comment #1)
Bugbug thinks this bug is a task, but please change it back in case of error.
I already thought about the bug type. This is a fix or at least workaround (depending on how you look at it) for a browser crash — or, potentially, killing all the user's running apps and causing an OS-level logout — so I'm treating it as a defect.
Type: task → defect
Assignee | ||
Comment 3•5 years ago
|
||
Pushed by jedavis@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a5333943843b
Be more defensive in base::KillProcess. r=froydnj
Comment 5•5 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox70:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in
before you can comment on or make changes to this bug.
Description
•