提交 986d7584 编写于 作者: D Dan Carpenter 提交者: Greg Kroah-Hartman

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 69c1440e
...@@ -3149,6 +3149,7 @@ static int slic_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -3149,6 +3149,7 @@ static int slic_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
return -EFAULT; return -EFAULT;
if (ecmd.cmd == ETHTOOL_GSET) { if (ecmd.cmd == ETHTOOL_GSET) {
memset(&edata, 0, sizeof(edata));
edata.supported = (SUPPORTED_10baseT_Half | edata.supported = (SUPPORTED_10baseT_Half |
SUPPORTED_10baseT_Full | SUPPORTED_10baseT_Full |
SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Half |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册