public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Maciej Rabeda" <maciej.rabeda@linux.intel.com>
To: "Fu, Siyuan" <siyuan.fu@intel.com>,
	"Armour, Nicholas" <nicholas.armour@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Wu, Jiaxin" <jiaxin.wu@intel.com>
Subject: Re: [PATCH 1/1] NetworkPkg/ArpDxe: Recycle invalid ARP packets(CVE-2019-14559).
Date: Mon, 17 Feb 2020 16:44:53 +0100	[thread overview]
Message-ID: <4b95b702-c544-688d-ef03-8cee6787246b@linux.intel.com> (raw)
In-Reply-To: <B1FF2E9001CE9041BD10B825821D5BC58B989326@SHSMSX103.ccr.corp.intel.com>

Hi Nicholas,

Instead of adding gBS->SignalEvent() lines, please utilize 
RECYCLE_RXDATA goto label. You can find the same gBS->SignalEvent() 
being done there.
Additionally, please apply goto change in place pointed by Siyuan.

Thanks,
Maciej

On 17-Feb-20 06:15, Fu, Siyuan wrote:
> Hi, Nicholas
>
> Should the signal recycle event also be added to below if condition?
>
>    if (RxData->DataLength < sizeof (ARP_HEAD)) {
>      //
>      // Restart the receiving if packet size is not correct.
>      //
>      goto RESTART_RECEIVE;
>    }
>
>
> Best Regards
> Siyuan
>
>> -----Original Message-----
>> From: Armour, Nicholas <nicholas.armour@intel.com>
>> Sent: 2020年2月13日 7:54
>> 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 1/1] NetworkPkg/ArpDxe: Recycle invalid ARP packets(CVE-
>> 2019-14559).
>>
>> 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 | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/NetworkPkg/ArpDxe/ArpImpl.c b/NetworkPkg/ArpDxe/ArpImpl.c
>> index 9cdb33f2bd66..09fc8811f125 100644
>> --- a/NetworkPkg/ArpDxe/ArpImpl.c
>> +++ b/NetworkPkg/ArpDxe/ArpImpl.c
>> @@ -125,6 +125,7 @@ ArpOnFrameRcvdDpc (
>>     Head->OpCode    = NTOHS (Head->OpCode);
>>
>>     if (RxData->DataLength < (sizeof (ARP_HEAD) + 2 * Head->HwAddrLen + 2 *
>> Head->ProtoAddrLen)) {
>> +    gBS->SignalEvent (RxData->RecycleEvent);
>>       goto RESTART_RECEIVE;
>>     }
>>
>> --
>> 2.16.2.windows.1

  reply	other threads:[~2020-02-17 15:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1581551021.git.nicholas.armour@intel.com>
2020-02-12 23:53 ` [PATCH 1/1] NetworkPkg/ArpDxe: Recycle invalid ARP packets(CVE-2019-14559) Armour, Nicholas
2020-02-17  5:07   ` [edk2-devel] " Liming Gao
2020-02-17  5:15   ` Siyuan, Fu
2020-02-17 15:44     ` Maciej Rabeda [this message]
2020-02-17  7:50   ` [edk2-devel] " Laszlo Ersek

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=4b95b702-c544-688d-ef03-8cee6787246b@linux.intel.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