microg / microg/GmsCore

Issue with FEITIAN MultiPass FIDO2 Security Key via USB

Open
#1,823 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

🔐 FIDO / WebAuthN / Passkeys bug
Dominant language
Java
Stars
14.6k
Forks
3.2k
Avg merge
12d 11h
Merged PRs (30d)
4

Description

The interface stuck in the phase that ask to press the button, I press the button but nothing happens.

Logcat:

[ 11-10 17:22:49.528  3293: 3293 D/Fido2Privileged ]
onBind: Intent { act=com.google.android.gms.fido.fido2.privileged.START pkg=com.google.android.gms }

[ 11-10 17:22:49.675  3293: 3308 D/Fido2Privileged ]
bound by: GetServiceRequest{serviceId=FIDO2_PRIVILEGED, gmsVersion=12451000, packageName='org.mozilla.firefox', extras=Bundle[{FIDO2_ACTION_START_SERVICE=com.google.android.gms.fido.fido2.privileged.START}]}

[ 11-10 17:22:49.936 27274:27274 I/WebAuthnFeature ]
Received activity delegate request with code: 10

[ 11-10 17:22:49.958  2364: 2776 I/ActivityManager ]
START u0 {cmp=com.google.android.gms/org.microg.gms.fido.core.ui.AuthenticatorActivity (has extras)} from uid 10114 on display 0

[ 11-10 17:22:50.096  2364:26335 I/ActivityManager ]
Start proc 27585:com.google.android.gms:ui/u0a114 for activity com.google.android.gms/org.microg.gms.fido.core.ui.AuthenticatorActivity

