diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-07-14 14:16:53 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-15 21:42:42 +0300 |
commit | 2f43b9beeac8e063353452b4bcf8712f6c2de27b (patch) | |
tree | 030f28bc0e9df28c274bb788461811a66b43eb3a /drivers/net/wan | |
parent | 7a7d1d57330c06f7d4f0b10d22fe124b4422ff1a (diff) | |
download | linux-2f43b9beeac8e063353452b4bcf8712f6c2de27b.tar.xz |
wan/fsl_ucc_hdlc: info leak in uhdlc_ioctl()
There is a 2 byte struct whole after line.loopback so we need to clear
that out to avoid disclosing stack information.
Fixes: c19b6d246a35 ('drivers/net: support hdlc function for QE-UCC')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r-- | drivers/net/wan/fsl_ucc_hdlc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c index 19174ac1e338..6edd48afc248 100644 --- a/drivers/net/wan/fsl_ucc_hdlc.c +++ b/drivers/net/wan/fsl_ucc_hdlc.c @@ -635,9 +635,8 @@ static int uhdlc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) ifr->ifr_settings.size = size; /* data size wanted */ return -ENOBUFS; } + memset(&line, 0, sizeof(line)); line.clock_type = priv->clocking; - line.clock_rate = 0; - line.loopback = 0; if (copy_to_user(ifr->ifr_settings.ifs_ifsu.sync, &line, size)) return -EFAULT; |