From 7f87bd9cc976245cfea7a180dfac5964a9f313d3 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Jun 01 2020 10:20:31 +0000 Subject: Avoid crash on cleanup --- 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;