Skip to contentSkip to conversation

gre: information leak in ip6_tnl_ioctl()

PATCH Applied Dan Carpenter 2 participants 2 messages Aug 16, 2012 – Aug 20, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gre: information leak in ip6_tnl_ioctl()

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".

---
This is only needed in linux-next.

net/ipv6/ip6_tunnel.c +2 -0
index 33d2a0e..cb7e2de 100644
@@ -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);
maintainer Applied
#1 lore raw

From: Dan Carpenter <[email protected]>
Date: Thu, 16 Aug 2012 16:14:04 +0300

Quoted 5 lines

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".

Applied, thanks Dan.