From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400e:c05::22f; helo=mail-pg0-x22f.google.com; envelope-from=heyi.guo@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pg0-x22f.google.com (mail-pg0-x22f.google.com [IPv6:2607:f8b0:400e:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B8BA821B02857 for ; Thu, 7 Dec 2017 21:55:37 -0800 (PST) Received: by mail-pg0-x22f.google.com with SMTP id j4so6199818pgp.1 for ; Thu, 07 Dec 2017 22:00:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=WgxrKWtkvNRr6dp0ESNpqomTRqWKyb0Z8EdNQdIRvO0=; b=cEBIXtvXWyO5BDACT7I9v3cPExoTLZG6ClLUDFPLrPcwGnsSq/n2cqRc/VrycUzzYg WPy6oTwJZJh8m9uQxF9ZKByKMhr755+NHXq+tNw8heOnmZ2PxylEVtJXYDrNrYj/BGBe MIyLjoS2VpcPhdXKjhc45GZOXfJ4+zILphTuM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=WgxrKWtkvNRr6dp0ESNpqomTRqWKyb0Z8EdNQdIRvO0=; b=Mbt0K2m/DwfR7T8QaIjXj0RNBLFY9aecBiXOjtzBO1RZ2hqFvtjPK5/3XwQNi+9k49 f4ovOvNCr8YTfE3tI8JqO4t9LGglk7OidDPXkKzDeyOpNLXmDTcBhIhiizmZxIw5Y/7O OAQxYdFCQhT13A6U0TeE0smhG97Dp9XgsFzmeB6372dtFEm3zyxx2xpTdXu+md9M8Km4 EfPh2f58RNth458B7SKdHeMkpclW5MmPsQSXaB0YL2BYzATLE08iPdx7d3tDpkzKwXO2 VZBhI13c3kNnsXJy22b5h6fQoaYiCnsHtBavk0CiD9fX1rFePGcxipWimPeI7cAJ+M/N 2hbQ== X-Gm-Message-State: AKGB3mJ1CVeml+9dHooJRoY1B1FAXB0FVPNraywVDOilL8+05kH6i9Yk +OIr5tsLA5ekHCtol49H79+cSxtzu8c= X-Google-Smtp-Source: AGs4zMbLSUddMqVed5jOS3lSYljlXS2VNwrLxZzOkoyftDb6KhLOHb/lIHCj/Eus//DHgROzZKgM8w== X-Received: by 10.84.246.140 with SMTP id m12mr3742372pll.74.1512712810718; Thu, 07 Dec 2017 22:00:10 -0800 (PST) Received: from SZX1000114654 ([45.56.152.117]) by smtp.gmail.com with ESMTPSA id m124sm12960052pfc.64.2017.12.07.22.00.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 22:00:10 -0800 (PST) From: Guo Heyi X-Google-Original-From: Guo Heyi Date: Fri, 8 Dec 2017 14:00:05 +0800 To: jiaxin.wu@intel.com Cc: "Wu, Jiaxin" , "linaro-uefi@lists.linaro.org" , "edk2-devel@lists.01.org" , "Fu, Siyuan" , Junbiao Hong , "Zeng, Star" , "Dong, Eric" , "Ni, Ruiyu" Message-ID: <20171208060005.GA64254@SZX1000114654> References: <1512613307-62879-1-git-send-email-heyi.guo@linaro.org> <895558F6EA4E3B41AC93A00D163B727416350E2D@SHSMSX103.ccr.corp.intel.com> <5b9ff1f2-d12b-9f81-555f-97fa2a2ef7b3@linaro.org> <895558F6EA4E3B41AC93A00D163B7274163516AB@SHSMSX103.ccr.corp.intel.com> <20171208020420.GA64189@SZX1000114654> MIME-Version: 1.0 In-Reply-To: <20171208020420.GA64189@SZX1000114654> User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [RFC] MdeModulePkg/Ip4Dxe: fix ICMP echo reply memory leak X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 05:55:37 -0000 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hi Jiaxin, We are still having our QA to finally verify the patches (including the ICMP error listener bug fix), so I will post the formal patch after regression test completes. Regards, Gary (Heyi Guo) On Fri, Dec 08, 2017 at 10:04:20AM +0800, Guo Heyi wrote: > On Fri, Dec 08, 2017 at 12:39:30AM +0000, Wu, Jiaxin wrote: > > Hi Gary, > > > > Agree to generate a formal patch. You can attach the reviewed-by tag at the same time. > > > > Can you help to file one Bugzilla for this issue? > > No Problem. > > > > > BTW, Do you need us commit the patch or by yourself? > > Yes, for I can't commit by myself :) > > Thanks and regards, > > Gary (Heyi Guo) > > > > > Thanks, > > Jiaxin > > > > > -----Original Message----- > > > From: Heyi Guo [mailto:heyi.guo@linaro.org] > > > Sent: Thursday, December 7, 2017 8:23 PM > > > To: Wu, Jiaxin ; linaro-uefi@lists.linaro.org; edk2- > > > devel@lists.01.org; Fu, Siyuan > > > Cc: Junbiao Hong ; Zeng, Star > > > ; Dong, Eric ; Ni, Ruiyu > > > > > > Subject: Re: [RFC] MdeModulePkg/Ip4Dxe: fix ICMP echo reply memory leak > > > > > > Hi Siyuan and Jiaxin, > > > > > > Thanks for your review; shall I generate a formal patch and post it > > > again, as well as making some commit message refinement? > > > > > > Regards, > > > > > > > > > Gary (Heyi Guo) > > > > > > > > > 在 12/7/2017 3:01 PM, Wu, Jiaxin 写道: > > > > It's is good to me. > > > > > > > > Reviewed-by: Jiaxin Wu > > > > > > > > Thanks, > > > > Jiaxin > > > > > > > > > > > >> -----Original Message----- > > > >> From: Heyi Guo [mailto:heyi.guo@linaro.org] > > > >> Sent: Thursday, December 7, 2017 10:22 AM > > > >> To: linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org > > > >> Cc: Heyi Guo ; Junbiao Hong > > > >> ; Zeng, Star ; Dong, > > > Eric > > > >> ; Ni, Ruiyu ; Fu, Siyuan > > > >> ; Wu, Jiaxin > > > >> Subject: [RFC] MdeModulePkg/Ip4Dxe: fix ICMP echo reply memory leak > > > >> > > > >> When UEFI receives IPMP 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. > > > >> > > > >> Network stack code is so complicated that this is just a RFC to fix > > > >> this issue. Please provide your comments about this. > > > >> > > > >> Contributed-under: TianoCore Contribution Agreement 1.1 > > > >> Signed-off-by: Junbiao Hong > > > >> Signed-off-by: Heyi Guo > > > >> Cc: Star Zeng > > > >> Cc: Eric Dong > > > >> Cc: Ruiyu Ni > > > >> Cc: Siyuan Fu > > > >> Cc: Jiaxin Wu > > > >> --- > > > >> MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.c | 3 +++ > > > >> 1 file changed, 3 insertions(+) > > > >> > > > >> diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.c > > > >> b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.c > > > >> index b4b0864..ed6bdbe 100644 > > > >> --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.c > > > >> +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.c > > > >> @@ -267,6 +267,9 @@ Ip4IcmpReplyEcho ( > > > >> Ip4SysPacketSent, > > > >> NULL > > > >> ); > > > >> + if (EFI_ERROR (Status)) { > > > >> + NetbufFree (Data); > > > >> + } > > > >> > > > >> ON_EXIT: > > > >> NetbufFree (Packet); > > > >> -- > > > >> 2.7.4 > >