From: Jiri Benc <jbenc@redhat.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH net] vxlan: fix oops in dev_fill_metadata_dst
Date: Fri, 17 Feb 2017 19:42:10 +0100 [thread overview]
Message-ID: <20170217194210.77d16cbf@griffin> (raw)
In-Reply-To: <8682ee54bd3198c8ce7be1249c829741987c7b11.1487354433.git.pabeni@redhat.com>
On Fri, 17 Feb 2017 19:14:27 +0100, Paolo Abeni wrote:
> Since the commit 0c1d70af924b ("net: use dst_cache for vxlan device")
> vxlan_fill_metadata_dst() calls vxlan_get_route() passing a NULL
> dst_cache pointer, so the latter should explicitly check for
> valid dst_cache ptr. Unfortunately the commit d71785ffc7e7 ("net: add
> dst_cache to ovs vxlan lwtunnel") removed said check.
>
> As a result is possible to trigger a null pointer access calling
> vxlan_fill_metadata_dst(), e.g. with:
>
> ovs-vsctl add-br ovs-br0
> ovs-vsctl add-port ovs-br0 vxlan0 -- set interface vxlan0 \
> type=vxlan options:remote_ip=192.168.1.1 \
> options:key=1234 options:dst_port=4789 ofport_request=10
> ip address add dev ovs-br0 172.16.1.2/24
> ovs-vsctl set Bridge ovs-br0 ipfix=@i -- --id=@i create IPFIX \
> targets=\"172.16.1.1:1234\" sampling=1
> iperf -c 172.16.1.1 -u -l 1000 -b 10M -t 1 -p 1234
>
> This commit addresses the issue passing to vxlan_get_route() the
> dst_cache already available into the lwt info processed by
> vxlan_fill_metadata_dst().
>
> Fixes: d71785ffc7e7 ("net: add dst_cache to ovs vxlan lwtunnel")
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Jiri Benc <jbenc@redhat.com>
next prev parent reply other threads:[~2017-02-17 18:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-17 18:14 [PATCH net] vxlan: fix oops in dev_fill_metadata_dst Paolo Abeni
2017-02-17 18:42 ` Jiri Benc [this message]
2017-02-17 20:33 ` David Miller
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=20170217194210.77d16cbf@griffin \
--to=jbenc@redhat.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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