public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-platforms][PATCH v4 1/1] Ext4Pkg: Fixes double-free in Ext4ReadSymlink
@ 2023-02-17  8:56 Savva Mitrofanov
  2023-02-17  9:09 ` Marvin Häuser
  2023-02-17 17:34 ` Pedro Falcato
  0 siblings, 2 replies; 4+ messages in thread
From: Savva Mitrofanov @ 2023-02-17  8:56 UTC (permalink / raw)
  To: devel; +Cc: Marvin Häuser, Pedro Falcato, Vitaly Cheptsov

The SymlinkTmp was deallocated unconditionally, so we shouldn't free it
again on EFI_ERROR

Cc: Marvin Häuser <mhaeuser@posteo.de>
Cc: Pedro Falcato <pedro.falcato@gmail.com>
Cc: Vitaly Cheptsov <vit9696@protonmail.com>
Fixes: e81432fbacb7 ("Ext4Pkg: Add symbolic links support")
Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
---
 Features/Ext4Pkg/Ext4Dxe/Symlink.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Features/Ext4Pkg/Ext4Dxe/Symlink.c b/Features/Ext4Pkg/Ext4Dxe/Symlink.c
index 1189a99ded2b..d80cb9fff92e 100644
--- a/Features/Ext4Pkg/Ext4Dxe/Symlink.c
+++ b/Features/Ext4Pkg/Ext4Dxe/Symlink.c
@@ -243,7 +243,6 @@ Ext4ReadSymlink (
       Status
       ));
     FreePool (Symlink16Tmp);
-    FreePool (SymlinkTmp);
     return Status;
   }
 
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [edk2-platforms][PATCH v4 1/1] Ext4Pkg: Fixes double-free in Ext4ReadSymlink
  2023-02-17  8:56 [edk2-platforms][PATCH v4 1/1] Ext4Pkg: Fixes double-free in Ext4ReadSymlink Savva Mitrofanov
@ 2023-02-17  9:09 ` Marvin Häuser
  2023-02-17 17:34 ` Pedro Falcato
  1 sibling, 0 replies; 4+ messages in thread
From: Marvin Häuser @ 2023-02-17  9:09 UTC (permalink / raw)
  To: Savva Mitrofanov; +Cc: devel, Pedro Falcato, Vitaly Cheptsov

Reviewed-by: Marvin Häuser <mhaeuser@posteo.de>

> On 17. Feb 2023, at 09:56, Savva Mitrofanov <savvamtr@gmail.com> wrote:
> 
> The SymlinkTmp was deallocated unconditionally, so we shouldn't free it
> again on EFI_ERROR
> 
> Cc: Marvin Häuser <mhaeuser@posteo.de>
> Cc: Pedro Falcato <pedro.falcato@gmail.com>
> Cc: Vitaly Cheptsov <vit9696@protonmail.com>
> Fixes: e81432fbacb7 ("Ext4Pkg: Add symbolic links support")
> Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
> ---
> Features/Ext4Pkg/Ext4Dxe/Symlink.c | 1 -
> 1 file changed, 1 deletion(-)
> 
> diff --git a/Features/Ext4Pkg/Ext4Dxe/Symlink.c b/Features/Ext4Pkg/Ext4Dxe/Symlink.c
> index 1189a99ded2b..d80cb9fff92e 100644
> --- a/Features/Ext4Pkg/Ext4Dxe/Symlink.c
> +++ b/Features/Ext4Pkg/Ext4Dxe/Symlink.c
> @@ -243,7 +243,6 @@ Ext4ReadSymlink (
>       Status
>       ));
>     FreePool (Symlink16Tmp);
> -    FreePool (SymlinkTmp);
>     return Status;
>   }
> 
> -- 
> 2.39.1
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edk2-platforms][PATCH v4 1/1] Ext4Pkg: Fixes double-free in Ext4ReadSymlink
  2023-02-17  8:56 [edk2-platforms][PATCH v4 1/1] Ext4Pkg: Fixes double-free in Ext4ReadSymlink Savva Mitrofanov
  2023-02-17  9:09 ` Marvin Häuser
@ 2023-02-17 17:34 ` Pedro Falcato
  2023-02-17 19:06   ` Pedro Falcato
  1 sibling, 1 reply; 4+ messages in thread
From: Pedro Falcato @ 2023-02-17 17:34 UTC (permalink / raw)
  To: Savva Mitrofanov; +Cc: devel, Marvin Häuser, Vitaly Cheptsov

On Fri, Feb 17, 2023 at 8:56 AM Savva Mitrofanov <savvamtr@gmail.com> wrote:
>
> The SymlinkTmp was deallocated unconditionally, so we shouldn't free it
> again on EFI_ERROR
>
> Cc: Marvin Häuser <mhaeuser@posteo.de>
> Cc: Pedro Falcato <pedro.falcato@gmail.com>
> Cc: Vitaly Cheptsov <vit9696@protonmail.com>
> Fixes: e81432fbacb7 ("Ext4Pkg: Add symbolic links support")
> Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
> ---
>  Features/Ext4Pkg/Ext4Dxe/Symlink.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/Features/Ext4Pkg/Ext4Dxe/Symlink.c b/Features/Ext4Pkg/Ext4Dxe/Symlink.c
> index 1189a99ded2b..d80cb9fff92e 100644
> --- a/Features/Ext4Pkg/Ext4Dxe/Symlink.c
> +++ b/Features/Ext4Pkg/Ext4Dxe/Symlink.c
> @@ -243,7 +243,6 @@ Ext4ReadSymlink (
>        Status
>        ));
>      FreePool (Symlink16Tmp);
> -    FreePool (SymlinkTmp);
>      return Status;
>    }
>
> --
> 2.39.1
>

Thank you!

Reviewed-by: Pedro Falcato <pedro.falcato@gmail.com>

-- 
Pedro

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edk2-platforms][PATCH v4 1/1] Ext4Pkg: Fixes double-free in Ext4ReadSymlink
  2023-02-17 17:34 ` Pedro Falcato
