summaryrefslogtreecommitdiff
path: root/ssh-agent.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2014-07-30 12:32:46 +1000
committerDamien Miller <djm@mindrot.org>2014-07-30 12:32:46 +1000
commitf497794b6962eaf802ab4ac2a7b22ae591cca1d5 (patch)
tree5c6724353686d4621a6c3328ea589075ef5a7abc /ssh-agent.c
parenta8a0f65c57c8ecba94d65948e9090da54014dfef (diff)
- dtucker@cvs.openbsd.org 2014/07/25 21:22:03
[ssh-agent.c] Clear buffer used for handling messages. This prevents keys being left in memory after they have been expired or deleted in some cases (but note that ssh-agent is setgid so you would still need root to access them). Pointed out by Kevin Burns, ok deraadt
Diffstat (limited to 'ssh-agent.c')
-rw-r--r--ssh-agent.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ssh-agent.c b/ssh-agent.c
index e20a64ecf..25f10c549 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-agent.c,v 1.189 2014/07/18 02:46:01 djm Exp $ */ 1/* $OpenBSD: ssh-agent.c,v 1.190 2014/07/25 21:22:03 dtucker Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -968,6 +968,7 @@ after_select(fd_set *readset, fd_set *writeset)
968 break; 968 break;
969 } 969 }
970 buffer_append(&sockets[i].input, buf, len); 970 buffer_append(&sockets[i].input, buf, len);
971 explicit_bzero(buf, sizeof(buf));
971 process_message(&sockets[i]); 972 process_message(&sockets[i]);
972 } 973 }
973 break; 974 break;