From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2DABEA00BE; Mon, 14 Mar 2022 23:16:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A53D5410E7; Mon, 14 Mar 2022 23:16:26 +0100 (CET) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mails.dpdk.org (Postfix) with ESMTP id 7651C40E2D for ; Mon, 14 Mar 2022 23:16:25 +0100 (CET) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id F014D5C00CB; Mon, 14 Mar 2022 18:16:23 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 14 Mar 2022 18:16:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; bh=jn7h0IiPvkPgrh AEUMZnx6ZpQ+ED/iQ1hA0HDtP8mD8=; b=Ou5kTyIPoKHdOuz2jeITHWSCeK7lmy IB9rf/RIfezWpkFK8GOtM4e3X4RZIzoCgntMdEvc817TUoq0BSReX19reoGdQXzY Op/zYvz/j/FjXBg0egzZ02wbaAMsTrP4IVzjanUFeI4f8GmmCxAFaMTLVkuB2EXN TUyG/W+5wPLOLKvluvAZY6FeBgTNkwtzyKJ/aMMRT0Qg9VDpKR74u+s1iScVc725 qGrwXsDGTsWl3frZLDkCkr4ZCgg7ZVC3c0umsEm70uZGB/aAWsF8Z80PxH5Dv6Wo PKmpfWsJG1GSdcADMUIMGNl/IGJ+DkGLpWBsSxrLIg+0C3MAjaB6FaCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=jn7h0IiPvkPgrhAEUMZnx6ZpQ+ED/iQ1hA0HDtP8m D8=; b=QZ3l30F8x47w1NMTBLCcIeOZ7qFlurn7RfX8tPD0o7CLvka8S+Rqm8/NL 82tXnSk0oHqzSN/mzDVTPadpkmAI7XEseafo6ABlC5tnKyyka2Nc0VlTnk+g7qmk EUkz0DTBcXof9FJUSrx/WkE5CaWiKIRi4UNkF39ENwYku92A//CPm8eSD/auYaBY EqwVA161TdpOJL8qpcDDZZ72OFv+LjjhxJmBjO/XzCs4bGgn3fsCG+x7Oj9aPsPc QeT0fwbXKvjQ1VpwSdxpwclW/IDoTqbB52OrLkdTP9+4+4HNNBps+ugrC3isnr31 p3FH1IrRgQLX/sWqAlSmS8E7NRAyA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddruddvkedgudehiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej ueeiiedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 14 Mar 2022 18:16:22 -0400 (EDT) From: Thomas Monjalon To: Rahul Bhansali Cc: "dev@dpdk.org" , "Walsh, Conor" , "david.marchand@redhat.com" , "Ananyev, Konstantin" Subject: Re: [PATCH] examples/l3fwd: resolve stack buffer overflow issue Date: Mon, 14 Mar 2022 23:16:20 +0100 Message-ID: <2548073.k3LOHGUjKi@thomas> In-Reply-To: References: <20220111125005.554635-1-rbhansali@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > > This patch fixes the stack buffer overflow error reported > > from AddressSanitizer. > > Function send_packetsx4() tries to access out of bound data > > from rte_mbuf and fill it into TX buffer even in the case > > where no pending packets (len = 0). > > Performance impact:- No > > > > ASAN error report:- > > ==819==ERROR: AddressSanitizer: stack-buffer-overflow on address > > 0xffffe2c0dcf0 at pc 0x0000005e791c bp 0xffffe2c0d7e0 sp 0xffffe2c0d800 > > READ of size 8 at 0xffffe2c0dcf0 thread T0 > > #0 0x5e7918 in send_packetsx4 ../examples/l3fwd/l3fwd_common.h:251 > > #1 0x5e7918 in send_packets_multi ../examples/l3fwd/l3fwd_neon.h:226 > > > > Signed-off-by: Rahul Bhansali > Reviewed-by: Conor Walsh > Acked-by: Konstantin Ananyev Applied, thanks.