mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-29 16:54:51 +02:00
- (bal) OpenBSD Resync
- markus@cvs.openbsd.org 2001/01/22 8:15:00 [auth-krb4.c sshconnect1.c] only AFS needs radix.[ch] - markus@cvs.openbsd.org 2001/01/22 8:32:53 [auth2.c] no need to include; from mouring@etoh.eviladmin.org - stevesk@cvs.openbsd.org 2001/01/22 16:55:21 [key.c] free() -> xfree(); ok markus@ - stevesk@cvs.openbsd.org 2001/01/22 17:22:28 [sshconnect2.c sshd.c] fix memory leaks in SSH2 key exchange; ok markus@
This commit is contained in:
parent
9dffa01368
commit
b1985f7279
14
ChangeLog
14
ChangeLog
@ -2,6 +2,20 @@
|
|||||||
- (bal) regexp.h typo in configure.in. Should have been regex.h
|
- (bal) regexp.h typo in configure.in. Should have been regex.h
|
||||||
- (bal) SSH_USER_DIR to _PATH_SSH_USER_DIR patch by stevesk@
|
- (bal) SSH_USER_DIR to _PATH_SSH_USER_DIR patch by stevesk@
|
||||||
- (bal) SSH_ASKPASS_DEFAULT to _PATH_SSH_ASKPASS_DEFAULT
|
- (bal) SSH_ASKPASS_DEFAULT to _PATH_SSH_ASKPASS_DEFAULT
|
||||||
|
- (bal) OpenBSD Resync
|
||||||
|
- markus@cvs.openbsd.org 2001/01/22 8:15:00
|
||||||
|
[auth-krb4.c sshconnect1.c]
|
||||||
|
only AFS needs radix.[ch]
|
||||||
|
- markus@cvs.openbsd.org 2001/01/22 8:32:53
|
||||||
|
[auth2.c]
|
||||||
|
no need to include; from mouring@etoh.eviladmin.org
|
||||||
|
- stevesk@cvs.openbsd.org 2001/01/22 16:55:21
|
||||||
|
[key.c]
|
||||||
|
free() -> xfree(); ok markus@
|
||||||
|
- stevesk@cvs.openbsd.org 2001/01/22 17:22:28
|
||||||
|
[sshconnect2.c sshd.c]
|
||||||
|
fix memory leaks in SSH2 key exchange; ok markus@
|
||||||
|
|
||||||
|
|
||||||
20010122
|
20010122
|
||||||
- (bal) OpenBSD Resync
|
- (bal) OpenBSD Resync
|
||||||
|
@ -23,9 +23,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: auth-krb4.c,v 1.22 2001/01/21 19:05:41 markus Exp $");
|
RCSID("$OpenBSD: auth-krb4.c,v 1.23 2001/01/22 08:15:00 markus Exp $");
|
||||||
|
|
||||||
#ifdef KRB4
|
|
||||||
#include "ssh.h"
|
#include "ssh.h"
|
||||||
#include "ssh1.h"
|
#include "ssh1.h"
|
||||||
#include "packet.h"
|
#include "packet.h"
|
||||||
@ -33,8 +32,12 @@ RCSID("$OpenBSD: auth-krb4.c,v 1.22 2001/01/21 19:05:41 markus Exp $");
|
|||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "servconf.h"
|
#include "servconf.h"
|
||||||
#include "auth.h"
|
#include "auth.h"
|
||||||
#include "radix.h"
|
|
||||||
|
|
||||||
|
#ifdef AFS
|
||||||
|
#include "radix.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef KRB4
|
||||||
char *ticket = NULL;
|
char *ticket = NULL;
|
||||||
|
|
||||||
extern ServerOptions options;
|
extern ServerOptions options;
|
||||||
|
3
auth2.c
3
auth2.c
@ -23,7 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: auth2.c,v 1.32 2001/01/21 19:05:44 markus Exp $");
|
RCSID("$OpenBSD: auth2.c,v 1.33 2001/01/22 08:32:53 markus Exp $");
|
||||||
|
|
||||||
#ifdef HAVE_OSF_SIA
|
#ifdef HAVE_OSF_SIA
|
||||||
# include <sia.h>
|
# include <sia.h>
|
||||||
@ -51,7 +51,6 @@ RCSID("$OpenBSD: auth2.c,v 1.32 2001/01/21 19:05:44 markus Exp $");
|
|||||||
#include "key.h"
|
#include "key.h"
|
||||||
#include "kex.h"
|
#include "kex.h"
|
||||||
#include "pathnames.h"
|
#include "pathnames.h"
|
||||||
|
|
||||||
#include "uidswap.h"
|
#include "uidswap.h"
|
||||||
#include "auth-options.h"
|
#include "auth-options.h"
|
||||||
|
|
||||||
|
4
key.c
4
key.c
@ -32,7 +32,7 @@
|
|||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: key.c,v 1.15 2001/01/21 19:05:50 markus Exp $");
|
RCSID("$OpenBSD: key.c,v 1.16 2001/01/22 16:55:21 stevesk Exp $");
|
||||||
|
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
|
|
||||||
@ -258,7 +258,7 @@ write_bignum(FILE *f, BIGNUM *num)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
fprintf(f, " %s", buf);
|
fprintf(f, " %s", buf);
|
||||||
free(buf);
|
xfree(buf);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,17 +13,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: sshconnect1.c,v 1.18 2001/01/21 19:06:00 markus Exp $");
|
RCSID("$OpenBSD: sshconnect1.c,v 1.19 2001/01/22 08:15:00 markus Exp $");
|
||||||
|
|
||||||
#include <openssl/bn.h>
|
#include <openssl/bn.h>
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
|
|
||||||
#ifdef KRB4
|
#ifdef KRB4
|
||||||
#include <krb.h>
|
#include <krb.h>
|
||||||
#include "radix.h"
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef AFS
|
#ifdef AFS
|
||||||
#include <kafs.h>
|
#include <kafs.h>
|
||||||
|
#include "radix.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "ssh.h"
|
#include "ssh.h"
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: sshconnect2.c,v 1.37 2001/01/21 19:06:00 markus Exp $");
|
RCSID("$OpenBSD: sshconnect2.c,v 1.38 2001/01/22 17:22:28 stevesk Exp $");
|
||||||
|
|
||||||
#include <openssl/bn.h>
|
#include <openssl/bn.h>
|
||||||
#include <openssl/md5.h>
|
#include <openssl/md5.h>
|
||||||
@ -248,6 +248,7 @@ ssh_dh1_client(Kex *kex, char *host, struct sockaddr *hostaddr,
|
|||||||
);
|
);
|
||||||
xfree(server_host_key_blob);
|
xfree(server_host_key_blob);
|
||||||
DH_free(dh);
|
DH_free(dh);
|
||||||
|
BN_free(dh_server_pub);
|
||||||
#ifdef DEBUG_KEXDH
|
#ifdef DEBUG_KEXDH
|
||||||
fprintf(stderr, "hash == ");
|
fprintf(stderr, "hash == ");
|
||||||
for (i = 0; i< 20; i++)
|
for (i = 0; i< 20; i++)
|
||||||
@ -257,8 +258,10 @@ ssh_dh1_client(Kex *kex, char *host, struct sockaddr *hostaddr,
|
|||||||
if (key_verify(server_host_key, (u_char *)signature, slen, hash, 20) != 1)
|
if (key_verify(server_host_key, (u_char *)signature, slen, hash, 20) != 1)
|
||||||
fatal("key_verify failed for server_host_key");
|
fatal("key_verify failed for server_host_key");
|
||||||
key_free(server_host_key);
|
key_free(server_host_key);
|
||||||
|
xfree(signature);
|
||||||
|
|
||||||
kex_derive_keys(kex, hash, shared_secret);
|
kex_derive_keys(kex, hash, shared_secret);
|
||||||
|
BN_clear_free(shared_secret);
|
||||||
packet_set_kex(kex);
|
packet_set_kex(kex);
|
||||||
|
|
||||||
/* save session id */
|
/* save session id */
|
||||||
@ -420,6 +423,7 @@ ssh_dhgex_client(Kex *kex, char *host, struct sockaddr *hostaddr,
|
|||||||
);
|
);
|
||||||
xfree(server_host_key_blob);
|
xfree(server_host_key_blob);
|
||||||
DH_free(dh);
|
DH_free(dh);
|
||||||
|
BN_free(dh_server_pub);
|
||||||
#ifdef DEBUG_KEXDH
|
#ifdef DEBUG_KEXDH
|
||||||
fprintf(stderr, "hash == ");
|
fprintf(stderr, "hash == ");
|
||||||
for (i = 0; i< 20; i++)
|
for (i = 0; i< 20; i++)
|
||||||
@ -429,8 +433,10 @@ ssh_dhgex_client(Kex *kex, char *host, struct sockaddr *hostaddr,
|
|||||||
if (key_verify(server_host_key, (u_char *)signature, slen, hash, 20) != 1)
|
if (key_verify(server_host_key, (u_char *)signature, slen, hash, 20) != 1)
|
||||||
fatal("key_verify failed for server_host_key");
|
fatal("key_verify failed for server_host_key");
|
||||||
key_free(server_host_key);
|
key_free(server_host_key);
|
||||||
|
xfree(signature);
|
||||||
|
|
||||||
kex_derive_keys(kex, hash, shared_secret);
|
kex_derive_keys(kex, hash, shared_secret);
|
||||||
|
BN_clear_free(shared_secret);
|
||||||
packet_set_kex(kex);
|
packet_set_kex(kex);
|
||||||
|
|
||||||
/* save session id */
|
/* save session id */
|
||||||
|
6
sshd.c
6
sshd.c
@ -40,7 +40,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: sshd.c,v 1.155 2001/01/21 19:06:00 markus Exp $");
|
RCSID("$OpenBSD: sshd.c,v 1.156 2001/01/22 17:22:28 stevesk Exp $");
|
||||||
|
|
||||||
#include <openssl/dh.h>
|
#include <openssl/dh.h>
|
||||||
#include <openssl/bn.h>
|
#include <openssl/bn.h>
|
||||||
@ -1531,6 +1531,7 @@ ssh_dh1_server(Kex *kex, Buffer *client_kexinit, Buffer *server_kexinit)
|
|||||||
buffer_free(server_kexinit);
|
buffer_free(server_kexinit);
|
||||||
xfree(client_kexinit);
|
xfree(client_kexinit);
|
||||||
xfree(server_kexinit);
|
xfree(server_kexinit);
|
||||||
|
BN_free(dh_client_pub);
|
||||||
#ifdef DEBUG_KEXDH
|
#ifdef DEBUG_KEXDH
|
||||||
fprintf(stderr, "hash == ");
|
fprintf(stderr, "hash == ");
|
||||||
for (i = 0; i< 20; i++)
|
for (i = 0; i< 20; i++)
|
||||||
@ -1560,6 +1561,7 @@ ssh_dh1_server(Kex *kex, Buffer *client_kexinit, Buffer *server_kexinit)
|
|||||||
packet_write_wait();
|
packet_write_wait();
|
||||||
|
|
||||||
kex_derive_keys(kex, hash, shared_secret);
|
kex_derive_keys(kex, hash, shared_secret);
|
||||||
|
BN_clear_free(shared_secret);
|
||||||
packet_set_kex(kex);
|
packet_set_kex(kex);
|
||||||
|
|
||||||
/* have keys, free DH */
|
/* have keys, free DH */
|
||||||
@ -1673,6 +1675,7 @@ ssh_dhgex_server(Kex *kex, Buffer *client_kexinit, Buffer *server_kexinit)
|
|||||||
buffer_free(server_kexinit);
|
buffer_free(server_kexinit);
|
||||||
xfree(client_kexinit);
|
xfree(client_kexinit);
|
||||||
xfree(server_kexinit);
|
xfree(server_kexinit);
|
||||||
|
BN_free(dh_client_pub);
|
||||||
#ifdef DEBUG_KEXDH
|
#ifdef DEBUG_KEXDH
|
||||||
fprintf(stderr, "hash == ");
|
fprintf(stderr, "hash == ");
|
||||||
for (i = 0; i< 20; i++)
|
for (i = 0; i< 20; i++)
|
||||||
@ -1702,6 +1705,7 @@ ssh_dhgex_server(Kex *kex, Buffer *client_kexinit, Buffer *server_kexinit)
|
|||||||
packet_write_wait();
|
packet_write_wait();
|
||||||
|
|
||||||
kex_derive_keys(kex, hash, shared_secret);
|
kex_derive_keys(kex, hash, shared_secret);
|
||||||
|
BN_clear_free(shared_secret);
|
||||||
packet_set_kex(kex);
|
packet_set_kex(kex);
|
||||||
|
|
||||||
/* have keys, free DH */
|
/* have keys, free DH */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user