diff options
author | Damien Miller <djm@mindrot.org> | 2013-12-29 17:45:51 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2013-12-29 17:45:51 +1100 |
commit | 0b36c83148976c7c8268f4f41497359e2fb26251 (patch) | |
tree | d851c5cdebf196e5bc34190e4b2d3e7b7068cf1b /ssh-agent.c | |
parent | 4def184e9b6c36be6d965a9705632fc4c0c2a8af (diff) |
- djm@cvs.openbsd.org 2013/12/19 01:19:41
[ssh-agent.c]
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 'ssh-agent.c')
-rw-r--r-- | ssh-agent.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ssh-agent.c b/ssh-agent.c index 8210a8e3..95117e07 100644 --- a/ssh-agent.c +++ b/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 @@ -660,6 +660,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); |