public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* 回复: [edk2-devel] [Patch edk2-stable202111] NetworkPkg: Fix invalid pointer for DNS response token on error
@ 2021-11-25  1:52 gaoliming
  2021-11-25  2:11 ` Michael D Kinney
  2021-11-25 10:54 ` 回复: " Leif Lindholm
  0 siblings, 2 replies; 4+ messages in thread
From: gaoliming @ 2021-11-25  1:52 UTC (permalink / raw)
  To: devel, jiaxin.wu, 'Anbazhagan, Baraneedharan'
  Cc: maciej.rabeda, 'Fu, Siyuan', leif, 'Andrew Fish',
	'Michael D Kinney'

[-- Attachment #1: Type: text/plain, Size: 2053 bytes --]

I suggest to merge this fix for the stable tag 202111. This fix is low risk.


 

Thanks

Liming

发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Wu, Jiaxin
发送时间: 2021年11月25日 9:37
收件人: Anbazhagan, Baraneedharan <anbazhagan@hp.com>; devel@edk2.groups.io
抄送: maciej.rabeda@linux.intel.com; Fu, Siyuan <siyuan.fu@intel.com>
主题: Re: [edk2-devel] NetworkPkg: Fix invalid pointer for DNS response
token on error

 

Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com <mailto:jiaxin.wu@intel.com> >

 

 

 

From: Anbazhagan, Baraneedharan <anbazhagan@hp.com
<mailto:anbazhagan@hp.com> > 
Sent: Thursday, November 25, 2021 9:28 AM
To: devel@edk2.groups.io <mailto:devel@edk2.groups.io> 
Cc: maciej.rabeda@linux.intel.com <mailto:maciej.rabeda@linux.intel.com> ;
Wu, Jiaxin <jiaxin.wu@intel.com <mailto:jiaxin.wu@intel.com> >; Fu, Siyuan
<siyuan.fu@intel.com <mailto:siyuan.fu@intel.com> >
Subject: RE: NetworkPkg: Fix invalid pointer for DNS response token on error

 

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3719

 

Token->RspData.H2AData is de-allocated on error but it is not

set to NULL. HTTP module attempts to free again and cause assert.

 

Signed-off-by: Baraneedharan Anbazhagan anbazhagan@hp.com
<mailto:anbazhagan@hp.com> 

---

NetworkPkg/DnsDxe/DnsImpl.c | 2 ++

1 file changed, 2 insertions(+)

 

diff --git a/NetworkPkg/DnsDxe/DnsImpl.c b/NetworkPkg/DnsDxe/DnsImpl.c

index 2edcb280ac..78a56f2b56 100644

--- a/NetworkPkg/DnsDxe/DnsImpl.c

+++ b/NetworkPkg/DnsDxe/DnsImpl.c

@@ -1700,6 +1700,7 @@ ON_EXIT:

           }

 

           FreePool (Dns4TokenEntry->Token->RspData.H2AData);

+          Dns4TokenEntry->Token->RspData.H2AData = NULL;

         }

       }

     }

@@ -1731,6 +1732,7 @@ ON_EXIT:

           }

 

           FreePool (Dns6TokenEntry->Token->RspData.H2AData);

+          Dns6TokenEntry->Token->RspData.H2AData = NULL;

         }

       }

     }

-- 

2.33.0.windows.2

 




