diff options
author | Damien Miller <djm@mindrot.org> | 2014-02-04 11:20:14 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2014-02-04 11:20:14 +1100 |
commit | a5103f413bde6f31bff85d6e1fd29799c647d765 (patch) | |
tree | 0b35ad9292b2ca8d58229435865d0ec3818e5981 /monitor.c | |
parent | 1d2c4564265ee827147af246a16f3777741411ed (diff) |
- djm@cvs.openbsd.org 2014/02/02 03:44:32
[auth1.c auth2-chall.c auth2-passwd.c authfile.c bufaux.c bufbn.c]
[buffer.c cipher-3des1.c cipher.c clientloop.c gss-serv.c kex.c]
[kexdhc.c kexdhs.c kexecdhc.c kexgexc.c kexecdhs.c kexgexs.c key.c]
[monitor.c monitor_wrap.c packet.c readpass.c rsa.c serverloop.c]
[ssh-add.c ssh-agent.c ssh-dss.c ssh-ecdsa.c ssh-ed25519.c]
[ssh-keygen.c ssh-rsa.c sshconnect.c sshconnect1.c sshconnect2.c]
[sshd.c]
convert memset of potentially-private data to explicit_bzero()
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: monitor.c,v 1.130 2014/01/31 16:39:19 tedu Exp $ */ | 1 | /* $OpenBSD: monitor.c,v 1.131 2014/02/02 03:44:31 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright 2002 Niels Provos <provos@citi.umich.edu> | 3 | * Copyright 2002 Niels Provos <provos@citi.umich.edu> |
4 | * Copyright 2002 Markus Friedl <markus@openbsd.org> | 4 | * Copyright 2002 Markus Friedl <markus@openbsd.org> |
@@ -858,7 +858,7 @@ mm_answer_authpassword(int sock, Buffer *m) | |||
858 | /* Only authenticate if the context is valid */ | 858 | /* Only authenticate if the context is valid */ |
859 | authenticated = options.password_authentication && | 859 | authenticated = options.password_authentication && |
860 | auth_password(authctxt, passwd); | 860 | auth_password(authctxt, passwd); |
861 | memset(passwd, 0, strlen(passwd)); | 861 | explicit_bzero(passwd, strlen(passwd)); |
862 | free(passwd); | 862 | free(passwd); |
863 | 863 | ||
864 | buffer_clear(m); | 864 | buffer_clear(m); |
@@ -1800,13 +1800,13 @@ monitor_apply_keystate(struct monitor *pmonitor) | |||
1800 | /* XXX inefficient for large buffers, need: buffer_init_from_string */ | 1800 | /* XXX inefficient for large buffers, need: buffer_init_from_string */ |
1801 | buffer_clear(packet_get_input()); | 1801 | buffer_clear(packet_get_input()); |
1802 | buffer_append(packet_get_input(), child_state.input, child_state.ilen); | 1802 | buffer_append(packet_get_input(), child_state.input, child_state.ilen); |
1803 | memset(child_state.input, 0, child_state.ilen); | 1803 | explicit_bzero(child_state.input, child_state.ilen); |
1804 | free(child_state.input); | 1804 | free(child_state.input); |
1805 | 1805 | ||
1806 | buffer_clear(packet_get_output()); | 1806 | buffer_clear(packet_get_output()); |
1807 | buffer_append(packet_get_output(), child_state.output, | 1807 | buffer_append(packet_get_output(), child_state.output, |
1808 | child_state.olen); | 1808 | child_state.olen); |
1809 | memset(child_state.output, 0, child_state.olen); | 1809 | explicit_bzero(child_state.output, child_state.olen); |
1810 | free(child_state.output); | 1810 | free(child_state.output); |
1811 | 1811 | ||
1812 | /* Roaming */ | 1812 | /* Roaming */ |