diff options
author | 2013-12-19 01:19:41 +0000 | |
---|---|---|
committer | 2013-12-19 01:19:41 +0000 | |
commit | e017a1e1547a0ba2bac60c21254c9649a89ce350 (patch) | |
tree | 6f2b90ee5fc2e7a4844d85b7a2accc6bf747e17b /usr.bin/ssh/ssh-agent.c | |
parent | bz#2147: fix multiple remote forwardings with dynamically assigned (diff) | |
download | wireguard-openbsd-e017a1e1547a0ba2bac60c21254c9649a89ce350.tar.xz wireguard-openbsd-e017a1e1547a0ba2bac60c21254c9649a89ce350.zip |
bz#2186: don't crash (NULL deref) when deleting PKCS#11 keys from an agent
that has a mix of normal and PKCS#11 keys; fix from jay AT slushpupie.com;
ok dtucker
Diffstat (limited to 'usr.bin/ssh/ssh-agent.c')
-rw-r--r-- | usr.bin/ssh/ssh-agent.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh-agent.c b/usr.bin/ssh/ssh-agent.c index bc63f792d87..f65aec9004e 100644 --- a/usr.bin/ssh/ssh-agent.c +++ b/usr.bin/ssh/ssh-agent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-agent.c,v 1.180 2013/12/06 13:39:49 markus Exp $ */ +/* $OpenBSD: ssh-agent.c,v 1.181 2013/12/19 01:19:41 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -646,6 +646,9 @@ process_remove_smartcard_key(SocketEntry *e) tab = idtab_lookup(version); for (id = TAILQ_FIRST(&tab->idlist); id; id = nxt) { nxt = TAILQ_NEXT(id, next); + /* Skip file--based keys */ + if (id->provider == NULL) + continue; if (!strcmp(provider, id->provider)) { TAILQ_REMOVE(&tab->idlist, id, next); free_identity(id); |