mirror_edk2/MdeModulePkg/Universal/Network
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
..
ArpDxe MdeModulePkg: Update IP4 stack drivers for classless address unicast check. 2016-10-28 14:20:10 +08:00
Dhcp4Dxe MdeModulePkg: Fix some typos of "according" 2017-02-08 14:48:02 +08:00
DpcDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
Ip4Dxe MdeModulePkg/Ip4Dxe: fix ICMP echo reply memory leak 2017-12-12 19:12:41 +08:00
IScsiDxe MdeModulePkg: Fix assert in iSCSI. 2016-12-07 16:13:11 +08:00
MnpDxe MdeModulePkg/MnpDxe: Fix EBC build hang issue. 2017-06-02 13:17:17 +08:00
Mtftp4Dxe MdeModulePkg/Mtftp4Dxe: Add invalid ServerIp check during MTFTP configuration 2017-04-21 13:06:16 +08:00
SnpDxe MdeModulePkg/SNP: remove redundant DEBUG print in SNP Transmit.c 2017-11-16 14:09:21 +08:00
Tcp4Dxe MdeModulePkg/Network: Typo fix 2017-06-14 10:51:29 +08:00
Udp4Dxe MdeModulePkg/Network: Fix potential ASSERT if NetIp4IsUnicast is called 2017-03-23 11:39:15 +08:00
UefiPxeBcDxe MdeModulePkg/UefiPxeBcDxe: Refine the PXE boot displayed information 2017-06-05 16:28:51 +08:00
VlanConfigDxe MdeModulePkg: Replace [Ascii|Unicode]ValueToString 2017-03-02 09:58:11 +08:00