info->process = base::Process::OpenWithAccess(For IWYU (Include What You Use), consider explicitly including `"base/process/process.h"` in this file since `base::Process` is being directly used here.
LOG(ERROR) << "Failed to open peer process " << info->pid;Consider using `PLOG(ERROR)` instead of `LOG(ERROR)` here. Since `base::Process::OpenWithAccess` uses `OpenProcess` under the hood on Windows, `PLOG` will log the system error (e.g. `ERROR_ACCESS_DENIED`), which can be very helpful for debugging.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
For IWYU (Include What You Use), consider explicitly including `"base/process/process.h"` in this file since `base::Process` is being directly used here.
Done
LOG(ERROR) << "Failed to open peer process " << info->pid;Consider using `PLOG(ERROR)` instead of `LOG(ERROR)` here. Since `base::Process::OpenWithAccess` uses `OpenProcess` under the hood on Windows, `PLOG` will log the system error (e.g. `ERROR_ACCESS_DENIED`), which can be very helpful for debugging.
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
In general this looks OK but I would like to adjust some of the names.
base::Process process;Can we call this `peer_process`?
bool should_open_caller_process = false;I would prefer that this is more authoritative, something like 'include_peer_process_info' or 'include_peer_info'. The current wording does not imply that anything will be provided, just that it will open the process.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
base::Process process;Can we call this `peer_process`?
I'm following the existing naming scheme of other fields. Maybe the struct itself should be renamed `PeerConnectionInfo`, but that would be a large refactoring.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +1 |
PTAL thanks!
I would prefer that this is more authoritative, something like 'include_peer_process_info' or 'include_peer_info'. The current wording does not imply that anything will be provided, just that it will open the process.
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
// The process of the peer. Only valid if |should_open_caller_process| is trueinclude_peer_process_info
// checks for Linux, which might be susceptible of PID reuse attacks.nit: to
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +2 |
// The process of the peer. Only valid if |should_open_caller_process| is trueYuwei Huanginclude_peer_process_info
Done
// checks for Linux, which might be susceptible of PID reuse attacks.Yuwei Huangnit: to
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
15 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: remoting/host/mojo_caller_security_checker.cc
Insertions: 1, Deletions: 1.
@@ -77,7 +77,7 @@
caller_process_image_path = GetProcessImagePath(caller.process);
#else
// TODO: yuweih - see if it's possible to move away from PID-based security
- // checks for Linux, which might be susceptible of PID reuse attacks.
+ // checks for Linux, which might be susceptible to PID reuse attacks.
caller_process_image_path = GetProcessImagePath(caller.pid);
#endif
```
```
The name of the file: components/named_mojo_ipc_server/connection_info.h
Insertions: 1, Deletions: 1.
@@ -33,7 +33,7 @@
#elif BUILDFLAG(IS_LINUX)
ucred credentials{};
#elif BUILDFLAG(IS_WIN)
- // The process of the peer. Only valid if |should_open_caller_process| is true
+ // The process of the peer. Only valid if `include_peer_process_info` is true
// in EndpointOptions.
base::Process process;
#endif
```
Improve security of IsTrustedMojoEndpoint
Add a new should_open_caller_process endpoint option, which makes the
endpoint connector open a process handle and set it in ConnectionInfo.
IsTrustedMojoEndpoint then uses it to validate the process image path.
This minimizes the window of potential PID-reuse attacks.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |