Skip to content
Commit a53cb29b authored by Mark Bloch's avatar Mark Bloch Committed by David S. Miller
Browse files

vxlan: fix use-after-free on deletion



Adding a vxlan interface to a socket isn't symmetrical, while adding
is done in vxlan_open() the deletion is done in vxlan_dellink().
This can cause a use-after-free error when we close the vxlan
interface before deleting it.

We add vxlan_vs_del_dev() to match vxlan_vs_add_dev() and call
it from vxlan_stop() to match the call from vxlan_open().

Fixes: 56ef9c90 ("vxlan: Move socket initialization to within rtnl scope")
Acked-by: default avatarJiri Benc <jbenc@redhat.com>
Tested-by: default avatarRoi Dayan <roid@mellanox.com>
Signed-off-by: default avatarMark Bloch <markb@mellanox.com>
Acked-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 78b07ac1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment