mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Eric Dumazet <edumazet@google.com>,
	Tim Gardner <tim.gardner@canonical.com>
Cc: netdev <netdev@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	David Ahern <dsahern@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH linux-next] ipv4: Fix NULL deference in fnhe_remove_oldest()
Date: Thu, 2 Sep 2021 09:41:35 -0700	[thread overview]
Message-ID: <9a1962e2-fa9f-f423-c16d-8ba529a931eb@gmail.com> (raw)
In-Reply-To: <CANn89i+ey++b=dBXUZjXYyVessr49yZJBagVJxP-mpcreYyjCA@mail.gmail.com>

On 9/2/21 9:38 AM, Eric Dumazet wrote:
> On Thu, Sep 2, 2021 at 9:32 AM Tim Gardner <tim.gardner@canonical.com> wrote:
>>
>> Coverity complains that linux-next commit 67d6d681e15b5 ("ipv4: make
>> exception cache less predictible") neglected to check for NULL before
>> dereferencing 'oldest'. It appears to be possible to fall through the for
>> loop without ever setting 'oldest'.
> 
> Coverity is wrong.
> 
>  fnhe_remove_oldest() is only called when there are at least 6 items
> in the list.
> 
> There is no way oldest could be NULL, or that oldest_p could contain garbage.
> 

+1

      reply	other threads:[~2021-09-02 16:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-02 16:32 Tim Gardner
2021-09-02 16:38 ` Eric Dumazet
2021-09-02 16:41   ` David Ahern [this message]

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=9a1962e2-fa9f-f423-c16d-8ba529a931eb@gmail.com \
    --to=dsahern@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tim.gardner@canonical.com \
    --cc=yoshfuji@linux-ipv6.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

all inboxes | Powered by JetHome®