[ 11-10 17:22:51.029 27585:27585 D/FidoUi   ]
onCreate caller=org.mozilla.firefox options=BrowserPublicKeyCredentialCreationOptions[PublicKeyCredentialCreationOptions[rp=PublicKeyCredentialRpEntity[webauthn.io, name="webauthn.io", icon=""], user=PublicKeyCredentialUserEntity[/hidden/, name="ale5000", icon="", displayName="ale5000"], challenge=/hidden/, parameters=[PublicKeyCredentialParameters[type=public-key, algorithm=COSEAlgorithmIdentifier[ES256]], PublicKeyCredentialParameters[type=public-key, algorithm=COSEAlgorithmIdentifier[ES384]], PublicKeyCredentialParameters[type=public-key, algorithm=COSEAlgorithmIdentifier[ES512]], PublicKeyCredentialParameters[type=public-key, algorithm=COSEAlgorithmIdentifier[ED256]], PublicKeyCredentialParameters[type=public-key, algorithm=COSEAlgorithmIdentifier[ED512]], PublicKeyCredentialParameters[type=public-key, algorithm=COSEAlgorithmIdentifier[PS256]], PublicKeyCredentialParameters[type=public-key, algorithm=COSEAlgorithmIdentifier[PS384]], PublicKeyCredentialParameters[type=public-key, algorithm=COSEAlgorithmIdentifier[PS512]], PublicKeyCredentialParameters[type=public-key, algorithm=COSEAlgorithmIdentifier[RS256]], PublicKeyCredentialParameters[type=public-key, algorithm=COSEAlgorithmIdentifier[RS384]], PublicKeyCredentialParameters[type=public-key, algorithm=COSEAlgorithmIdentifier[RS512]]], timeoutSeconds=60.0, excludeList=[], authenticatorSelection=AuthenticatorSelectionCriteria[], attestationConveyancePreference=none, authenticationExtensions=AuthenticationExtensions[]], origin=https://webauthn.io]

[ 11-10 17:22:51.896 27585:27585 D/FidoUi   ]
facetId=https://webauthn.io, appName=webauthn.io

[ 11-10 17:22:51.925 27585:27585 V/NFC      ]
this device does not have NFC support

[ 11-10 17:22:52.551  2364: 2385 I/ActivityManager ]
Displayed com.google.android.gms/org.microg.gms.fido.core.ui.AuthenticatorActivity: +2s502ms

[ 11-10 17:22:59.858 27585:27585 D/FidoUsbHandler ]
ePass FIDO has suitable hid interface 0

[ 11-10 17:22:59.905  2364:25874 I/ActivityManager ]
START u0 {flg=0x10000000 cmp=com.android.systemui/.usb.UsbPermissionActivity (has extras)} from uid 1000 on display 0

[ 11-10 17:23:00.508  2364: 2385 I/ActivityManager ]
Displayed com.android.systemui/.usb.UsbPermissionActivity: +533ms

[ 11-10 17:23:17.544 27585:27585 D/FidoUsbHandler ]
ePass FIDO has permission

[ 11-10 17:23:17.583 27585:27585 D/FidoUsbHandler ]
Signature: /hidden/

[ 11-10 17:23:17.585 27585:27585 D/UsbDeviceConnectionJNI ]
close

[ 11-10 17:23:17.585 27585:27585 D/FidoUsbHandler ]
Trying to use ePass FIDO for REGISTER

[ 11-10 17:23:17.586 27585:27585 D/FidoUi   ]
USB status set to waiting-for-user (Bundle[{device=UsbDevice[mName=/dev/bus/usb/002/002,mVendorId=2414,mProductId=2138,mClass=0,mSubclass=0,mProtocol=0,mManufacturerName=FS,mProductName=ePass FIDO,mVersion=1.16,mSerialNumber=null,mConfigurations=[
UsbConfiguration[mId=1,mName=null,mAttributes=128,mMaxPower=50,mInterfaces=[
UsbInterface[mId=0,mAlternateSetting=0,mName=null,mClass=3,mSubclass=0,mProtocol=0,mEndpoints=[
UsbEndpoint[mAddress=4,mAttributes=3,mMaxPacketSize=64,mInterval=2]
UsbEndpoint[mAddress=131,mAttributes=3,mMaxPacketSize=64,mInterval=2]]]]}])

[ 11-10 17:23:17.588 27585:27585 D/FidoCtapHidConnection ]
Opening connection

[ 11-10 17:23:17.606 27585:27585 D/FidoCtapHidConnection ]
Sending CtapHidInitRequest(nonce=TeoPMjcdmVQ=) in 1 packets

[ 11-10 17:23:17.624 27585:27585 D/FidoCtapHidConnection ]
Sent packet /hidden/

[ 11-10 17:23:17.625 27585:27585 D/UsbRequestJNI ]
close

[ 11-10 17:23:17.645 27585:27585 D/UsbRequestJNI ]
init

[ 11-10 17:23:17.645 27585:27585 D/FidoCtapHidConnection ]
Reading 64 bytes from usb

[ 11-10 17:23:17.747 27585:27585 D/FidoCtapHidConnection ]
Received packet /hidden/

[ 11-10 17:23:17.758 27585:27585 D/FidoCtapHidConnection ]
Received CtapHidInitResponse(nonce=0xTeoPMjcdmVQ=, channelId=0x1, protocolVersion=0x2, version=1.0.1, capabilities=0xf) in 1 packets

[ 11-10 17:23:17.758 27585:27585 D/UsbRequestJNI ]
close

[ 11-10 17:23:17.762 27585:27585 D/FidoCtapHidConnection ]
Sending CtapHidCborRequest(Ctap2Request(command=0x4, payload=)) in 1 packets

[ 11-10 17:23:17.762 27585:27585 D/UsbRequestJNI ]
init

[ 11-10 17:23:17.765 27585:27585 D/FidoCtapHidConnection ]
Sent packet /hidden/

[ 11-10 17:23:17.765 27585:27585 D/UsbRequestJNI ]
close

[ 11-10 17:23:17.766 27585:27585 D/UsbRequestJNI ]
init

[ 11-10 17:23:17.766 27585:27585 D/FidoCtapHidConnection ]
Reading 64 bytes from usb

[ 11-10 17:23:17.920 27585:27585 D/FidoCtapHidConnection ]
Received packet AAAAAbsAAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==

[ 11-10 17:23:17.921 27585:27585 W/FidoCtapHidConnection ]
Keep alive: CtapHidMessage(commandId=0x3b, data=AQ==)

[ 11-10 17:23:17.921 27585:27585 D/FidoCtapHidConnection ]
Reading 64 bytes from usb

[ 11-10 17:23:17.966 27585:27585 D/FidoCtapHidConnection ]
Received packet /hidden/

[ 11-10 17:23:17.967 27585:27585 D/FidoCtapHidConnection ]
Reading 64 bytes from usb

[ 11-10 17:23:17.970 27585:27585 D/FidoCtapHidConnection ]
Received packet /hidden/

[ 11-10 17:23:17.971 27585:27585 D/FidoCtapHidConnection ]
Reading 64 bytes from usb

[ 11-10 17:23:17.975 27585:27585 D/FidoCtapHidConnection ]
Received packet /hidden/

[ 11-10 17:23:17.975 27585:27585 D/FidoCtapHidConnection ]
Reading 64 bytes from usb

[ 11-10 17:23:17.983 27585:27585 D/FidoCtapHidConnection ]
Received packet /hidden/

[ 11-10 17:23:17.986 27585:27585 D/FidoCtapHidConnection ]
Received CtapHidCborResponse(statusCode=0x0, payload=/hidden/) in 4 packets

[ 11-10 17:23:17.986 27585:27585 D/UsbRequestJNI ]
close

[ 11-10 17:23:18.057 27585:27585 D/FidoCtapHidConnection ]
Got info: AuthenticatorGetInfoResponse(versions=[], extensions=[], aaguid=[49, 11, 40, 48, -67, 74, 77, -91, -125, 46, -102, 13, -4, -112, -85, -14], options=Options[platformDevice=false, residentKey=true, clientPin=false, userPresence=true, noMcGaPermissionsWithClientPin=false, credentialMgmtPreview=true, makeCredUvNotRqd=false], maxMsgSize=1024, pinProtocols=[])

[ 11-10 17:23:18.096 27585:27585 D/FidoCtapHidConnection ]
Sending CtapHidCborRequest(AuthenticatorMakeCredentialRequest(clientDataHash=/hidden/, rp=PublicKeyCredentialRpEntity[webauthn.io, name="webauthn.io", icon=""],user=PublicKeyCredentialUserEntity[/hidden/, name="ale5000", icon="", displayName="ale5000"],pubKeyCredParams=[PublicKeyCredentialParameters[type=public-key, algorithm=COSEAlgorithmIdentifier[ES256]], PublicKeyCredentialParameters[type=public-key, algorithm=COSEAlgorithmIdentifier[ES384]], PublicKeyCredentialParameters[type=public-key, algorithm=COSEAlgorithmIdentifier[ES512]], PublicKeyCredentialParameters[type=public-key, algorithm=COSEAlgorithmIdentifier[ED256]], PublicKeyCredentialParameters[type=public-key, algorithm=COSEAlgorithmIdentifier[ED512]], PublicKeyCredentialParameters[type=public-key, algorithm=COSEAlgorithmIdentifier[PS256]], PublicKeyCredentialParameters[type=public-key, algorithm=COSEAlgorithmIdentifier[PS384]], PublicKeyCredentialParameters[type=public-key, algorithm=COSEAlgorithmIdentifier[PS512]], PublicKeyCredentialParameters[type=public-key, algorithm=COSEAlgorithmIdentifier[RS256]], PublicKeyCredentialParameters[type=public-key, algorithm=COSEAlgorithmIdentifier[RS384]], PublicKeyCredentialParameters[type=public-key, algorithm=COSEAlgorithmIdentifier[RS512]]],excludeList=[],extensions=[],options=org.microg.gms.fido.core.protocol.msgs.AuthenticatorMakeCredentialRequest$Companion$Options@1b14893,pinAuth=null,pinProtocol=null)) in 7 packets

[ 11-10 17:23:18.097 27585:27585 D/UsbRequestJNI ]
init

[ 11-10 17:23:18.102 27585:27585 D/FidoCtapHidConnection ]
Sent packet /hidden/

[ 11-10 17:23:18.107 27585:27585 D/FidoCtapHidConnection ]
Sent packet /hidden/

[ 11-10 17:23:18.110 27585:27585 D/FidoCtapHidConnection ]
Sent packet /hidden/

[ 11-10 17:23:18.113 27585:27585 D/FidoCtapHidConnection ]
Sent packet /hidden/

[ 11-10 17:23:18.118 27585:27585 D/FidoCtapHidConnection ]
Sent packet /hidden/

[ 11-10 17:23:18.125 27585:27585 D/FidoCtapHidConnection ]
Sent packet /hidden/

[ 11-10 17:23:18.139 27585:27585 D/FidoCtapHidConnection ]
Sent packet /hidden/

[ 11-10 17:23:18.139 27585:27585 D/UsbRequestJNI ]
close

[ 11-10 17:23:18.142 27585:27585 D/UsbRequestJNI ]
init

This block is repeated a lot of times:

[ 11-10 17:23:18.142 27585:27585 D/FidoCtapHidConnection ]
Reading 64 bytes from usb

[ 11-10 17:23:18.223 27585:27585 D/FidoCtapHidConnection ]
Received packet AAAAAbsAAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==

[ 11-10 17:23:18.223 27585:27585 W/FidoCtapHidConnection ]
Keep alive: CtapHidMessage(commandId=0x3b, data=AQ==)

At the end there is this:

[ 11-10 17:23:30.287 27585:27585 D/FidoCtapHidConnection ]
Reading 64 bytes from usb

[ 11-10 17:23:30.387 27585:27585 D/FidoCtapHidConnection ]
Received packet AAAAAZAAAToAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==

[ 11-10 17:23:30.388 27585:27585 D/FidoCtapHidConnection ]
Received CtapHidCborResponse(statusCode=0x3a, payload=) in 1 packets

[ 11-10 17:23:30.388 27585:27585 D/UsbRequestJNI ]
close

[ 11-10 17:23:30.395 27585:27585 D/UsbDeviceConnectionJNI ]
close

[ 11-10 17:23:30.421 27585:27585 W/FidoUsbHandler ]

org.microg.gms.fido.core.transport.Ctap2StatusException: Received status 3a
	at org.microg.gms.fido.core.transport.usb.ctaphid.CtapHidConnection.runCommand(CtapHidConnection.kt:167)
	at org.microg.gms.fido.core.transport.usb.ctaphid.CtapHidConnection$runCommand$2.invokeSuspend(CtapHidConnection.kt)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33)
	at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at androidx.lifecycle.DispatchQueue.drainQueue(DispatchQueue.kt:75)
	at androidx.lifecycle.DispatchQueue.enqueue(DispatchQueue.kt:112)
	at androidx.lifecycle.DispatchQueue.dispatchAndEnqueue$lambda-2$lambda-1(DispatchQueue.kt:100)
	at androidx.lifecycle.DispatchQueue.$r8$lambda$G2ay370n_s_ksSHUJaD9zIU8eCw(DispatchQueue.kt)
	at androidx.lifecycle.DispatchQueue$$ExternalSyntheticLambda0.run(D8$$SyntheticClass)
	at android.os.Handler.handleCallback(Handler.java:751)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:154)
	at android.app.ActivityThread.main(ActivityThread.java:6186)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)

[ 11-10 17:23:30.451 27585:27585 D/FidoUi   ]
USB status set to waiting-for-device (null)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with CtapHidConnection.kt at line 167 and trace the USB flow from FidoUsbHandler after the authenticator returns status 0x3a. Reproduce the FEITIAN MultiPass registration through AuthenticatorActivity and verify that pressing the key completes registration instead of leaving the interface waiting for user input.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
authentication, mobile, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.