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 90A01A0547; Tue, 22 Jun 2021 12:51:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0DABE4003F; Tue, 22 Jun 2021 12:51:43 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 406934003C for ; Tue, 22 Jun 2021 12:51:40 +0200 (CEST) IronPort-SDR: IZYY8OcAvwXUwr+e0zCX+D8MZ3jXHegd0E2M27VRFObjbqcjqZuPwkSSOv7CaDAgphNzBmSz7r S0kRVHh83tsg== X-IronPort-AV: E=McAfee;i="6200,9189,10022"; a="186719083" X-IronPort-AV: E=Sophos;i="5.83,291,1616482800"; d="scan'208";a="186719083" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2021 03:51:35 -0700 IronPort-SDR: 8GxpWhnmTty1ZkAuUi0ZzvY//8IUpCFQDBy1hTtLCr0r37XhX1nMlI8hp9SjSJnHv9It36V4fa 2Bw+d4iYJv9Q== X-IronPort-AV: E=Sophos;i="5.83,291,1616482800"; d="scan'208";a="556577348" Received: from vmedvedk-mobl.ger.corp.intel.com (HELO [10.252.16.184]) ([10.252.16.184]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2021 03:51:33 -0700 To: David Marchand , Owen Hilyard Cc: dev , Stephen Hemminger References: <20210616181833.356159-1-ohilyard@iol.unh.edu> <20210621132834.21673-1-ohilyard@iol.unh.edu> From: "Medvedkin, Vladimir" Message-ID: Date: Tue, 22 Jun 2021 13:51:30 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3] lib/rte_rib6: fix stack buffer overflow 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 Sender: "dev" Hi Owen, David, Apart from David's comments looks good to me. On 22/06/2021 10:10, David Marchand wrote: > On Mon, Jun 21, 2021 at 3:28 PM wrote: >> >> From: Owen Hilyard > > Hi Owen, Vladimir, > > > Owen, two comments on the patch title. > > - We (try to) never prefix with lib/, as it gives no additional info. > The prefix should be the library name. > There were some transgressions to this rule, but this was Thomas or me > being absent minded. > > For other parts of the tree, it is a bit more complex, but if unsure, > the simplest is to look at the git history. > Here this is the rib library, so "rib: " is enough. > > > - The title purpose is to give a hint of the functional impact: people > looking for fixes for a type of bug can find it more easily. > > Here, just indicating we are fixing a buffer overflow won't help judge > in which usecase the issue happenned. > How about: "rib: fix max depth IPv6 lookup" > > >> >> ASAN found a stack buffer overflow in lib/rib/rte_rib6.c:get_dir. >> The fix for the stack buffer overflow was to make sure depth >> was always < 128, since when depth = 128 it caused the index >> into the ip address to be 16, which read off the end of the array. >> >> While trying to solve the buffer overflow, I noticed that a few >> changes could be made to remove the for loop entirely. >> >> Fixes: f7e861e21c ("rib: support IPv6") > Cc: stable@dpdk.org > >> >> Signed-off-by: Owen Hilyard > > > Vladimir, can you review this fix? > > Thanks! > Acked-by: Vladimir Medvedkin -- Regards, Vladimir