[Bug 4012] New: FIDO2 ECDSA-SK signing fails with "invalid format" until sshd is restarted

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Fri Oct 2 20:51:07 AEST 2026


https://bugzilla.mindrot.org/show_bug.cgi?id=4012

            Bug ID: 4012
           Summary: FIDO2 ECDSA-SK signing fails with "invalid format"
                    until sshd is restarted
           Product: Portable OpenSSH
           Version: 10.5p1
          Hardware: amd64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: ssh
          Assignee: unassigned-bugs at mindrot.org
          Reporter: toha77747 at gmail.com

### Problem

A previously working FIDO2 ECDSA-SK SSH key can start failing with
`invalid format` after changing or reconnecting the FIDO2
authenticator.

The authenticator remains detectable and user presence is requested,
but the SSH client fails during the signing operation.

### Environment

* Arch Linux
* OpenSSH 10.5p1-1
* libfido2 1.17.0-1
* Linux kernel 7.2.6-arch2-1
* FIDO2 authenticator: LibreKeys One / Pico FIDO2
* Firmware: 7.4.0
* SSH key type: ECDSA-SK
* SecurityKeyProvider: internal

### Reproduction

1. Use a previously working ECDSA-SK SSH key for authentication.
2. Disconnect or change the FIDO2 authenticator.
3. Reconnect the authenticator.
4. Use the same SSH key again.

The authenticator is detected and user presence is requested, but
signing fails with:

```
sign_and_send_pubkey: signing failed for ECDSA-SK "...": invalid format
```

With `ssh -vvv`, the relevant part of the failure is:

```
fido_dev_get_assert: FIDO_ERR_NO_CREDENTIALS
sshsk_sign: sk_sign failed with code -1
ssh-sk-helper: Signing failed: invalid format
```

### Recovery

Without changing the SSH key, SSH configuration, or FIDO2 credential,
running:

```
sudo systemctl restart sshd
```

immediately restores successful FIDO2 signing.

The exact same SSH command then succeeds with the same key and the same
authenticator.

### Reproducibility

The behavior was reproduced on two different Arch Linux systems:

* ThinkPad
* Dell OptiPlex

It was reproduced with different FIDO2 credentials/authenticators.

On both systems, restarting `sshd.service` restored successful signing.

A suspend/lid-close cycle on the ThinkPad was also observed to restore
functionality, although this was not investigated further.

### Notes

We do not claim that `sshd` itself is the direct cause. The failing
operation is performed by the local SSH client and `ssh-sk-helper`.

The observation is that restarting `sshd.service` reliably changes the
system from the failing state to a working state.

The underlying cause has not yet been investigated with source-level
tracing or debugging.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list