From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.120]) by mx.groups.io with SMTP id smtpd.web10.39222.1599478425675499122 for ; Mon, 07 Sep 2020 04:33:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Z+4xRGWo; spf=pass (domain: redhat.com, ip: 205.139.110.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599478424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fqhc3gGTmamyHeRIpLwe5XBPxgywBFlxkoHOSjlSnsQ=; b=Z+4xRGWojvUWP7LBh4sYwPfq+vVlEnXA3jFvumL+UM4JYeP4uilbrO8rWRebQRnEQDWO27 S4gv4jdjEVvuogZvnREAv8XqCp5vKSX/aD25UBlFk+Vh0TNqdv0cILCPEu20+o+a+U2Xpe hV9NW+Y2yRoOHlpZrXFuCSx0wk5NsOQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-358-yzxPxP4tOXKUGD5jT-IZqQ-1; Mon, 07 Sep 2020 07:33:37 -0400 X-MC-Unique: yzxPxP4tOXKUGD5jT-IZqQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EBEC61005E64; Mon, 7 Sep 2020 11:33:35 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-115-56.ams2.redhat.com [10.36.115.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 167B560C0F; Mon, 7 Sep 2020 11:33:34 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH] NetworkPkg/HttpDxe: Clear TlsChildHandle during cleanup To: devel@edk2.groups.io, scott@scott.ph References: <20200905011540.6847-1-scott@scott.ph> Cc: Rebecca Cran From: "Laszlo Ersek" Message-ID: Date: Mon, 7 Sep 2020 13:33:34 +0200 MIME-Version: 1.0 In-Reply-To: <20200905011540.6847-1-scott@scott.ph> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Hi Scott, (+Rebecca) On 09/05/20 03:15, D Scott Phillips wrote: > 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=1917 > 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 = NULL; > } > > if (HttpInstance->Tcp4ChildHandle != NULL) { > thanks a lot for tracking this down! I've reopened BZ#1917, and linked your patch email in a new comment. But, I'd also like to assign the BZ to you, if that's OK with you. Can you please register in the TianoCore bugzilla instance for that? Thanks! Laszlo