New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 833806 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Dec 7
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

[fido] FidoDevice::Cancel does not cancel ongoing operations

Project Member Reported by jdoerrie@chromium.org, Apr 17 2018

Issue description

In the current implementation both FidoHidDevice and FidoBleDevice treat cancel commands as regular messages that will be en-queued if the underlying device is currently busy [1,2]. The net effect of this is that the ongoing operation will never be cancelled, since the cancel command will only be issued once the operation completes or errors out. Fixing this will require a method that immediately sends messages to the device as soon as possible.

[1] https://codesearch.chromium.org/chromium/src/device/fido/fido_ble_device.cc?l=54-60&rcl=b891d95d59d0d2e98dc1d4683f91089eca2da408
[2] https://codesearch.chromium.org/chromium/src/device/fido/fido_hid_device.cc?l=41-47,95-96&rcl=b891d95d59d0d2e98dc1d4683f91089eca2da408
 
Labels: -Pri-2 Pri-1
Owner: hongjunchoi@chromium.org
Status: Started (was: Untriaged)
Labels: -Pri-1 Pri-2
Project Member

Comment 3 by bugdroid1@chromium.org, Jun 23 2018

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

commit 12ed67d3c95b9239a3d580f5437c203ad3dd56f6
Author: Jun Choi <hongjunchoi@chromium.org>
Date: Sat Jun 23 22:49:25 2018

Fix Cancel operation on FidoHidDevice

Current Cancel operation on FidoHidDevice does not conform to behavior
defined by the CTAP spec. More specifically, CTAP spec mandates that once
Cancel operation is invoked, all pending transactions must be deleted
and cancel command must be sent before any remaining transactions. This
is not how current FidoHidDevice works. Currently FidoHidDevice will
simply add Cancel command packet into a queue and wait for prior
transaction to finish before sending Cancel command to the device.

Bug:  833806 
Change-Id: I66f67e1ff36aa724c0340fd6630a941da911921b
Reviewed-on: https://chromium-review.googlesource.com/1111617
Commit-Queue: Jun Choi <hongjunchoi@chromium.org>
Reviewed-by: Jan Wilken Dörrie <jdoerrie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569914}
[modify] https://crrev.com/12ed67d3c95b9239a3d580f5437c203ad3dd56f6/device/fido/fido_hid_device.cc
[modify] https://crrev.com/12ed67d3c95b9239a3d580f5437c203ad3dd56f6/device/fido/fido_hid_device.h
[modify] https://crrev.com/12ed67d3c95b9239a3d580f5437c203ad3dd56f6/device/fido/fido_hid_device_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment