[WebAuthN] caBLE DCHECKs when WebAuthenticationBle is enabled |
|||||||
Issue descriptionChrome 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
,
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
,
Sep 12
Requesting merge of https://chromium-review.googlesource.com/c/chromium/src/+/1214182 to M70.
,
Sep 13
,
Sep 13
,
Sep 13
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
,
Sep 13
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
,
Sep 17
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by hongjunchoi@chromium.org
, Sep 4Status: Started (was: Assigned)