From 986d75843555d0f6bc4acd11276c7f8f77d246b8 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 4 Apr 2013 09:29:42 +0300 Subject: [PATCH] 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. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- drivers/staging/slicoss/slicoss.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index c8375a26816b..e4b82770ed39 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -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 | -- 2.30.2