From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 20D01211350C4 for ; Tue, 6 Nov 2018 06:25:47 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9FC66C04958C; Tue, 6 Nov 2018 14:25:46 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-95.rdu2.redhat.com [10.10.120.95]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3014A5C21B; Tue, 6 Nov 2018 14:25:43 +0000 (UTC) To: "Wu, Jiaxin" , "edk2-devel@lists.01.org" Cc: "Ye, Ting" , "Fu, Siyuan" References: <20181031054212.3276-1-Jiaxin.wu@intel.com> <6571c3cf-7db2-4e88-f5a0-56aef5bf63c3@redhat.com> <895558F6EA4E3B41AC93A00D163B7274164F1A93@SHSMSX103.ccr.corp.intel.com> From: Laszlo Ersek Message-ID: <43d6d5fe-54c3-e439-6df0-33a1271e0ae5@redhat.com> Date: Tue, 6 Nov 2018 15:25:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <895558F6EA4E3B41AC93A00D163B7274164F1A93@SHSMSX103.ccr.corp.intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 06 Nov 2018 14:25:46 +0000 (UTC) Subject: Re: [PATCH v1] NetworkPkg/TlsDxe: Fix failure to process multiple TLS records. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Nov 2018 14:25:47 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 11/06/18 03:13, Wu, Jiaxin wrote: > Already share the info @ https://bugzilla.tianocore.org/show_bug.cgi?id=1290 Awesome, thanks! Laszlo >> -----Original Message----- >> From: Laszlo Ersek [mailto:lersek@redhat.com] >> Sent: Tuesday, November 6, 2018 2:33 AM >> To: Wu, Jiaxin ; edk2-devel@lists.01.org >> Cc: Ye, Ting ; Fu, Siyuan >> Subject: Re: [edk2] [PATCH v1] NetworkPkg/TlsDxe: Fix failure to process >> multiple TLS records. >> >> On 10/31/18 06:42, Jiaxin Wu wrote: >>> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1290. >>> >>> Current implementation failed to parse the multiple TLS record >>> messages due to the incorrect pointer of TLS record header. This >>> patch is to resolve that problem. >>> >>> Cc: Ye Ting >>> Cc: Fu Siyuan >>> Contributed-under: TianoCore Contribution Agreement 1.1 >>> Signed-off-by: Wu Jiaxin >>> --- >>> NetworkPkg/TlsDxe/TlsImpl.c | 4 ++-- >>> 1 file changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/NetworkPkg/TlsDxe/TlsImpl.c b/NetworkPkg/TlsDxe/TlsImpl.c >>> index ea83dbd04f..2d4169b0a5 100644 >>> --- a/NetworkPkg/TlsDxe/TlsImpl.c >>> +++ b/NetworkPkg/TlsDxe/TlsImpl.c >>> @@ -142,11 +142,11 @@ TlsEncryptPacket ( >>> } >>> >>> BufferOutSize += ThisMessageSize; >>> >>> BufferInPtr += TLS_RECORD_HEADER_LENGTH + ThisPlainMessageSize; >>> - TempRecordHeader += ThisMessageSize; >>> + TempRecordHeader = (TLS_RECORD_HEADER *)((UINT8 >> *)TempRecordHeader + ThisMessageSize); >>> } >>> >>> FreePool (BufferIn); >>> BufferIn = NULL; >>> >>> @@ -315,11 +315,11 @@ TlsDecryptPacket ( >>> CopyMem (TempRecordHeader, RecordHeaderIn, >> TLS_RECORD_HEADER_LENGTH); >>> TempRecordHeader->Length = ThisPlainMessageSize; >>> BufferOutSize += TLS_RECORD_HEADER_LENGTH + >> ThisPlainMessageSize; >>> >>> BufferInPtr += TLS_RECORD_HEADER_LENGTH + ThisCipherMessageSize; >>> - TempRecordHeader += TLS_RECORD_HEADER_LENGTH + >> ThisPlainMessageSize; >>> + TempRecordHeader = (TLS_RECORD_HEADER *)((UINT8 >> *)TempRecordHeader + TLS_RECORD_HEADER_LENGTH + >> ThisPlainMessageSize); >>> } >>> >>> FreePool (BufferIn); >>> BufferIn = NULL; >>> >>> >> >> What is the practical impact of this issue? In what scenario was it >> encountered? What were the symptoms? >> >> I realize the patch may have been pushed by now -- please consider >> adding the information to the BZ. (Or, please answer here, and then add >> the message URL to the BZ.) >> >> Thanks >> Laszlo