--- a/remoting/host/me2me_desktop_environment.cc +++ b/remoting/host/me2me_desktop_environment.cc @@ -206,14 +206,21 @@ bool Me2MeDesktopEnvironment::InitializeSecurity( // running in the LoginWindow context, and refactor this into a separate // function to be used here and in CurtainMode::ActivateCurtain(). bool want_user_interface = getuid() != 0; #else + // SECURITY: enable_user_interface arrives over a Mojo channel whose remote + // end is the low-integrity network process (see desktop_session.mojom: + // "remote owned in the low-privilege network process"). It must NOT be the + // sole gate for the LocalInputMonitor — that monitor is what prevents the + // remote side from racing/overriding the physical console user's input. + // Create the monitor unconditionally, mirroring it2me_desktop_environment.cc. bool want_user_interface = desktop_environment_options().enable_user_interface(); #endif +#if BUILDFLAG(IS_WIN) + // Create the local input monitor unconditionally on Windows. This matches + // It2MeDesktopEnvironment (it2me_desktop_environment.cc:62-63) and ensures + // RemoteInputFilter::LocalPointerMoved/LocalKeyPressed always fire even if + // a compromised network process sends enable_user_interface=false. + local_input_monitor_ = interaction_strategy().CreateLocalInputMonitor(); + local_input_monitor_->StartMonitoringForClientSession(client_session_control); +#endif + if (want_user_interface) { +#if !BUILDFLAG(IS_WIN) // Create the local input monitor. local_input_monitor_ = interaction_strategy().CreateLocalInputMonitor(); local_input_monitor_->StartMonitoringForClientSession( client_session_control); +#endif // Create the disconnect window. #if BUILDFLAG(IS_WIN)