pcmcia: synclink_cs: fix information leak to userland
authorVasiliy Kulikov <segooon@gmail.com>
Sun, 17 Oct 2010 14:41:24 +0000 (18:41 +0400)
committerDominik Brodowski <linux@dominikbrodowski.net>
Thu, 21 Oct 2010 15:29:23 +0000 (17:29 +0200)
Structure new_line is copied to userland with some padding fields unitialized.
It leads to leaking of stack memory.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
CC: stable@kernel.org
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
drivers/char/pcmcia/synclink_cs.c

index d97a53cccdc5227f0ebcd94e0628866744ee0d5c..be18100576075a7b476c5be534640349679ff280 100644 (file)
@@ -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 */