Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-5283

ssh-agent with YK smart card stops working regularly

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • rhel-8.7.0
    • openssh
    • None
    • Low
    • rhel-security-crypto
    • ssg_security
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None
    • 57,005

      Description of problem:

      In the last few days I've noticed that my ssh-agent that has had my YK smartcard added will start failing frequently. Re-inserting the YK seems to be a trigger, though perhaps not the only one.

      When I stops working I get:
      sign_and_send_pubkey: signing failed: agent refused operation

      ssh-pkcs11-helper[26590]: error: C_Sign failed: 257
      ssh-agent[26551]: error: process_sign_request2: sshkey_sign: error in libcrypto

      If I try to remove to re-add the card:
      $ ssh-add -e pkcs11:id=%05
      Could not remove card "pkcs11:id=%05": agent refused operation

      ssh-agent[26551]: error: process_remove_smartcard_key: pkcs11_del_provider failed

      Version-Release number of selected component (if applicable):
      openssh-8.0p1-17.el8_7.x86_64
      pcsc-lite-1.9.5-1.el8.x86_64
      opensc-0.20.0-4.el8.x86_64

      On disconnect:
      Feb 28 12:28:56 host kernel: usb 4-1: USB disconnect, device number 3
      Feb 28 12:28:56 host pcscd[26362]: 99999999 ccid_usb.c:849:WriteUSB() write failed (4/3): -4 LIBUSB_ERROR_NO_DEVICE

      On re-insertion:
      Feb 28 13:34:04 host kernel: usb 4-1: Product: Yubikey 4 OTP+U2F+CCID
      Feb 28 13:34:04 host pcscd[26362]: 99999999 ifdhandler.c:150:CreateChannelByNameOrChannel() failed
      Feb 28 13:34:04 host pcscd[26362]: 00036674 ifdhandler.c:150:CreateChannelByNameOrChannel() failed

      opensc debug log file attached.

              dbelyavs@redhat.com Dmitry Belyavskiy
              opoplawski Orion Poplawski
              Dmitry Belyavskiy Dmitry Belyavskiy
              SSG Security QE SSG Security QE
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: