Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dan Carpenter and committed by
David S. Miller
2f43b9be 7a7d1d57

+1 -2
+1 -2
drivers/net/wan/fsl_ucc_hdlc.c
··· 635 635 ifr->ifr_settings.size = size; /* data size wanted */ 636 636 return -ENOBUFS; 637 637 } 638 + memset(&line, 0, sizeof(line)); 638 639 line.clock_type = priv->clocking; 639 - line.clock_rate = 0; 640 - line.loopback = 0; 641 640 642 641 if (copy_to_user(ifr->ifr_settings.ifs_ifsu.sync, &line, size)) 643 642 return -EFAULT;