From: "Anbazhagan, Baraneedharan" <anbazhagan@hp.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "maciej.rabeda@linux.intel.com" <maciej.rabeda@linux.intel.com>,
"jiaxin.wu@intel.com" <jiaxin.wu@intel.com>,
"siyuan.fu@intel.com" <siyuan.fu@intel.com>
Subject: Re: NetworkPkg: Fix invalid pointer for DNS response token on error
Date: Thu, 25 Nov 2021 01:28:27 +0000 [thread overview]
Message-ID: <TU4PR8401MB06545ECA2B707E56362F709FBA629@TU4PR8401MB0654.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <TU4PR8401MB065415F7B9E638BEF95BA635BA629@TU4PR8401MB0654.NAMPRD84.PROD.OUTLOOK.COM>
[-- Attachment #1: Type: text/plain, Size: 956 bytes --]
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: 4150 bytes --]
next parent reply other threads:[~2021-11-25 1:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <TU4PR8401MB065415F7B9E638BEF95BA635BA629@TU4PR8401MB0654.NAMPRD84.PROD.OUTLOOK.COM>
2021-11-25 1:28 ` Anbazhagan, Baraneedharan [this message]
2021-11-25 1:36 ` NetworkPkg: Fix invalid pointer for DNS response token on error Wu, Jiaxin
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=TU4PR8401MB06545ECA2B707E56362F709FBA629@TU4PR8401MB0654.NAMPRD84.PROD.OUTLOOK.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