[-- Attachment #2: Type: text/html, Size: 8153 bytes --]

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

* Re: [edk2-devel] [Patch edk2-stable202111] NetworkPkg: Fix invalid pointer for DNS response token on error
  2021-11-25  1:52 回复: [edk2-devel] [Patch edk2-stable202111] NetworkPkg: Fix invalid pointer for DNS response token on error gaoliming
@ 2021-11-25  2:11 ` Michael D Kinney
  2021-11-25 10:54 ` 回复: " Leif Lindholm
  1 sibling, 0 replies; 4+ messages in thread
From: Michael D Kinney @ 2021-11-25  2:11 UTC (permalink / raw)
  To: devel@edk2.groups.io, gaoliming@byosoft.com.cn, Wu, Jiaxin,
	Anbazhagan, Baraneedharan, Kinney, Michael D
  Cc: maciej.rabeda@linux.intel.com, Fu, Siyuan, leif@nuviainc.com,
	'Andrew Fish'

[-- Attachment #1: Type: text/plain, Size: 2796 bytes --]

Hi Liming,

I agree it is both low risk and prevents an ASSERT() condition that should never be triggered.

I approve for edk2-stable202111

Mike

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of gaoliming
Sent: Wednesday, November 24, 2021 5:53 PM
To: devel@edk2.groups.io; Wu, Jiaxin <jiaxin.wu@intel.com>; Anbazhagan, Baraneedharan <anbazhagan@hp.com>
Cc: maciej.rabeda@linux.intel.com; Fu, Siyuan <siyuan.fu@intel.com>; leif@nuviainc.com; 'Andrew Fish' <afish@apple.com>; Kinney, Michael D <michael.d.kinney@intel.com>
Subject: 回复: [edk2-devel] [Patch edk2-stable202111] NetworkPkg: Fix invalid pointer for DNS response token on error

I suggest to merge this fix for the stable tag 202111. This fix is low risk.

Thanks
Liming
发件人: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> 代表 Wu, Jiaxin
发送时间: 2021年11月25日 9:37
收件人: Anbazhagan, Baraneedharan <anbazhagan@hp.com<mailto:anbazhagan@hp.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
抄送: maciej.rabeda@linux.intel.com<mailto:maciej.rabeda@linux.intel.com>; Fu, Siyuan <siyuan.fu@intel.com<mailto:siyuan.fu@intel.com>>
主题: Re: [edk2-devel] NetworkPkg: Fix invalid pointer for DNS response token on error

Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com<mailto:jiaxin.wu@intel.com>>



From: Anbazhagan, Baraneedharan <anbazhagan@hp.com<mailto:anbazhagan@hp.com>>
Sent: Thursday, November 25, 2021 9:28 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: maciej.rabeda@linux.intel.com<mailto:maciej.rabeda@linux.intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com<mailto:jiaxin.wu@intel.com>>; Fu, Siyuan <siyuan.fu@intel.com<mailto:siyuan.fu@intel.com>>
Subject: RE: NetworkPkg: Fix invalid pointer for DNS response token on error

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3719

Token->RspData.H2AData is de-allocated on error but it is not
set to NULL. HTTP module attempts to free again and cause assert.

Signed-off-by: Baraneedharan Anbazhagan anbazhagan@hp.com<mailto:anbazhagan@hp.com>
---
NetworkPkg/DnsDxe/DnsImpl.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/NetworkPkg/DnsDxe/DnsImpl.c b/NetworkPkg/DnsDxe/DnsImpl.c
index 2edcb280ac..78a56f2b56 100644
--- a/NetworkPkg/DnsDxe/DnsImpl.c
+++ b/NetworkPkg/DnsDxe/DnsImpl.c
@@ -1700,6 +1700,7 @@ ON_EXIT:
           }

           FreePool (Dns4TokenEntry->Token->RspData.H2AData);
+          Dns4TokenEntry->Token->RspData.H2AData = NULL;
         }
       }
     }
@@ -1731,6 +1732,7 @@ ON_EXIT:
           }

           FreePool (Dns6TokenEntry->Token->RspData.H2AData);
+          Dns6TokenEntry->Token->RspData.H2AData = NULL;
         }
       }
     }
--
2.33.0.windows.2



