[Windows] PATH expansion occurs in every process
Categories
(Core :: Widget: Win32, enhancement, P3)
Tracking
()
People
(Reporter: rkraesig, Unassigned)
References
Details
Attachments
(2 obsolete files)
(Followup from bug 1753910.)
The PATH environment variable is expanded at startup to avert a class of binary planting attacks (bug 642469). However, this is done in every process, and doesn't really need to be.
| Reporter | ||
Comment 1•3 years ago
|
||
The above two patches are both unsatisfying:
- The code in
D139432is self-contained, but its effects are not: it adds a new environment variable which isn't completely trustworthy. (It also does some C-style string twiddling, but that could be avoided.) - The
D139388patch uses only existing facilities and has fewer lines of code; but it's also very difficult to test, and those existing facilities are somewhat hairy.
It's possible there's a better approach than either of these. But, given that:
- running
SanitizeEnvironmentVariablestwice will have no practical effect on almost any system, - the original Microsoft CVE seems to have been fixed as of Win10 (or at least I couldn't reproduce it), and
- PATH-based DLL planting isn't considered a significant risk nowadays,
... I'm not sure this is worth addressing.
| Reporter | ||
Comment 2•3 years ago
|
||
It probably isn't going to help to expand PATH multiple times: if the
first pass didn't get them all, there's likely some recursion afoot.
Expand PATH only in the topmost Firefox process in the process tree.
Add tests confirming this.
Updated•3 years ago
|
| Reporter | ||
Comment 3•3 years ago
|
||
It probably isn't going to help to expand PATH multiple times: if the
first pass didn't get them all, there's probably some recursion afoot.
Expand PATH only in the launcher process (including when the launcher
process is just the browser).
Depends on D139072
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
| Reporter | ||
Comment 4•3 years ago
|
||
Removing myself as the assignee, since I don't foresee coming back to this anytime soon.
Description
•