public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Fu, Siyuan" <siyuan.fu@intel.com>
To: "Wu, Jiaxin" <jiaxin.wu@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Ye, Ting" <ting.ye@intel.com>, "Wu, Jiaxin" <jiaxin.wu@intel.com>
Subject: Re: [PATCH v1] NetworkPkg/TlsDxe: Fix failure to process multiple TLS records.
Date: Wed, 31 Oct 2018 05:53:28 +0000	[thread overview]
Message-ID: <B1FF2E9001CE9041BD10B825821D5BC58B678C9C@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20181031054212.3276-1-Jiaxin.wu@intel.com>

Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>


> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Jiaxin Wu
> Sent: Wednesday, October 31, 2018 1:42 PM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting <ting.ye@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Wu,
> Jiaxin <jiaxin.wu@intel.com>
> Subject: [edk2] [PATCH v1] NetworkPkg/TlsDxe: Fix failure to process
> multiple TLS records.
> 
> 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 <ting.ye@intel.com>
> Cc: Fu Siyuan <siyuan.fu@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
> ---
>  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;
> 
> --
> 2.17.1.windows.2
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


  reply	other threads:[~2018-10-31  5:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-31  5:42 [PATCH v1] NetworkPkg/TlsDxe: Fix failure to process multiple TLS records Jiaxin Wu
2018-10-31  5:53 ` Fu, Siyuan [this message]
2018-11-05 18:32 ` Laszlo Ersek
2018-11-06  2:13   ` Wu, Jiaxin
2018-11-06 14:25     ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B1FF2E9001CE9041BD10B825821D5BC58B678C9C@SHSMSX103.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox