Re: vxlan: use after free error

2017-05-30 Thread Jiri Benc
On Tue, 30 May 2017 13:47:55 +0200, Jiri Benc wrote: > On Mon, 29 May 2017 11:37:22 -0700, Roopa Prabhu wrote: > > This code is also hit via the OVS path, and i don't see a problem with > > your changes and analysis but i am not too familiar with the ovs call > > path. I see that the relevant devel

Re: vxlan: use after free error

2017-05-30 Thread Jiri Benc
On Mon, 29 May 2017 11:37:22 -0700, Roopa Prabhu wrote: > What you say looks correct..., but does not hurt to leave this check in > there.. > given rest of the changes you are proposing below. I agree with Mark that the check is superfluous and should not be there. > Looking at git blame, this c

Re: vxlan: use after free error

2017-05-30 Thread Jiri Benc
On Mon, 29 May 2017 11:37:22 -0700, Roopa Prabhu wrote: > This code is also hit via the OVS path, and i don't see a problem with > your changes and analysis but i am not too familiar with the ovs call > path. I see that the relevant developers are CC'ed. I don't see a problem with ovs and this pat

Re: vxlan: use after free error

2017-05-29 Thread Roopa Prabhu
On Sun, May 28, 2017 at 11:28 PM, Mark Bloch wrote: > Hi Roopa, > > On 29/05/2017 05:50, Roopa Prabhu wrote: >> On Sun, May 28, 2017 at 3:49 AM, Mark Bloch wrote: [snip] >> >> From: Balakrishnan Raman >> >> Date: Sun, 28 May 2017 19:34:25 -0700 >> >> Subject: [PATCH net-next] vxlan: remove vxl

Re: vxlan: use after free error

2017-05-29 Thread Stephen Hemminger
On Mon, 29 May 2017 09:28:52 +0300 Mark Bloch wrote: > In my patch I've added the code inside vxlan_sock_release() > after we do: > rcu_assign_pointer(vxlan->vn6_sock, NULL); > rcu_assign_pointer(vxlan->vn4_sock, NULL); Use RCU_INIT_POINTER when assigning NULL. A barrier is not n

Re: vxlan: use after free error

2017-05-28 Thread Mark Bloch
Hi Roopa, On 29/05/2017 05:50, Roopa Prabhu wrote: > On Sun, May 28, 2017 at 3:49 AM, Mark Bloch wrote: >> Hi, >> >> I'm getting a KASAN (use after free) error when doing: >> >> ip link add vxlan1 type vxlan external >> ip link set vxlan1 up >> ip link set vxlan1 down >> ip link del vxlan1 >> >>

Re: vxlan: use after free error

2017-05-28 Thread Roopa Prabhu
On Sun, May 28, 2017 at 3:49 AM, Mark Bloch wrote: > Hi, > > I'm getting a KASAN (use after free) error when doing: > > ip link add vxlan1 type vxlan external > ip link set vxlan1 up > ip link set vxlan1 down > ip link del vxlan1 > > [ 600.495331] > ==

vxlan: use after free error

2017-05-28 Thread Mark Bloch
Hi, I'm getting a KASAN (use after free) error when doing: ip link add vxlan1 type vxlan external ip link set vxlan1 up ip link set vxlan1 down ip link del vxlan1 [ 600.495331] == [ 600.509678] BUG: KASAN: use-after-free in vxlan