[patch] gre: information leak in ip6_tnl_ioctl()

Subsystems: networking [general], networking [ipv4/ipv6], the rest

STALE5128d

2 messages, 2 authors, 2012-08-20 · open the first message on its own page

[patch] gre: information leak in ip6_tnl_ioctl()

From: Dan Carpenter <hidden>
Date: 2012-08-16 13:15:04

There is a one byte hole between p->hop_limit and p->flowinfo where
stack memory is leaked to the user.  This was introduced in c12b395a46
"gre: Support GRE over IPv6".

Signed-off-by: Dan Carpenter <redacted>
---
This is only needed in linux-next.
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 33d2a0e..cb7e2de 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -1312,6 +1312,8 @@ ip6_tnl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 			}
 			ip6_tnl_parm_from_user(&p1, &p);
 			t = ip6_tnl_locate(net, &p1, 0);
+		} else {
+			memset(&p, 0, sizeof(p));
 		}
 		if (t == NULL)
 			t = netdev_priv(dev);

Re: [patch] gre: information leak in ip6_tnl_ioctl()

From: David Miller <davem@davemloft.net>
Date: 2012-08-20 09:21:46

From: Dan Carpenter <redacted>
Date: Thu, 16 Aug 2012 16:14:04 +0300
There is a one byte hole between p->hop_limit and p->flowinfo where
stack memory is leaked to the user.  This was introduced in c12b395a46
"gre: Support GRE over IPv6".

Signed-off-by: Dan Carpenter <redacted>
Applied, thanks Dan.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help