lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 19 Feb 2014 08:43:29 -0800 From: Eric Dumazet <eric.dumazet@...il.com> To: Nicolas Dichtel <nicolas.dichtel@...nd.com> Cc: davem@...emloft.net, netdev@...r.kernel.org, Tom Herbert <therbert@...gle.com> Subject: Re: [PATCH net] sit: fix panic with route cache in ip tunnels On Wed, 2014-02-19 at 17:15 +0100, Nicolas Dichtel wrote: > Bug introduced by commit 7d442fab0a67 ("ipv4: Cache dst in tunnels"). > > Because sit code does not call ip_tunnel_init(), the dst_cache was not > initialized. > > CC: Tom Herbert <therbert@...gle.com> > Signed-off-by: Nicolas Dichtel <nicolas.dichtel@...nd.com> > --- > net/ipv6/sit.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c > index 3dfbcf1dcb1c..5ff33d9bd5de 100644 > --- a/net/ipv6/sit.c > +++ b/net/ipv6/sit.c > @@ -1326,6 +1326,9 @@ static const struct net_device_ops ipip6_netdev_ops = { > > static void ipip6_dev_free(struct net_device *dev) > { > + struct ip_tunnel *tunnel = netdev_priv(dev); > + > + free_percpu(tunnel->dst_cache); > free_percpu(dev->tstats); > free_netdev(dev); > } > @@ -1375,6 +1378,12 @@ static int ipip6_tunnel_init(struct net_device *dev) > u64_stats_init(&ipip6_tunnel_stats->syncp); > } > > + tunnel->dst_cache = alloc_percpu(struct ip_tunnel_dst); > + if (!tunnel->dst_cache) { > + free_percpu(dev->tstats); > + return -ENOMEM; > + } > + > return 0; > } > I do not think this patch is complete. It seems to lack a tunnel_dst_reset_all() or something to properly release the dst. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists