public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v3 1/1] NetworkPkg/ArpDxe: Recycle invalid ARP packets (CVE-2019-14559)
       [not found] <cover.1582152777.git.nicholas.armour@intel.com>
@ 2020-02-19 22:53 ` Armour, Nicholas
  2020-02-19 23:46   ` Siyuan, Fu
  0 siblings, 1 reply; 2+ messages in thread
From: Armour, Nicholas @ 2020-02-19 22:53 UTC (permalink / raw)
  To: devel; +Cc: Nicholas Armour, Jiaxin Wu, Maciej Rabeda, Siyuan Fu

Fixing subject line

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2031

This patch triggers the RecycleEvent for invalid ARP packets.
Prior to this, we would just ignore invalid ARP packets,
and never free them.

Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: Nicholas Armour <nicholas.armour@intel.com>
---
 NetworkPkg/ArpDxe/ArpImpl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/NetworkPkg/ArpDxe/ArpImpl.c b/NetworkPkg/ArpDxe/ArpImpl.c
index 9cdb33f2bd66..703fe20cc892 100644
--- a/NetworkPkg/ArpDxe/ArpImpl.c
+++ b/NetworkPkg/ArpDxe/ArpImpl.c
@@ -113,7 +113,7 @@ ArpOnFrameRcvdDpc (
     //
     // Restart the receiving if packet size is not correct.
     //
-    goto RESTART_RECEIVE;
+    goto RECYCLE_RXDATA;
   }
 
   //
@@ -125,7 +125,7 @@ ArpOnFrameRcvdDpc (
   Head->OpCode    = NTOHS (Head->OpCode);
 
   if (RxData->DataLength < (sizeof (ARP_HEAD) + 2 * Head->HwAddrLen + 2 * Head->ProtoAddrLen)) {
-    goto RESTART_RECEIVE;
+    goto RECYCLE_RXDATA;
   }
 
   if ((Head->HwType != ArpService->SnpMode.IfType) ||
-- 
2.16.2.windows.1


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

* Re: [PATCH v3 1/1] NetworkPkg/ArpDxe: Recycle invalid ARP packets (CVE-2019-14559)
  2020-02-19 22:53 ` [PATCH v3 1/1] NetworkPkg/ArpDxe: Recycle invalid ARP packets (CVE-2019-14559) Armour, Nicholas
@ 2020-02-19 23:46   ` Siyuan, Fu
  0 siblings, 0 replies; 2+ messages in thread
From: Siyuan, Fu @ 2020-02-19 23:46 UTC (permalink / raw)
  To: Armour, Nicholas, devel@edk2.groups.io; +Cc: Wu, Jiaxin, Maciej Rabeda

Please change the Copyright year to 2020, with that:

Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>

> -----Original Message-----
> From: Armour, Nicholas <nicholas.armour@intel.com>
> Sent: 2020年2月20日 6:53
> To: devel@edk2.groups.io
> Cc: Armour, Nicholas <nicholas.armour@intel.com>; Wu, Jiaxin
> <jiaxin.wu@intel.com>; Maciej Rabeda <maciej.rabeda@linux.intel.com>; Fu,
> Siyuan <siyuan.fu@intel.com>
> Subject: [PATCH v3 1/1] NetworkPkg/ArpDxe: Recycle invalid ARP packets
> (CVE-2019-14559)
> 
> Fixing subject line
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2031
> 
> This patch triggers the RecycleEvent for invalid ARP packets.
> Prior to this, we would just ignore invalid ARP packets,
> and never free them.
> 
> Cc: Jiaxin Wu <jiaxin.wu@intel.com>
> Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
> Cc: Siyuan Fu <siyuan.fu@intel.com>
> Signed-off-by: Nicholas Armour <nicholas.armour@intel.com>
> ---
>  NetworkPkg/ArpDxe/ArpImpl.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/NetworkPkg/ArpDxe/ArpImpl.c b/NetworkPkg/ArpDxe/ArpImpl.c
> index 9cdb33f2bd66..703fe20cc892 100644
> --- a/NetworkPkg/ArpDxe/ArpImpl.c
> +++ b/NetworkPkg/ArpDxe/ArpImpl.c
> @@ -113,7 +113,7 @@ ArpOnFrameRcvdDpc (
>      //
>      // Restart the receiving if packet size is not correct.
>      //
> -    goto RESTART_RECEIVE;
> +    goto RECYCLE_RXDATA;
>    }
> 
>    //
> @@ -125,7 +125,7 @@ ArpOnFrameRcvdDpc (
>    Head->OpCode    = NTOHS (Head->OpCode);
> 
>    if (RxData->DataLength < (sizeof (ARP_HEAD) + 2 * Head->HwAddrLen + 2 *
> Head->ProtoAddrLen)) {
> -    goto RESTART_RECEIVE;
> +    goto RECYCLE_RXDATA;
>    }
> 
>    if ((Head->HwType != ArpService->SnpMode.IfType) ||
> --
> 2.16.2.windows.1


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

end of thread, other threads:[~2020-02-19 23:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cover.1582152777.git.nicholas.armour@intel.com>
2020-02-19 22:53 ` [PATCH v3 1/1] NetworkPkg/ArpDxe: Recycle invalid ARP packets (CVE-2019-14559) Armour, Nicholas
2020-02-19 23:46   ` Siyuan, Fu

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