DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Medvedkin, Vladimir" <vladimir.medvedkin@intel.com>
To: David Marchand <david.marchand@redhat.com>,
	Owen Hilyard <ohilyard@iol.unh.edu>
Cc: dev <dev@dpdk.org>, Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: [dpdk-dev] [PATCH v3] lib/rte_rib6: fix stack buffer overflow
Date: Tue, 22 Jun 2021 13:51:30 +0300	[thread overview]
Message-ID: <e026c1ed-2045-13ab-d94d-afa005f0c11f@intel.com> (raw)
In-Reply-To: <CAJFAV8ycf651T_AV3BjQ2BOWGHa77hbo2-ENof+gwpymeHEfQw@mail.gmail.com>

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 <ohilyard@iol.unh.edu> wrote:
>>
>> From: Owen Hilyard <ohilyard@iol.unh.edu>
> 
> 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 <ohilyard@iol.unh.edu>
> 
> 
> Vladimir, can you review this fix?
> 
> Thanks!
> 

Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>

-- 
Regards,
Vladimir

  reply	other threads:[~2021-06-22 10:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-16 16:07 [dpdk-dev] [PATCH] " ohilyard
2021-06-16 16:56 ` Stephen Hemminger
2021-06-16 17:27   ` Medvedkin, Vladimir
2021-06-16 18:18 ` [dpdk-dev] [PATCH v2] " ohilyard
2021-06-18 16:22   ` Medvedkin, Vladimir
2021-06-18 16:27     ` Medvedkin, Vladimir
2021-06-21 13:28   ` [dpdk-dev] [PATCH v3] " ohilyard
2021-06-22  7:10     ` David Marchand
2021-06-22 10:51       ` Medvedkin, Vladimir [this message]
2021-06-23 15:17     ` [dpdk-dev] [PATCH v4] rib: fix max depth IPv6 lookup ohilyard
2021-06-24 13:23       ` David Marchand
2021-06-24  9:01     ` [dpdk-dev] [PATCH v3] lib/rte_rib6: fix stack buffer overflow Medvedkin, Vladimir

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e026c1ed-2045-13ab-d94d-afa005f0c11f@intel.com \
    --to=vladimir.medvedkin@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ohilyard@iol.unh.edu \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).