ssh fails to load opensc-pkcs11.so

Bug #2028774 reported by Valery Ushakov
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
portable OpenSSH
Unknown
Unknown
openssh (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

I have PKCS11Provider opensc-pkcs11.so in my ~/.ssh/config

After the last update of openssh-client I now get:

$ strace -o slogin.log slogin host
lib_contains_symbol: open opensc-pkcs11.so: No such file or directory
provider opensc-pkcs11.so is not a PKCS11 library
(uwe@host) Password for uwe@host:

$ grep -i pkcs11 slogin.log
read(3, "PKCS11Provider opensc-pkcs11.so\n"..., 4096) = 1603
openat(AT_FDCWD, "opensc-pkcs11.so", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "provider opensc-pkcs11.so is not"..., 51) = 51

$ dpkg-query --listfiles opensc-pkcs11 | grep opensc-pkcs11.so
/usr/lib/x86_64-linux-gnu/onepin-opensc-pkcs11.so
/usr/lib/x86_64-linux-gnu/opensc-pkcs11.so
/usr/lib/x86_64-linux-gnu/pkcs11/onepin-opensc-pkcs11.so
/usr/lib/x86_64-linux-gnu/pkcs11/opensc-pkcs11.so

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: openssh-client 1:8.9p1-3ubuntu0.3
ProcVersionSignature: Ubuntu 5.19.0-50.50-generic 5.19.17
Uname: Linux 5.19.0-50-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Wed Jul 26 15:46:30 2023
InstallationDate: Installed on 2022-08-25 (334 days ago)
InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419)
RelatedPackageVersions:
 ssh-askpass 1:1.2.4.1-13
 libpam-ssh N/A
 keychain N/A
 ssh-askpass-gnome N/A
SSHClientVersion: OpenSSH_8.9p1 Ubuntu-3ubuntu0.3, OpenSSL 3.0.2 15 Mar 2022
SourcePackage: openssh
UpgradeStatus: No upgrade log present (probably fresh install)

CVE References

Revision history for this message
Valery Ushakov (v-ushakov) wrote :
Revision history for this message
Seth Arnold (seth-arnold) wrote :

Can you run fatrace or opensnoop-bpfcc to discover what exact paths are being probed?

Thanks

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Can you try putting the full path to the library in your config file?

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

One of the commits for the security fix for CVE-2023-28408 will now attempt to mmap the library and search for the "C_GetFunctionList" symbol before doing the dlopen. Unfortunately, dlopen allows specifying just the library name and the dynamic linker will search for it, but the new code just tries to open the filename directly.

Revision history for this message
Valery Ushakov (v-ushakov) wrote :

Yes,

PKCS11Provider /usr/lib/x86_64-linux-gnu/opensc-pkcs11.so

works. I guess you can close it then.

Though, parenthetically speaking, I realize NFS homes shared by heterogeneous systems are not in wide use now, but the above fix doesn't work very well in that kind of environment :)

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

I've filed an upstream bug for this, let's see if they consider this to be an issue or not: https://bugzilla.mindrot.org/show_bug.cgi?id=3594

Thanks!

Changed in openssh (Ubuntu):
status: New → Confirmed
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Upstream says the change is intentional, so I am closing this bug. Thanks!

Changed in openssh (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.