New issue
Advanced search Search tips

Issue 711750 link

Starred by 0 users

Issue metadata

Status: Archived
Owner: ----
Closed: Apr 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Native messaging host call %COMSPEC% /L but not /D

Reported by refack@gmail.com, Apr 14 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36

Steps to reproduce the problem:
1. Install extension with binary component

What is the expected behavior?
Native-messaging-host is run via `cmd.exe /d /c`

What went wrong?
Native-messaging-host run via `cmd.exe /c` executing "AutoRun commands from registry" and locking their dlls unnecessarily.

`C:\WINDOWS\system32\cmd.exe /c "C:\Program Files (x86)\LastPass\nplastpass.exe" chrome-extension://hdokiejnpimakedhajhdlcegeplioahd/ --parent-window=0 < \\.\pipe\chrome.nativeMessaging.in.4de9a182aa9c8622 > \\.\pipe\chrome.nativeMessaging.out.4de9a182aa9c8622`

WebStore page: https://chrome.google.com/webstore/detail/lastpass-free-password-ma/hdokiejnpimakedhajhdlcegeplioahd

Did this work before? No 

Chrome version: 57.0.2987.133  Channel: stable
OS Version: 10.0
Flash Version: 25,0,0,148

Do you really need cmd.exe just for the piping of stdin & stdout? Wouldn't a tiny exe do the same job solving #539715 and #387233
 
Labels: Needs-Triage-M57
Regarding the last comment: Yes, replacing cmd.exe with a separate binary would be the best solution. Or alternatively it can be chrome.exe running with a different --type.

Comment 4 by refack@gmail.com, Apr 18 2017

Yes, cloud be like a 100loc file, open both pipes by name and connect to new process...
If I would to write one (mostly for practice), where would I put it's code, and incorporate into the build?
Project Member

Comment 5 by bugdroid1@chromium.org, Apr 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/50101199bf7650dc70c0c0e03e1981d4f0ee7f73

commit 50101199bf7650dc70c0c0e03e1981d4f0ee7f73
Author: refack <refack@gmail.com>
Date: Tue Apr 18 01:12:50 2017

On windows call a "Native messaging host" with /D

Without /D, cmd.exe will be executing "AutoRun commands from registry".
Beside most probably them being useless in this scenario, the long running
host process locks any related DLLs for no good reason

BUG= 711750 
R=sergeyu@chromium.org

Review-Url: https://codereview.chromium.org/2817383002
Cr-Commit-Position: refs/heads/master@{#465089}

[modify] https://crrev.com/50101199bf7650dc70c0c0e03e1981d4f0ee7f73/AUTHORS
[modify] https://crrev.com/50101199bf7650dc70c0c0e03e1981d4f0ee7f73/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc

Comment 6 by refack@gmail.com, Apr 26 2017

Since we landed a "fix" this bug could be closed.
Project Member

Comment 7 by sheriffbot@chromium.org, Apr 27 2018

Status: Archived (was: Unconfirmed)
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment