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

Issue 880295 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 17
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome , Mac
Pri: 1
Type: Bug



Sign in to add a comment

[WebAuthN] caBLE DCHECKs when WebAuthenticationBle is enabled

Project Member Reported by jdoerrie@chromium.org, Sep 4

Issue description

Chrome Version       : 71.0.3543.0 (Developer Build) (64-bit)
OS Version: OS X 10.13.6

What steps will reproduce the problem?
1. Start chrome with DCHECKs on, caBLE support and --enable-features="WebAuthenticationBle"
2. Trigger caBLE flow, e.g. by visiting accounts.google.com and logging into whitelisted account
3. Accept caBLE prompt on Phone

What is the expected result?
Sign-in succeeds and a redirect to myaccount.google.com happens.

What happens instead of that?
Chrome hits a DCHECK in FidoRequestHandlerBase::DeviceAdded [1].

Likely explanation:
During the caBLE flow multiple DeviceChanged notifications are sent. Once the caBLE device exposes the Fido service, the regular FidoBleDiscovery finds the device following one of the DeviceChanged notifications [2]. This will call DeviceAdded() and attempt to start a regular Fido BLE Handshake with the device. At some later point in time, the caBLE handshake completes and is validated, at which point DeviceAdded() is invoked another time [3]. This eventually will invoke FidoRequestHandlerBase::DeviceAdded a second time, hitting the DCHECK.

Possible Fix:
Stop the FidoBleDiscovery from connecting to the caBLE device. This could be achieved by replacing the GetDevice() call in FidoBleDiscovery::DeviceChanged with a similar one that checks FidoRequestHandlerBase' active_authenticators() instead.


Assigning to Jun, who is most familiar with this part of the code base.

Verbose Log Output and the first lines of Stack Trace following the crash follow:
[12082:775:0904/161524.962269:VERBOSE2:fido_ble_discovery_base.cc(63)] Got adapter AC:29:3A:F3:C9:01
[12082:775:0904/161524.962343:VERBOSE2:fido_ble_discovery.cc(34)] Adapter AC:29:3A:F3:C9:01 is powered on.
[12082:775:0904/161524.962559:VERBOSE2:fido_ble_discovery_base.cc(63)] Got adapter AC:29:3A:F3:C9:01
[12082:775:0904/161524.963629:VERBOSE2:fido_ble_discovery_base.cc(33)] Discovery session started.
[12082:775:0904/161524.967240:VERBOSE2:fido_cable_discovery.cc(234)] Discovery session started.
[12082:775:0904/161524.968513:ERROR:fido_cable_discovery.cc(277)] Failed to register advertisement: 1
[12082:775:0904/161524.985653:VERBOSE2:fido_cable_discovery.cc(270)] Advertisement registered.
[12082:775:0904/161533.369764:VERBOSE2:fido_cable_discovery.cc(173)] Discovered Cable device: E7:CF:87:DB:D7:D5
[12082:775:0904/161533.369828:VERBOSE2:fido_cable_discovery.cc(300)] Found new Cable device.
[12082:775:0904/161533.503552:VERBOSE2:fido_cable_discovery.cc(182)] Device changed for Cable device: E7:CF:87:DB:D7:D5
[12082:775:0904/161533.503617:VERBOSE2:fido_cable_discovery.cc(300)] Found new Cable device.
[12082:775:0904/161533.638454:VERBOSE2:fido_cable_discovery.cc(182)] Device changed for Cable device: E7:CF:87:DB:D7:D5
[12082:775:0904/161533.638525:VERBOSE2:fido_cable_discovery.cc(300)] Found new Cable device.
[12082:775:0904/161533.898063:VERBOSE2:fido_ble_connection.cc(296)] Got U2F Service: 0000fffd-0000-1000-8000-00805f9b34fb-0x7fa0fcc98280
[12082:775:0904/161533.898109:VERBOSE2:fido_ble_connection.cc(307)] Got U2F Control Point: f1d0fff1-deaa-ecee-b42f-c9ba7ed623bb-0x7fa107e363f0
[12082:775:0904/161533.898130:VERBOSE2:fido_ble_connection.cc(310)] Got U2F Status: f1d0fff2-deaa-ecee-b42f-c9ba7ed623bb-0x7fa107eb3260
[12082:775:0904/161533.898148:VERBOSE2:fido_ble_connection.cc(304)] Got U2F Control Point Length: f1d0fff3-deaa-ecee-b42f-c9ba7ed623bb-0x7fa107e981d0
[12082:775:0904/161533.898166:VERBOSE2:fido_ble_connection.cc(316)] Got U2F Service Revision Bitfield: f1d0fff4-deaa-ecee-b42f-c9ba7ed623bb-0x7fa107e642d0
[12082:775:0904/161533.898288:VERBOSE2:fido_ble_discovery.cc(70)] Discovered U2F service on existing BLE device: E7:CF:87:DB:D7:D5
[12082:775:0904/161533.898472:VERBOSE2:fido_ble_connection.cc(296)] Got U2F Service: 0000fffd-0000-1000-8000-00805f9b34fb-0x7fa0fcc98280
[12082:775:0904/161533.898506:VERBOSE2:fido_ble_connection.cc(307)] Got U2F Control Point: f1d0fff1-deaa-ecee-b42f-c9ba7ed623bb-0x7fa107e363f0
[12082:775:0904/161533.898528:VERBOSE2:fido_ble_connection.cc(310)] Got U2F Status: f1d0fff2-deaa-ecee-b42f-c9ba7ed623bb-0x7fa107eb3260
[12082:775:0904/161533.898548:VERBOSE2:fido_ble_connection.cc(304)] Got U2F Control Point Length: f1d0fff3-deaa-ecee-b42f-c9ba7ed623bb-0x7fa107e981d0
[12082:775:0904/161533.898569:VERBOSE2:fido_ble_connection.cc(316)] Got U2F Service Revision Bitfield: f1d0fff4-deaa-ecee-b42f-c9ba7ed623bb-0x7fa107e642d0
[12082:775:0904/161533.898640:VERBOSE2:fido_ble_connection.cc(132)] Error while reading Service Revision Bitfield: GATT_ERROR_IN_PROGRESS
[12082:775:0904/161533.898693:VERBOSE2:fido_ble_connection.cc(349)] Error: Could not obtain Service Revisions.
[12082:775:0904/161533.928000:VERBOSE2:fido_ble_connection.cc(123)] Detected Support for FIDO2.
[12082:775:0904/161533.958337:VERBOSE2:fido_ble_connection.cc(80)] Writing Remote Characteristic Succeeded.
[12082:775:0904/161533.987969:VERBOSE2:fido_ble_connection.cc(408)] Created notification session. Connection established.
[12082:775:0904/161534.017868:VERBOSE2:fido_ble_connection.cc(507)] Control Point Length: 101
[12082:775:0904/161534.047794:VERBOSE2:fido_ble_connection.cc(80)] Writing Remote Characteristic Succeeded.
[12082:775:0904/161534.063590:VERBOSE2:fido_ble_connection.cc(485)] Status characteristic value changed.
[12082:775:0904/161534.063702:VERBOSE2:fido_cable_discovery.cc(345)] Authenticator handshake validated
[12082:775:0904/161534.063735:FATAL:fido_request_handler_base.cc(188)] Check failed: !base::ContainsKey(active_authenticators(), device->GetId()).
0   libbase.dylib                       0x000000010dff5bbc base::debug::StackTrace::StackTrace(unsigned long) + 28
1   libbase.dylib                       0x000000010def36df logging::LogMessage::~LogMessage() + 223
2   libfido.dylib                       0x000000011910adab device::FidoRequestHandlerBase::DeviceAdded(device::FidoDiscovery*, device::FidoDevice*) + 123
3   libfido.dylib                       0x00000001191081f3 device::FidoDiscovery::AddDevice(std::__1::unique_ptr<device::FidoDevice, std::__1::default_delete<device::FidoDevice> >) + 339
4   libfido.dylib                       0x00000001190f97f6 device::FidoCableDiscovery::ValidateAuthenticatorHandshakeMessage(std::__1::unique_ptr<device::FidoCableDevice, std::__1::default_delete<device::FidoCableDevice> >, device::FidoCableHandshakeHandler*, base::Optional<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > >) + 198
...

[1] https://codesearch.chromium.org/chromium/src/device/fido/fido_request_handler_base.cc?l=188&rcl=ad2c0dc8c2bca1b767007ac3cacdb8652b566907
[2] https://codesearch.chromium.org/chromium/src/device/fido/ble/fido_ble_discovery.cc?l=72&rcl=9d1de57833ed7638965ccdc5ca184970858e44ec
[3] https://codesearch.chromium.org/chromium/src/device/fido/cable/fido_cable_discovery.cc?l=346&rcl=e34c38a4fc939f12788c1980c7db47929e24b96a
 
Labels: -Pri-2 Pri-1
Status: Started (was: Assigned)
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 11

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

commit 1da60342cf54ae5900fb958d9e145698541ec732
Author: Jun Choi <hongjunchoi@chromium.org>
Date: Tue Sep 11 23:55:20 2018

Do not connect to Cable devices on FidoBleDiscovery

