From: Nicolas Dichtel Date: Thu, 14 Nov 2013 14:47:03 +0000 (+0100) Subject: ip6tnl: fix use after free of fb_tnl_dev X-Git-Tag: v3.13-rc1~33^2~33 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e9f3d6f1c403dd2b6270f654b4747147aa2306f;p=pandora-kernel.git ip6tnl: fix use after free of fb_tnl_dev Bug has been introduced by commit bb8140947a24 ("ip6tnl: allow to use rtnl ops on fb tunnel"). When ip6_tunnel.ko is unloaded, FB device is delete by rtnl_link_unregister() and then we try to use the pointer in ip6_tnl_destroy_tunnels(). Let's add an handler for dellink, which will never remove the FB tunnel. With this patch it will no more be possible to remove it via 'ip link del ip6tnl0', but it's safer. The same fix was already proposed by Willem de Bruijn for sit interfaces. CC: Willem de Bruijn Reported-by: Steven Rostedt Signed-off-by: Nicolas Dichtel Acked-by: Willem de Bruijn Signed-off-by: David S. Miller --- Reading git-diff-tree failed