summaryrefslogtreecommitdiffstats
path: root/ssh-sk.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2022-06-24 05:46:39 +0200
committerDamien Miller <djm@mindrot.org>2022-06-24 05:46:39 +0200
commit7d25b37fb2a5ff4dadabcbdac6087a97479434f5 (patch)
tree806bbfff04b0803212bdb2cb7b027d4885ddfe42 /ssh-sk.c
parentupstream: make sure that UseDNS hostname lookup happens in the monitor (diff)
downloadopenssh-7d25b37fb2a5ff4dadabcbdac6087a97479434f5.tar.xz
openssh-7d25b37fb2a5ff4dadabcbdac6087a97479434f5.zip
fix possible NULL deref when built without FIDO
Analysis/fix from kircher in bz3443; ok dtucker@
Diffstat (limited to 'ssh-sk.c')
-rw-r--r--ssh-sk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ssh-sk.c b/ssh-sk.c
index a1ff5cc48..ba5146079 100644
--- a/ssh-sk.c
+++ b/ssh-sk.c
@@ -127,10 +127,11 @@ sshsk_open(const char *path)
ret->sk_enroll = ssh_sk_enroll;
ret->sk_sign = ssh_sk_sign;
ret->sk_load_resident_keys = ssh_sk_load_resident_keys;
+ return ret;
#else
error("internal security key support not enabled");
+ goto fail;
#endif
- return ret;
}
if ((ret->dlhandle = dlopen(path, RTLD_NOW)) == NULL) {
error("Provider \"%s\" dlopen failed: %s", path, dlerror());