New issue
Advanced search Search tips

Issue 734431 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

ssh_client: -oUserKnownHostsFile=/dev/null hangs

Project Member Reported by vapier@chromium.org, Jun 18 2017

Issue description

trying to pass -oUserKnownHostsFile=/dev/null fails.  enabling verbose debugging shows:

debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2 GoogleMDI-2.0
debug1: match: OpenSSH_7.2 GoogleMDI-2.0 pat OpenSSH* compat 0x04000000
debug2: fd 100 setting O_NONBLOCK
debug1: Authenticating to vapier.cam.corp.google.com:22 as 'vapier'
debug3: hostkeys_foreach: reading file "/dev/null"
 

Comment 1 Deleted

Project Member

Comment 2 by bugdroid1@chromium.org, Oct 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/apps/libapps/+/2978ab76b7189e0c474c1dcebd6a3d32523b8ba7

commit 2978ab76b7189e0c474c1dcebd6a3d32523b8ba7
Author: Mike Frysinger <vapier@chromium.org>
Date: Fri Oct 20 17:08:03 2017

ssh_client: fix /dev/null reads

Reads on the /dev/null file should always return 0 and leave the buffer
alone.  Our NaCl shim was instead zeroing out the buffer and saying it
read the requested number of bytes.  Any code that tried to read the file
would get stuck in an infinite loop as the file never "ended".  We didn't
notice as this isn't a common scenario, but if you were to use it for an
option like UserKnownHostsFile, the ssh session would hang.

BUG= chromium:734431 

Change-Id: Ia770faa475b2e6428eb1e6c98a44bb751c07a4be
Reviewed-on: https://chromium-review.googlesource.com/729526
Reviewed-by: Brandon Gilmore <varz@google.com>
Tested-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/2978ab76b7189e0c474c1dcebd6a3d32523b8ba7/ssh_client/src/dev_null.cc

Comment 3 by vapier@chromium.org, Oct 20 2017

Owner: vapier@chromium.org
Status: Fixed (was: Available)
should be fixed for nassh-0.8.38+

Sign in to add a comment