From: Vasiliy Kulikov Date: Sun, 17 Oct 2010 14:41:24 +0000 (+0400) Subject: pcmcia: synclink_cs: fix information leak to userland X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5b917a1420d3d1a9c8da49fb0090692dc9aaee86;p=openwrt%2Fstaging%2Fblogic.git pcmcia: synclink_cs: fix information leak to userland Structure new_line is copied to userland with some padding fields unitialized. It leads to leaking of stack memory. Signed-off-by: Vasiliy Kulikov CC: stable@kernel.org Signed-off-by: Dominik Brodowski --- diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index d97a53cccdc5..be1810057607 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c @@ -4097,6 +4097,8 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) if (cmd != SIOCWANDEV) return hdlc_ioctl(dev, ifr, cmd); + memset(&new_line, 0, size); + switch(ifr->ifr_settings.type) { case IF_GET_IFACE: /* return current sync_serial_settings */