Skip to content

Commit 2f43b9b

Browse files
Dan Carpenterdavem330
authored andcommitted
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: c19b6d2 ('drivers/net: support hdlc function for QE-UCC') Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7a7d1d5 commit 2f43b9b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/net/wan/fsl_ucc_hdlc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,9 +635,8 @@ static int uhdlc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
635635
ifr->ifr_settings.size = size; /* data size wanted */
636636
return -ENOBUFS;
637637
}
638+
memset(&line, 0, sizeof(line));
638639
line.clock_type = priv->clocking;
639-
line.clock_rate = 0;
640-
line.loopback = 0;
641640

642641
if (copy_to_user(ifr->ifr_settings.ifs_ifsu.sync, &line, size))
643642
return -EFAULT;

0 commit comments

Comments
 (0)