From 3d1bdf33174fb57408b09933d655f7dbc40bcbba Mon Sep 17 00:00:00 2001 From: Sam Kumar Date: Sat, 15 Oct 2022 23:36:44 -0700 Subject: [PATCH] [tcplp] fix bad memory access when refusing incoming TCP connection (#8291) --- third_party/tcplp/bsdtcp/tcp_input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/third_party/tcplp/bsdtcp/tcp_input.c b/third_party/tcplp/bsdtcp/tcp_input.c index 8211f2f30..9f87f7f8d 100644 --- a/third_party/tcplp/bsdtcp/tcp_input.c +++ b/third_party/tcplp/bsdtcp/tcp_input.c @@ -773,6 +773,7 @@ tcp_input(struct ip6_hdr* ip6, struct tcphdr* th, otMessage* msg, struct tcpcb* } if (tp == (struct tcpcb *) -1) { rstreason = ECONNREFUSED; + tp = NULL; goto dropwithreset; } tcp_state_change(tp, TCPS_SYN_RECEIVED);