From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail2.protonmail.ch (mail2.protonmail.ch [185.70.40.22]) by mx.groups.io with SMTP id smtpd.web10.9947.1599268552704689282 for ; Fri, 04 Sep 2020 18:15:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@scott.ph header.s=protonmail header.b=NmY/eYXn; spf=pass (domain: scott.ph, ip: 185.70.40.22, mailfrom: scott@scott.ph) Date: Sat, 05 Sep 2020 01:15:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scott.ph; s=protonmail; t=1599268550; bh=X3jYTSvSdpuxLyZ8yNjzF2vrJtz0JdTt0OOyh7Y/mtE=; h=Date:To:From:Reply-To:Subject:From; b=NmY/eYXnXzQLjheTL96LSN7P0RIIJ2RpQe19m6dXSIhCwCVzFNKnzsOoMgwU9bEUg 463jEi9pR5/UgTNvcbLbkwAbzUkTG/NC0P2yciuT40DmaLl70i11mnaWGg61GjxFyc Oi9+684XbcOGbNC75OhKfefEXPHuawR5K5NUKEPW8xLpcOUAVMzJH1Rk9pWA1iBxMy j+SHb+s8hCwus0SQDto/l5byWuk5bs/AHUVAyzGRTE/zftiZeKjKTqzKLv/IYexVu3 fb89W/IJAROrRAyY6qan/gQbjE/iHXeTj8+8rKOOjjRvlUloAP2YdTANwKoZYufIqh +iiiDbA8Ah66w== To: devel@edk2.groups.io From: D Scott Phillips Reply-To: D Scott Phillips Subject: [PATCH] NetworkPkg/HttpDxe: Clear TlsChildHandle during cleanup Message-ID: <20200905011540.6847-1-scott@scott.ph> MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: D Scott Phillips Leaving TlsChildHandle with the stale handle causes later use of https with the http instance to incorrectly skip tls reconfiguration, use the stale handle, and eventually call a garbage function pointer. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1917 Signed-off-by: D Scott Phillips --- NetworkPkg/HttpDxe/HttpProto.c | 1 + 1 file changed, 1 insertion(+) diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.= c index 3c7c6ff9f0..afc7db5a72 100644 --- a/NetworkPkg/HttpDxe/HttpProto.c +++ b/NetworkPkg/HttpDxe/HttpProto.c @@ -873,6 +873,7 @@ HttpCleanProtocol ( // Destroy the TLS instance. // HttpInstance->TlsSb->DestroyChild (HttpInstance->TlsSb, HttpInstance->= TlsChildHandle); + HttpInstance->TlsChildHandle =3D NULL; } =20 if (HttpInstance->Tcp4ChildHandle !=3D NULL) { --=20 2.26.2