netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Suryaputra <ssuryaextr@gmail.com>
To: David Ahern <dsahern@gmail.com>
Cc: Florian Westphal <fw@strlen.de>,
	Andrea Mayer <andrea.mayer@uniroma2.it>,
	Andrea Righi <andrea.righi@canonical.com>,
	"David S. Miller" <davem@davemloft.net>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	David Ahern <dsahern@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ahmed Abdelsalam <ahabdels@gmail.com>,
	Paolo Lungaroni <paolo.lungaroni@uniroma2.it>,
	Stefano Salsano <stefano.salsano@uniroma2.it>
Subject: Re: [PATCH] ipv6: fix NULL pointer dereference in ip6_output()
Date: Wed, 8 Dec 2021 11:34:14 -0500	[thread overview]
Message-ID: <20211208163414.GA747@ICIPI.localdomain> (raw)
In-Reply-To: <d6cacd7d-732c-4fad-576d-a7e9d9ca9537@gmail.com>

On Wed, Dec 08, 2021 at 08:46:37AM -0700, David Ahern wrote:
> On 12/8/21 3:51 AM, Florian Westphal wrote:
> > David Ahern <dsahern@gmail.com> wrote:
> >> On 12/7/21 5:21 PM, Andrea Mayer wrote:
> >>> +        IP6CB(skb)->iif = skb->skb_iif;
> >>>          [...]
> >>>
> >>> What do you think?
> >>>
> >>
> >> I like that approach over the need for a fall back in core ipv6 code.
> > 
> > What if the device is removed after ->iif assignment and before dev lookup?
> > 
> 
> good point. SR6 should make sure the iif is not cleared, and the
> fallback to the skb->dev is still needed in case of delete.

Thanks for the explanation. I was thinking that ->iif can safely be
assumed to be valid. Florian's point that device can be removed is a
good one. My bad for not putting the check and thanks for fixing.

      reply	other threads:[~2021-12-08 16:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-06 16:34 [PATCH] ipv6: fix NULL pointer dereference in ip6_output() Andrea Righi
2021-12-07 15:51 ` David Ahern
2021-12-08  0:21   ` Andrea Mayer
2021-12-08  0:50     ` David Ahern
2021-12-08 10:51       ` Florian Westphal
2021-12-08 15:46         ` David Ahern
2021-12-08 16:34           ` Stephen Suryaputra [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=20211208163414.GA747@ICIPI.localdomain \
    --to=ssuryaextr@gmail.com \
    --cc=ahabdels@gmail.com \
    --cc=andrea.mayer@uniroma2.it \
    --cc=andrea.righi@canonical.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=dsahern@kernel.org \
    --cc=fw@strlen.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=paolo.lungaroni@uniroma2.it \
    --cc=stefano.salsano@uniroma2.it \
    --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;
as well as URLs for NNTP newsgroup(s).