public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Chiu, Chasel" <chasel.chiu@intel.com>
To: "Desimone, Nathaniel L" <nathaniel.l.desimone@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Kubacki, Michael A" <michael.a.kubacki@intel.com>,
	"Chaganty, Rangasai V" <rangasai.v.chaganty@intel.com>
Subject: Re: [edk2-platforms] [PATCH] KabylakeSiliconPkg: Possible out-of-bounds memory writes
Date: Tue, 16 Jul 2019 00:07:02 +0000	[thread overview]
Message-ID: <3C3EFB470A303B4AB093197B6777CCEC5042AE5A@PGSMSX111.gar.corp.intel.com> (raw)
In-Reply-To: <20190715203933.29256-1-nathaniel.l.desimone@intel.com>


Please extend copyright to 2019, with that change, Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>

> -----Original Message-----
> From: Desimone, Nathaniel L
> Sent: Tuesday, July 16, 2019 4:40 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Kubacki, Michael A
> <michael.a.kubacki@intel.com>; Chaganty, Rangasai V
> <rangasai.v.chaganty@intel.com>
> Subject: [edk2-platforms] [PATCH] KabylakeSiliconPkg: Possible out-of-bounds
> memory writes
> 
> - Add check for the DSDT not existing.
> - Fixed logic errors in loop boundary check.
> 
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Michael A Kubacki <michael.a.kubacki@intel.com>
> Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
> 
> Co-authored-by: John Mathews <john.mathews@intel.com>
> Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
> ---
>  .../Library/DxeAslUpdateLib/DxeAslUpdateLib.c               | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Library/DxeAslUpdateLib/DxeAslUpdateLib.
> c
> b/Silicon/Intel/KabylakeSiliconPkg/Library/DxeAslUpdateLib/DxeAslUpdateLib.
> c
> index e6ab43db6d..a9611f750f 100644
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/Library/DxeAslUpdateLib/DxeAslUpdateLib.
> c
> +++
> b/Silicon/Intel/KabylakeSiliconPkg/Library/DxeAslUpdateLib/DxeAslUpdateLib.
> c
> @@ -59,6 +59,7 @@ InitializeAslUpdateLib (
>    @param[in] Length            - length of data to be overwritten
> 
>    @retval EFI_SUCCESS          - The function completed successfully.
> +  @retval EFI_NOT_FOUND        - Failed to locate AcpiTable.
>  **/
>  EFI_STATUS
>  UpdateNameAslCode (
> @@ -99,11 +100,14 @@ UpdateNameAslCode (
>    /// Point to the beginning of the DSDT table
>    ///
>    CurrPtr = (UINT8 *) Table;
> +  if (CurrPtr == NULL) {
> +    return EFI_NOT_FOUND;
> +  }
> 
>    ///
>    /// Loop through the ASL looking for values that we must fix up.
>    ///
> -  for (DsdtPointer = CurrPtr; DsdtPointer <= (CurrPtr +
> ((EFI_ACPI_COMMON_HEADER *) CurrPtr)->Length); DsdtPointer++) {
> +  for (DsdtPointer = CurrPtr; DsdtPointer < (CurrPtr +
> ((EFI_ACPI_COMMON_HEADER *) CurrPtr)->Length); DsdtPointer++) {
>      ///
>      /// Get a pointer to compare for signature
>      ///
> --
> 2.17.1.windows.2


      parent reply	other threads:[~2019-07-16  0:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-15 20:39 [edk2-platforms] [PATCH] KabylakeSiliconPkg: Possible out-of-bounds memory writes Nate DeSimone
2019-07-15 23:17 ` Chaganty, Rangasai V
2019-07-16  0:07 ` Chiu, Chasel [this message]

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=3C3EFB470A303B4AB093197B6777CCEC5042AE5A@PGSMSX111.gar.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