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 B27CBA0C41; Tue, 22 Jun 2021 09:10:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 35FF64003F; Tue, 22 Jun 2021 09:10:52 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 6ECC14003C for ; Tue, 22 Jun 2021 09:10:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624345850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CvujORnuxuzDBR8I/KiuTsiQWkTYl7eBdJSn9anIRhw=; b=Hvx/jt+ItkVpNJT612dDJcZ+AxYc8TynsIjjmjm2aj2Kgmjm536ql4iV00pqrZRbpvLv+Y ACojl2uxBv2ZzlR+fSzeoPIDOW+TUA1xEZKwM1aYXauQkraTWidIFlU6StkrBm3cUoIRP2 lZUA1kM0gVeu1+zLlvT1yFmmQH0S3No= Received: from mail-ua1-f71.google.com (mail-ua1-f71.google.com [209.85.222.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-190-uqO4Rg7HOZCsLdbuIRPEVw-1; Tue, 22 Jun 2021 03:10:49 -0400 X-MC-Unique: uqO4Rg7HOZCsLdbuIRPEVw-1 Received: by mail-ua1-f71.google.com with SMTP id 6-20020a9f24060000b029027872bb5b5dso6073148uaq.1 for ; Tue, 22 Jun 2021 00:10:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CvujORnuxuzDBR8I/KiuTsiQWkTYl7eBdJSn9anIRhw=; b=ZPCIWWnHJQeUwCaF/opa6nQVvK9kE3t9m07Z5a9jABJuz7x1cimxleP+PbrlV7UTJ0 vXpDLfBfvC5eejyyYiXUvc5mQoez7qTmYrCt7IC1pYIjFeATzFz58uRuCEJ2DSNyHI3T QJyup9HvZ30FeVWudpmoDoe8Z/N/47NG4UYoKGmAHyXSI/RP1RAVafSkGrPF4lAkON9z hXo5MmZxfr+TRv8HHANfuNyP9JbQD8ZVqm6uFRa5SO0XxOSYN85NcC+I/9Ms+B0+yXhy CveM1OzitwYymN2Xsva1/oLGm6qxJdR9dyy2ywIYcv9GbszGDhfmrGblA6TuLUlxzsrq jVdQ== X-Gm-Message-State: AOAM533Q6S1nIzc3FXHM4CfCSxzY3GffobLkQLIVcz0/+pZAFE3SEblb ry8IG1T3/ZAVOzHJHhRKDopmpPwoTjYhDF2I32s7LytEYe5GBLuA8hHXhHNmtKkQ1qDupc9n2qd HTlyHyNtYtNMVPWgmAbo= X-Received: by 2002:a67:c513:: with SMTP id e19mr17742544vsk.18.1624345848556; Tue, 22 Jun 2021 00:10:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyoSndZNyv8ZKylwDqrYpAXRa3tuoaI2eshQf7L/LYBTLEe+ZoqSbvFSVyltEX53D21gzSqM8remBQ1IcEWKCk= X-Received: by 2002:a67:c513:: with SMTP id e19mr17742532vsk.18.1624345848275; Tue, 22 Jun 2021 00:10:48 -0700 (PDT) MIME-Version: 1.0 References: <20210616181833.356159-1-ohilyard@iol.unh.edu> <20210621132834.21673-1-ohilyard@iol.unh.edu> In-Reply-To: <20210621132834.21673-1-ohilyard@iol.unh.edu> From: David Marchand Date: Tue, 22 Jun 2021 09:10:37 +0200 Message-ID: To: Owen Hilyard , Vladimir Medvedkin Cc: dev , Stephen Hemminger Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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" 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! -- David Marchand