From: "Rebecca Cran" <rebecca@nuviainc.com>
To: Michael D Kinney <michael.d.kinney@intel.com>, devel@edk2.groups.io
Subject: Re: [edk2-libc Patch] StdLib/LibC/Uefi/Devices/Utility: Fix use after free
Date: Wed, 18 Aug 2021 19:45:04 -0600 [thread overview]
Message-ID: <befd0644-c5f1-9029-2cf9-fdea9d6f1b04@nuviainc.com> (raw)
In-Reply-To: <20210818234513.571-1-michael.d.kinney@intel.com>
Reviewed-by: Rebecca Cran <rebecca@nuviainc.com>
--
Rebecca Cran
On 8/18/21 5:45 PM, Michael D Kinney wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=38
>
> Set MPath to NULL after free(MPath) to guarantee that MPath
> is not used after the free() call.
>
> Cc: Rebecca Cran <rebecca@nuviainc.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
> StdLib/LibC/Uefi/Devices/Utility/Path.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/StdLib/LibC/Uefi/Devices/Utility/Path.c b/StdLib/LibC/Uefi/Devices/Utility/Path.c
> index d6728d3..fe19196 100644
> --- a/StdLib/LibC/Uefi/Devices/Utility/Path.c
> +++ b/StdLib/LibC/Uefi/Devices/Utility/Path.c
> @@ -359,6 +359,7 @@ reclassify:
> }
> else if(MPath != NULL) {
> free(MPath); /* Caller doesn't want it so let MPath go free */
> + MPath = NULL;
> }
>
> /* At this point, WPath is an absolute path,
prev parent reply other threads:[~2021-08-19 1:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-18 23:45 [edk2-libc Patch] StdLib/LibC/Uefi/Devices/Utility: Fix use after free Michael D Kinney
2021-08-19 1:45 ` Rebecca Cran [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=befd0644-c5f1-9029-2cf9-fdea9d6f1b04@nuviainc.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