From 7f87bd9cc976245cfea7a180dfac5964a9f313d3 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Mon, 1 Jun 2020 12:20:31 +0200 Subject: [PATCH] Avoid crash on cleanup --- openssh-7.6p1-audit.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openssh-7.6p1-audit.patch b/openssh-7.6p1-audit.patch index 675b672..98d5709 100644 --- a/openssh-7.6p1-audit.patch +++ b/openssh-7.6p1-audit.patch @@ -1738,7 +1738,7 @@ diff -up openssh/packet.c.audit openssh/packet.c state->newkeys[mode] = NULL; } /* note that both bytes and the seqnr are not reset */ -@@ -2167,6 +2183,71 @@ ssh_packet_get_output(struct ssh *ssh) +@@ -2167,6 +2183,72 @@ ssh_packet_get_output(struct ssh *ssh) return (void *)ssh->state->output; } @@ -1769,6 +1769,7 @@ diff -up openssh/packet.c.audit openssh/packet.c + + cipher_free(state->receive_context); + cipher_free(state->send_context); ++ state->send_context = state->receive_context = NULL; + + sshbuf_free(state->input); + state->input = NULL;