[-- Attachment #2: Type: text/html, Size: 47218 bytes --]

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

* Re: 回复: [edk2-devel] [Patch edk2-stable202111] NetworkPkg: Fix invalid pointer for DNS response token on error
  2021-11-25  1:52 回复: [edk2-devel] [Patch edk2-stable202111] NetworkPkg: Fix invalid pointer for DNS response token on error gaoliming
  2021-11-25  2:11 ` Michael D Kinney
@ 2021-11-25 10:54 ` Leif Lindholm
  2021-11-26  8:55   ` 回复: " gaoliming
  1 sibling, 1 reply; 4+ messages in thread
From: Leif Lindholm @ 2021-11-25 10:54 UTC (permalink / raw)
  To: devel, gaoliming
  Cc: jiaxin.wu, 'Anbazhagan, Baraneedharan', maciej.rabeda,
	'Fu, Siyuan', 'Andrew Fish',
	'Michael D Kinney'

Agreed, but the commit message (and the BZ) should state which commit
introduced this issue.

/
    Leif

On Thu, Nov 25, 2021 at 09:52:58 +0800, gaoliming wrote:
> I suggest to merge this fix for the stable tag 202111. This fix is low risk.
> 
> 
>  
> 
> Thanks
> 
> Liming
> 
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Wu, Jiaxin
> 发送时间: 2021年11月25日 9:37
> 收件人: Anbazhagan, Baraneedharan <anbazhagan@hp.com>; devel@edk2.groups.io
> 抄送: maciej.rabeda@linux.intel.com; Fu, Siyuan <siyuan.fu@intel.com>
> 主题: Re: [edk2-devel] NetworkPkg: Fix invalid pointer for DNS response
> token on error
> 
>  
> 
> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com <mailto:jiaxin.wu@intel.com> >
> 
>  
> 
>  
> 
>  
> 
> From: Anbazhagan, Baraneedharan <anbazhagan@hp.com
> <mailto:anbazhagan@hp.com> > 
> Sent: Thursday, November 25, 2021 9:28 AM
> To: devel@edk2.groups.io <mailto:devel@edk2.groups.io> 
> Cc: maciej.rabeda@linux.intel.com <mailto:maciej.rabeda@linux.intel.com> ;
> Wu, Jiaxin <jiaxin.wu@intel.com <mailto:jiaxin.wu@intel.com> >; Fu, Siyuan
> <siyuan.fu@intel.com <mailto:siyuan.fu@intel.com> >
> Subject: RE: NetworkPkg: Fix invalid pointer for DNS response token on error
> 
>  
> 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3719
> 
>  
> 
> Token->RspData.H2AData is de-allocated on error but it is not
> 
> set to NULL. HTTP module attempts to free again and cause assert.
> 
>  
> 
> Signed-off-by: Baraneedharan Anbazhagan anbazhagan@hp.com
> <mailto:anbazhagan@hp.com> 
> 
> ---
> 
> NetworkPkg/DnsDxe/DnsImpl.c | 2 ++
> 
> 1 file changed, 2 insertions(+)
> 
>  
> 
> diff --git a/NetworkPkg/DnsDxe/DnsImpl.c b/NetworkPkg/DnsDxe/DnsImpl.c
> 
> index 2edcb280ac..78a56f2b56 100644
> 
> --- a/NetworkPkg/DnsDxe/DnsImpl.c
> 
> +++ b/NetworkPkg/DnsDxe/DnsImpl.c
> 
> @@ -1700,6 +1700,7 @@ ON_EXIT:
> 
>            }
> 
>  
> 
>            FreePool (Dns4TokenEntry->Token->RspData.H2AData);
> 
> +          Dns4TokenEntry->Token->RspData.H2AData = NULL;
> 
>          }
> 
>        }
> 
>      }
> 
> @@ -1731,6 +1732,7 @@ ON_EXIT:
> 
>            }
> 
>  
> 
>            FreePool (Dns6TokenEntry->Token->RspData.H2AData);
> 
> +          Dns6TokenEntry->Token->RspData.H2AData = NULL;
> 
>          }
> 
>        }
> 
>      }
> 
> -- 
> 
> 2.33.0.windows.2
> 
>  
> 
> 
> 
> 
> 
> 
> 
> 

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

* 回复: 回复: [edk2-devel] [Patch edk2-stable202111] NetworkPkg: Fix invalid pointer for DNS response token on error
  2021-11-25 10:54 ` 回复: " Leif Lindholm
@ 2021-11-26  8:55   ` gaoliming
  0 siblings, 0 replies; 4+ messages in thread
From: gaoliming @ 2021-11-26  8:55 UTC (permalink / raw)
  To: 'Leif Lindholm', devel
  Cc: jiaxin.wu, 'Anbazhagan, Baraneedharan', maciej.rabeda,
	'Fu, Siyuan', 'Andrew Fish',
	'Michael D Kinney'

Leif:
  Yes. Both commit message and BZ are updated. 
  https://github.com/tianocore/edk2/pull/2222 is created to merge this patch. 

Thanks
Liming
> -----邮件原件-----
> 发件人: Leif Lindholm <leif@nuviainc.com>
> 发送时间: 2021年11月25日 18:55
> 收件人: devel@edk2.groups.io; gaoliming@byosoft.com.cn
> 抄送: jiaxin.wu@intel.com; 'Anbazhagan, Baraneedharan'
> <anbazhagan@hp.com>; maciej.rabeda@linux.intel.com; 'Fu, Siyuan'
> <siyuan.fu@intel.com>; 'Andrew Fish' <afish@apple.com>; 'Michael D Kinney'
> <michael.d.kinney@intel.com>
> 主题: Re: 回复: [edk2-devel] [Patch edk2-stable202111] NetworkPkg: Fix
> invalid pointer for DNS response token on error
> 
> Agreed, but the commit message (and the BZ) should state which commit
> introduced this issue.
> 
> /
>     Leif
> 
> On Thu, Nov 25, 2021 at 09:52:58 +0800, gaoliming wrote:
> > I suggest to merge this fix for the stable tag 202111. This fix is low risk.
> >
> >
> >
> >
> > Thanks
> >
> > Liming
> >
> > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Wu, Jiaxin
> > 发送时间: 2021年11月25日 9:37
> > 收件人: Anbazhagan, Baraneedharan <anbazhagan@hp.com>;
> devel@edk2.groups.io
> > 抄送: maciej.rabeda@linux.intel.com; Fu, Siyuan <siyuan.fu@intel.com>
> > 主题: Re: [edk2-devel] NetworkPkg: Fix invalid pointer for DNS response
> > token on error
> >
> >
> >
> > Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com
> <mailto:jiaxin.wu@intel.com> >
> >
> >
> >
> >
> >
> >
> >
> > From: Anbazhagan, Baraneedharan <anbazhagan@hp.com
> > <mailto:anbazhagan@hp.com> >
> > Sent: Thursday, November 25, 2021 9:28 AM
> > To: devel@edk2.groups.io <mailto:devel@edk2.groups.io>
> > Cc: maciej.rabeda@linux.intel.com
> <mailto:maciej.rabeda@linux.intel.com> ;
> > Wu, Jiaxin <jiaxin.wu@intel.com <mailto:jiaxin.wu@intel.com> >; Fu, Siyuan
> > <siyuan.fu@intel.com <mailto:siyuan.fu@intel.com> >
> > Subject: RE: NetworkPkg: Fix invalid pointer for DNS response token on
> error
> >
> >
> >
> > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3719
> >
> >
> >
> > Token->RspData.H2AData is de-allocated on error but it is not
> >
> > set to NULL. HTTP module attempts to free again and cause assert.
> >
> >
> >
> > Signed-off-by: Baraneedharan Anbazhagan anbazhagan@hp.com
> > <mailto:anbazhagan@hp.com>
> >
> > ---
> >
> > NetworkPkg/DnsDxe/DnsImpl.c | 2 ++
> >
> > 1 file changed, 2 insertions(+)
> >
> >
> >
> > diff --git a/NetworkPkg/DnsDxe/DnsImpl.c
> b/NetworkPkg/DnsDxe/DnsImpl.c
> >
> > index 2edcb280ac..78a56f2b56 100644
> >
> > --- a/NetworkPkg/DnsDxe/DnsImpl.c
> >
> > +++ b/NetworkPkg/DnsDxe/DnsImpl.c
> >
> > @@ -1700,6 +1700,7 @@ ON_EXIT:
> >
> >            }
> >
> >
> >
> >            FreePool (Dns4TokenEntry->Token->RspData.H2AData);
> >
> > +          Dns4TokenEntry->Token->RspData.H2AData = NULL;
> >
> >          }
> >
> >        }
> >
> >      }
> >
> > @@ -1731,6 +1732,7 @@ ON_EXIT:
> >
> >            }
> >
> >
> >
> >            FreePool (Dns6TokenEntry->Token->RspData.H2AData);
> >
> > +          Dns6TokenEntry->Token->RspData.H2AData = NULL;
> >
> >          }
> >
> >        }
> >
> >      }
> >
> > --
> >
> > 2.33.0.windows.2
> >
> >
> >
> >
> >
> >
> >
> > 
> >
> >





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

end of thread, other threads:[~2021-11-26  8:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-25  1:52 回复: [edk2-devel] [Patch edk2-stable202111] NetworkPkg: Fix invalid pointer for DNS response token on error gaoliming
2021-11-25  2:11 ` Michael D Kinney
2021-11-25 10:54 ` 回复: " Leif Lindholm
2021-11-26  8:55   ` 回复: " gaoliming

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