diff options
author | djm@openbsd.org <djm@openbsd.org> | 2018-08-13 02:41:05 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2018-08-13 12:42:13 +1000 |
commit | c3903c38b0fd168ab3d925c2b129d1a599593426 (patch) | |
tree | a0914654d1d42e32084afe2d34144c0fadc2735d /sshd.c | |
parent | 1b9dd4aa15208100fbc3650f33ea052255578282 (diff) |
upstream: revert compat.[ch] section of the following change. It
causes double-free under some circumstances.
--
date: 2018/07/31 03:07:24; author: djm; state: Exp; lines: +33 -18; commitid: f7g4UI8eeOXReTPh;
fix some memory leaks spotted by Coverity via Jakub Jelen in bz#2366
feedback and ok dtucker@
OpenBSD-Commit-ID: 1e77547f60fdb5e2ffe23e2e4733c54d8d2d1137
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshd.c,v 1.513 2018/07/31 03:07:24 djm Exp $ */ | 1 | /* $OpenBSD: sshd.c,v 1.514 2018/08/13 02:41:05 djm 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 |
@@ -2268,11 +2268,11 @@ do_ssh2_kex(void) | |||
2268 | int r; | 2268 | int r; |
2269 | 2269 | ||
2270 | myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal( | 2270 | myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal( |
2271 | options.kex_algorithms, datafellows); | 2271 | options.kex_algorithms); |
2272 | myproposal[PROPOSAL_ENC_ALGS_CTOS] = compat_cipher_proposal( | 2272 | myproposal[PROPOSAL_ENC_ALGS_CTOS] = compat_cipher_proposal( |
2273 | options.ciphers, datafellows); | 2273 | options.ciphers); |
2274 | myproposal[PROPOSAL_ENC_ALGS_STOC] = compat_cipher_proposal( | 2274 | myproposal[PROPOSAL_ENC_ALGS_STOC] = compat_cipher_proposal( |
2275 | options.ciphers, datafellows); | 2275 | options.ciphers); |
2276 | myproposal[PROPOSAL_MAC_ALGS_CTOS] = | 2276 | myproposal[PROPOSAL_MAC_ALGS_CTOS] = |
2277 | myproposal[PROPOSAL_MAC_ALGS_STOC] = options.macs; | 2277 | myproposal[PROPOSAL_MAC_ALGS_STOC] = options.macs; |
2278 | 2278 | ||
@@ -2286,7 +2286,7 @@ do_ssh2_kex(void) | |||
2286 | options.rekey_interval); | 2286 | options.rekey_interval); |
2287 | 2287 | ||
2288 | myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = compat_pkalg_proposal( | 2288 | myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = compat_pkalg_proposal( |
2289 | list_hostkey_types(), datafellows); | 2289 | list_hostkey_types()); |
2290 | 2290 | ||
2291 | /* start key exchange */ | 2291 | /* start key exchange */ |
2292 | if ((r = kex_setup(active_state, myproposal)) != 0) | 2292 | if ((r = kex_setup(active_state, myproposal)) != 0) |