New issue
Advanced search Search tips

Issue 630659 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Dec 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

[Linux] [Security Key] SecurityKeySocket unit tests need updating

Project Member Reported by joedow@chromium.org, Jul 22 2016

Issue description

While working on a separate bug, I noticed that I would see the following error in the debug output after calling 'SendErrorAndCloseActiveSocket':

[0722/094040:INFO:security_key_auth_handler_linux.cc(464)] ** Core::SendErrorAndCloseActiveSocket() called on: ChromotingFileThread

[0722/094040:ERROR:security_key_socket.cc(91)] Error sending response: -101

Tracing through the SecurityKeySocket code, it looks like the write operation is async, but 'SendErrorAndCloseActiveSocket' sends the ssh code and immediately closes the socket.  When the callback is called, the result is an error code.

I think it is worth investigating to see if this error code is valid or if the data is actually sent and and the result is just a byproduct of the socket being closed now.

I haven't seen any end-user problems as a result of this so I am marking this as P3 for now.
 
Status: Started (was: Assigned)

Comment 2 by joedow@chromium.org, Dec 13 2016

Summary: [Linux] [Security Key] SecurityKeySocket unit tests need updating (was: [Linux] [Security Key] SendErrorAndCloseActiveSocket may fail to send Ssh error code)
I've updated several of the relevant unit tests and it looks like this scenario is working.  I think the updates to the unit tests do provide value though so I am going to update this bug to track that work instead.
Project Member

Comment 3 by bugdroid1@chromium.org, Dec 14 2016

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

commit 865c534bef93f875acf0073efcbbf79e201339fd
Author: joedow <joedow@chromium.org>
Date: Wed Dec 14 03:05:47 2016

Fixing SecurityKeySocket unit test issues

The low-level security key unit tests had a few problems that I am
fixing in this CL:
1.) Several unit tests didn't actually test anything
2.) The other unit tests did not have enough validation

There is also some minor renaming and trimming to get more code to fit
on a single line instead of spanning mulitple lines.

BUG= 630659 

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

[modify] https://crrev.com/865c534bef93f875acf0073efcbbf79e201339fd/remoting/host/security_key/security_key_auth_handler_posix.cc
[modify] https://crrev.com/865c534bef93f875acf0073efcbbf79e201339fd/remoting/host/security_key/security_key_auth_handler_posix_unittest.cc
[modify] https://crrev.com/865c534bef93f875acf0073efcbbf79e201339fd/remoting/host/security_key/security_key_extension_session.cc
[modify] https://crrev.com/865c534bef93f875acf0073efcbbf79e201339fd/remoting/host/security_key/security_key_socket.cc

Comment 4 by joedow@chromium.org, Dec 14 2016

Status: Verified (was: Started)

Sign in to add a comment