Skip to contentSkip to conversation

staging: slicoss: information leak in ETHTOOL_GSET

PATCH New Dan Carpenter 1 participant 1 message Apr 4, 2013

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

PATCH 1/1 staging: slicoss: information leak in ETHTOOL_GSET

There are some fields in "edata" which have not been cleared. One example is edata.cmd. It leaks uninitialized stack information to the user.

drivers/staging/slicoss/slicoss.c +1 -0
index c8375a2..e4b8277 100644
@@ -3149,6 +3149,7 @@ static int slic_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 			return -EFAULT;
 
 		if (ecmd.cmd = ETHTOOL_GSET) {
+			memset(&edata, 0, sizeof(edata));
 			edata.supported = (SUPPORTED_10baseT_Half |
 					   SUPPORTED_10baseT_Full |
 					   SUPPORTED_100baseT_Half |