[edk2-devel] [PATCH 1/1] NetworkPkg/ArpDxe: Recycle invalid ARP packets(CVE-2019-14559).

Maciej Rabeda maciej.rabeda at linux.intel.com
Mon Feb 17 15:44:53 UTC 2020


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 at intel.com>
>> Sent: 2020年2月13日 7:54
>> To: devel at edk2.groups.io
>> Cc: Armour, Nicholas <nicholas.armour at intel.com>; Wu, Jiaxin
>> <jiaxin.wu at intel.com>; Maciej Rabeda <maciej.rabeda at linux.intel.com>; Fu,
>> Siyuan <siyuan.fu at 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 at intel.com>
>> Cc: Maciej Rabeda <maciej.rabeda at linux.intel.com>
>> Cc: Siyuan Fu <siyuan.fu at intel.com>
>> Signed-off-by: Nicholas Armour <nicholas.armour at 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

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#54560): https://edk2.groups.io/g/devel/message/54560
Mute This Topic: https://groups.io/mt/71240876/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list