audk/MdeModulePkg/Universal/Network/Ip4Dxe
Heyi Guo 764c9d9551 MdeModulePkg/Ip4Dxe: fix ICMP echo reply memory leak
When UEFI receives ICMP echo packets it will enter Ip4IcmpReplyEcho
function, and then call Ip4Output. However, if Ip4Output gets some
error and exits early, e.g. fails to find the route entry, memory
buffer of "Data" gets no chance to be freed and memory leak will be
caused. If there is such an attacker in the network, we will see UEFI
runs out of memory and system hangs.

So we explicitly free the memory when error status is returned.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Junbiao Hong <hongjunbiao@huawei.com>
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
2017-12-12 19:12:41 +08:00
..
ComponentName.c 1. Add EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName() support. 2012-12-13 06:47:06 +00:00
Ip4Common.c MdeModulePkg: Update IP4 stack to support point-to-point link with 31-bit mask. 2017-11-13 13:52:17 +08:00
Ip4Common.h MdeModulePkg/Ip4Dxe: Add Ip/Netmask pair check for Ip4Config2 2017-03-17 10:14:18 +08:00
Ip4Config2.vfr MdeModulePkg/Ip4Dxe: Refine the IPv4 configuration help info 2017-04-25 18:17:01 +08:00
Ip4Config2Impl.c MdeModulePkg/Ip4Dxe: Support SetData interface to clear specific configuration 2017-08-11 12:57:58 +08:00
Ip4Config2Impl.h MdeModulePkg/Universal: Fix typos in comments 2016-10-27 09:11:19 +08:00
Ip4Config2Nv.c MdeModulePkg/Network: Fix potential ASSERT if NetIp4IsUnicast is called 2017-03-23 11:39:15 +08:00
Ip4Config2Nv.h MdeModulePkg: Update Ip4Dxe driver to support Ip4Config2 protocol, 2015-07-07 08:19:55 +00:00
Ip4Driver.c MdeModulePkg: Fix GCC build error. 2017-09-06 18:07:40 +08:00
Ip4Driver.h MdeModulePkg: Fix typos in comments and variables 2016-07-11 10:29:48 +08:00
Ip4Dxe.inf MdeModulePkg: Change the default IPv4 config policy 2016-03-02 15:43:50 +08:00
Ip4Dxe.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
Ip4DxeExtra.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
Ip4DxeStrings.uni MdeModulePkg/Ip4Dxe: Refine the IPv4 configuration help info 2017-04-25 18:17:01 +08:00
Ip4Icmp.c MdeModulePkg/Ip4Dxe: fix ICMP echo reply memory leak 2017-12-12 19:12:41 +08:00
Ip4Icmp.h MdeModulePkg: Update Ip4Dxe driver to support Ip4Config2 protocol, 2015-07-07 08:19:55 +00:00
Ip4If.c MdeModulePkg/Ip4Dxe: Fix the incorrect RemoveEntryList 2017-04-21 13:04:24 +08:00
Ip4If.h MdeModulePkg: Fix typos in comments and variables 2016-07-11 10:29:48 +08:00
Ip4Igmp.c MdeModulePkg: Update Ip4Dxe driver to support Ip4Config2 protocol, 2015-07-07 08:19:55 +00:00
Ip4Igmp.h MdeModulePkg: Update Ip4Dxe driver to support Ip4Config2 protocol, 2015-07-07 08:19:55 +00:00
Ip4Impl.c MdeModulePkg/Ip4Dxe: Trigger Ip4Config2 to retrieve the default address. 2017-10-26 16:22:14 +08:00
Ip4Impl.h MdeModulePkg: Fix service binding issue in TCP4 and Ip4 dxe. 2017-03-17 10:14:30 +08:00
Ip4Input.c MdeModulePkg/Ip4Dxe: fix a bug in IP4 driver for IpSec protocol notify. 2017-09-06 14:57:29 +08:00
Ip4Input.h 1. Add EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName() support. 2012-12-13 06:47:06 +00:00
Ip4NvData.h MdeModulePkg: Update Ip4Dxe driver to support Ip4Config2 protocol, 2015-07-07 08:19:55 +00:00
Ip4Option.c MdeModulePkg: Remove variables that are set, but not used 2011-10-31 15:58:05 +00:00
Ip4Option.h Update the copyright notice format 2010-04-24 09:33:45 +00:00
Ip4Output.c MdeModulePkg: Update Ip4Dxe driver to support Ip4Config2 protocol, 2015-07-07 08:19:55 +00:00
Ip4Output.h Update the copyright notice format 2010-04-24 09:33:45 +00:00
Ip4Route.c MdeModulePkg: Add new macros and refine codes 2016-04-11 08:25:33 +08:00
Ip4Route.h Update the copyright notice format 2010-04-24 09:33:45 +00:00