]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
pcmcia: synclink_cs: fix information leak to userland
authorVasiliy Kulikov <segooon@gmail.com>
Sun, 17 Oct 2010 14:41:24 +0000 (18:41 +0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 22 Nov 2010 18:59:43 +0000 (10:59 -0800)
commit 5b917a1420d3d1a9c8da49fb0090692dc9aaee86 upstream.

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>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/char/pcmcia/synclink_cs.c

index 308903ec8bf8464187e22ba14cc39ffe988dc4d0..824d67c982f080f44438b1a5c984dc9f75f18b4c 100644 (file)
@@ -4132,6 +4132,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 */