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 E7B24A0C52 for ; Mon, 25 Oct 2021 19:11:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D5FAF41166; Mon, 25 Oct 2021 19:11:01 +0200 (CEST) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by mails.dpdk.org (Postfix) with ESMTP id 83B6440E32; Mon, 25 Oct 2021 19:11:00 +0200 (CEST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 261175C0256; Mon, 25 Oct 2021 13:11:00 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 25 Oct 2021 13:11:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= XO1hB7xsWXrvDkcM4rpnJ53fqiqZDb/j7yjdEqBfifs=; b=J8fdVJtHEOsNJo4a FJp68CMfDg/5JkvBeg69StdflMcN6PmHwRRwXPVJx6V56u8XFTmmSbfA7FhnuuqT c7rKqBk4/5DGLeiYTXF2vJubtu8ZakcG625mq3ubyYXBkXvPLgc7eJhpKww/cFaa ZJZi5YXDM4uZTTtByyzcD5Oosk+J6UvfC+O29afcYJ9zCemNkbP70HBrUr0J4vJr nSRJu/O6BTYd8Nl77RMexiPPKGPTqbBetT6DMIuhSjdaOKLqkDVvIEGzwWvIcGnm AtKWcCGzBLQXQoMwapmtWe/NhBM+9zKdlufxrxLawQWXhJBjuw0kyMgmY+DMyo0Y ajKUNw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=XO1hB7xsWXrvDkcM4rpnJ53fqiqZDb/j7yjdEqBfi fs=; b=mqgCZbu5Mi+ZpD7zZ7AIqebRwMOXimHdez0aoPOqURp1aqACD1e99N2+Q x1fHmWhDY78WpH9Z3/rTn+7gzE0P4dSsyG/LDZDqfOzqgtLvsFoWPEt9d8Dlm7hZ GRPtA1/1+gWNuLbExax+jsajquwciE0JNZudg8d3lIPg8TQx3JGtpemntw+q5VU+ AQhvXbq8gzoZ/dxQ+YxHmoBQyu4RpxsiYCKfL0qy4MsjIfNC+mGDL8sK7SzqbdUw H6witV3LKCdun0sqOQ4v6Po44P1zoXzMEuZmzguqgMIkCwv4xDkInAJPp4qkIFTL BRV+SCJcfCf125qyeo59KSW04MqJw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdefhedguddtiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeffvdffjeeuteelfeeileduudeugfetjeelveefkeejfeeigeeh teffvdekfeegudenucffohhmrghinhepughpughkrdhorhhgnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 25 Oct 2021 13:10:58 -0400 (EDT) From: Thomas Monjalon To: Vladimir Medvedkin Cc: stable@dpdk.org, dev@dpdk.org, david.marchand@redhat.com, alex@therouter.net, Bruce Richardson Date: Mon, 25 Oct 2021 19:10:57 +0200 Message-ID: <5470916.cgazLUTxmr@thomas> In-Reply-To: References: <1633728537-197824-1-git-send-email-vladimir.medvedkin@intel.com> <1634836549-10800-1-git-send-email-vladimir.medvedkin@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-stable] [PATCH v2] lpm: fix buffer overflow X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 22/10/2021 11:07, Bruce Richardson: > On Thu, Oct 21, 2021 at 06:15:49PM +0100, Vladimir Medvedkin wrote: > > This patch fixes buffer overflow reported by ASAN, > > please reference https://bugs.dpdk.org/show_bug.cgi?id=819 > > > > The rte_lpm6 keeps routing information for control plane purpose > > inside the rte_hash table which uses rte_jhash() as a hash function. > > From the rte_jhash() documentation: If input key is not aligned to > > four byte boundaries or a multiple of four bytes in length, > > the memory region just after may be read (but not used in the > > computation). > > rte_lpm6 uses 17 bytes keys consisting of IPv6 address (16 bytes) + > > depth (1 byte). > > > > This patch increases the size of the depth field up to uint32_t > > and sets the alignment to 4 bytes. > > > > Bugzilla ID: 819 > > Fixes: 86b3b21952a8 ("lpm6: store rules in hash table") > > Cc: alex@therouter.net > > Cc: stable@dpdk.org > > > > Signed-off-by: Vladimir Medvedkin > > Acked-by: Bruce Richardson Applied, thanks.