@ 2023-02-17 19:06   ` Pedro Falcato
  0 siblings, 0 replies; 4+ messages in thread
From: Pedro Falcato @ 2023-02-17 19:06 UTC (permalink / raw)
  To: Savva Mitrofanov; +Cc: devel, Marvin Häuser, Vitaly Cheptsov

On Fri, Feb 17, 2023 at 5:34 PM Pedro Falcato <pedro.falcato@gmail.com> wrote:
>
> On Fri, Feb 17, 2023 at 8:56 AM Savva Mitrofanov <savvamtr@gmail.com> wrote:
> >
> > The SymlinkTmp was deallocated unconditionally, so we shouldn't free it
> > again on EFI_ERROR
> >
> > Cc: Marvin Häuser <mhaeuser@posteo.de>
> > Cc: Pedro Falcato <pedro.falcato@gmail.com>
> > Cc: Vitaly Cheptsov <vit9696@protonmail.com>
> > Fixes: e81432fbacb7 ("Ext4Pkg: Add symbolic links support")
> > Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
> > ---
> >  Features/Ext4Pkg/Ext4Dxe/Symlink.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/Features/Ext4Pkg/Ext4Dxe/Symlink.c b/Features/Ext4Pkg/Ext4Dxe/Symlink.c
> > index 1189a99ded2b..d80cb9fff92e 100644
> > --- a/Features/Ext4Pkg/Ext4Dxe/Symlink.c
> > +++ b/Features/Ext4Pkg/Ext4Dxe/Symlink.c
> > @@ -243,7 +243,6 @@ Ext4ReadSymlink (
> >        Status
> >        ));
> >      FreePool (Symlink16Tmp);
> > -    FreePool (SymlinkTmp);
> >      return Status;
> >    }
> >
> > --
> > 2.39.1
> >
>
> Thank you!
>
> Reviewed-by: Pedro Falcato <pedro.falcato@gmail.com>
>
> --
> Pedro

Pushed to edk2-platforms as 81ec441, with minor corrections (Fixes ->
Fix, as per the standard imperative commit message style).

Thanks!

-- 
Pedro

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-02-17 19:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-17  8:56 [edk2-platforms][PATCH v4 1/1] Ext4Pkg: Fixes double-free in Ext4ReadSymlink Savva Mitrofanov
2023-02-17  9:09 ` Marvin Häuser
2023-02-17 17:34 ` Pedro Falcato
2023-02-17 19:06   ` Pedro Falcato

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox