mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Lebrun <dav.lebrun@gmail.com>
To: Ahmed Abdelsalam <amsalam20@gmail.com>,
	davem@davemloft.net, dlebrun@google.com, kuznet@ms2.inr.ac.ru,
	yoshfuji@linux-ipv6.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [net] ipv6: sr: fix NULL pointer dereference in seg6_do_srh_encap()- v4 pkts
Date: Fri, 20 Apr 2018 15:38:08 +0100	[thread overview]
Message-ID: <3627f25a-0c47-6428-aa76-5baf96993a4c@gmail.com> (raw)
In-Reply-To: <1524232685-1203-1-git-send-email-amsalam20@gmail.com>

On 04/20/2018 02:58 PM, Ahmed Abdelsalam wrote:
> In case of seg6 in encap mode, seg6_do_srh_encap() calls set_tun_src()
> in order to set the src addr of outer IPv6 header.
> 
> The net_device is required for set_tun_src(). However calling ip6_dst_idev()
> on dst_entry in case of IPv4 traffic results on the following bug.
> 
> Using just dst->dev should fix this BUG.
> 

Good catch, thanks for spotting this. If you actually tested your fix 
with IPv4 and IPv6 traffic, you should mention it in the commit message. 
Your current formulation suggests that you just guessed a fix without 
testing.

> 
> Fixes: 8936ef7604c11 ipv6: sr: fix NULL pointer dereference when setting encap source address
> Signed-off-by: Ahmed Abdelsalam<amsalam20@gmail.com>

Acked-by: David Lebrun <dlebrun@google.com>

  reply	other threads:[~2018-04-20 14:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-20 13:58 Ahmed Abdelsalam
2018-04-20 14:38 ` David Lebrun [this message]
2018-04-20 14:46   ` Ahmed Abdelsalam
2018-04-23  1:06 ` David Miller
2018-04-23  6:09   ` Ahmed Abdelsalam

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=3627f25a-0c47-6428-aa76-5baf96993a4c@gmail.com \
    --to=dav.lebrun@gmail.com \
    --cc=amsalam20@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dlebrun@google.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --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®