Make sure that FidoBleDiscovery stores list of all Cable devices it
found and never attempt to connect to Cable devices.

Bug:  880295 
Change-Id: I3799103da15b9314a8f8bdb57e0f1d42f7a99a28
Reviewed-on: https://chromium-review.googlesource.com/1214182
Commit-Queue: Jun Choi <hongjunchoi@chromium.org>
Reviewed-by: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590536}
[modify] https://crrev.com/1da60342cf54ae5900fb958d9e145698541ec732/device/bluetooth/test/bluetooth_test.cc
[modify] https://crrev.com/1da60342cf54ae5900fb958d9e145698541ec732/device/bluetooth/test/bluetooth_test.h
[modify] https://crrev.com/1da60342cf54ae5900fb958d9e145698541ec732/device/fido/ble/fido_ble_discovery.cc
[modify] https://crrev.com/1da60342cf54ae5900fb958d9e145698541ec732/device/fido/ble/fido_ble_discovery.h
[modify] https://crrev.com/1da60342cf54ae5900fb958d9e145698541ec732/device/fido/ble/fido_ble_discovery_base.cc
[modify] https://crrev.com/1da60342cf54ae5900fb958d9e145698541ec732/device/fido/ble/fido_ble_discovery_base.h
[modify] https://crrev.com/1da60342cf54ae5900fb958d9e145698541ec732/device/fido/ble/fido_ble_discovery_unittest.cc
[modify] https://crrev.com/1da60342cf54ae5900fb958d9e145698541ec732/device/fido/cable/fido_cable_discovery.cc

Labels: Merge-Request-70 OS-Chrome
Status: Fixed (was: Started)
Requesting merge of https://chromium-review.googlesource.com/c/chromium/src/+/1214182 to M70.
Status: Started (was: Fixed)
Labels: M-70
Project Member

Comment 6 by sheriffbot@chromium.org, Sep 13

Labels: -Merge-Request-70 Hotlist-Merge-Approved Merge-Approved-70
Your change meets the bar and is auto-approved for M70. Please go ahead and merge the CL to branch 3538 manually. Please contact milestone owner if you have questions.
Owners: benmason@(Android), kariahda@(iOS), geohsu@(ChromeOS), abdulsyed@(Desktop)

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

Comment 7 by bugdroid1@chromium.org, Sep 13

Labels: -merge-approved-70 merge-merged-3538
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/949ffd3cccade120412190f80cb3c91dd5671542

commit 949ffd3cccade120412190f80cb3c91dd5671542
Author: Jun Choi <hongjunchoi@chromium.org>
Date: Thu Sep 13 19:09:09 2018

Do not connect to Cable devices on FidoBleDiscovery

Make sure that FidoBleDiscovery stores list of all Cable devices it
found and never attempt to connect to Cable devices.

Bug:  880295 
Change-Id: I3799103da15b9314a8f8bdb57e0f1d42f7a99a28
Reviewed-on: https://chromium-review.googlesource.com/1214182
Commit-Queue: Jun Choi <hongjunchoi@chromium.org>
Reviewed-by: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#590536}(cherry picked from commit 1da60342cf54ae5900fb958d9e145698541ec732)
Reviewed-on: https://chromium-review.googlesource.com/1225430
Reviewed-by: Jun Choi <hongjunchoi@chromium.org>
Cr-Commit-Position: refs/branch-heads/3538@{#379}
Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811}
[modify] https://crrev.com/949ffd3cccade120412190f80cb3c91dd5671542/device/bluetooth/test/bluetooth_test.cc
[modify] https://crrev.com/949ffd3cccade120412190f80cb3c91dd5671542/device/bluetooth/test/bluetooth_test.h
[modify] https://crrev.com/949ffd3cccade120412190f80cb3c91dd5671542/device/fido/ble/fido_ble_discovery.cc
[modify] https://crrev.com/949ffd3cccade120412190f80cb3c91dd5671542/device/fido/ble/fido_ble_discovery.h
[modify] https://crrev.com/949ffd3cccade120412190f80cb3c91dd5671542/device/fido/ble/fido_ble_discovery_base.cc
[modify] https://crrev.com/949ffd3cccade120412190f80cb3c91dd5671542/device/fido/ble/fido_ble_discovery_base.h
[modify] https://crrev.com/949ffd3cccade120412190f80cb3c91dd5671542/device/fido/ble/fido_ble_discovery_unittest.cc
[modify] https://crrev.com/949ffd3cccade120412190f80cb3c91dd5671542/device/fido/cable/fido_cable_discovery.cc

Status: Fixed (was: Started)

Sign in to add a comment