]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/ArpDxe/ArpImpl.c
NetworkPkg/ArpDxe: Recycle invalid ARP packets (CVE-2019-14559)
[mirror_edk2.git] / NetworkPkg / ArpDxe / ArpImpl.c
index 9cdb33f2bd66f1455a0d88ac88a59fe443013fe0..ed2d756d3e1776e012c7f27f96de1cc3521b471d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The implementation of the ARP protocol.\r
 \r
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>\r
 SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
@@ -113,7 +113,7 @@ ArpOnFrameRcvdDpc (
     //\r
     // Restart the receiving if packet size is not correct.\r
     //\r
-    goto RESTART_RECEIVE;\r
+    goto RECYCLE_RXDATA;\r
   }\r
 \r
   //\r
@@ -125,7 +125,7 @@ ArpOnFrameRcvdDpc (
   Head->OpCode    = NTOHS (Head->OpCode);\r
 \r
   if (RxData->DataLength < (sizeof (ARP_HEAD) + 2 * Head->HwAddrLen + 2 * Head->ProtoAddrLen)) {\r
-    goto RESTART_RECEIVE;\r
+    goto RECYCLE_RXDATA;\r
   }\r
 \r
   if ((Head->HwType != ArpService->SnpMode.IfType) ||\r