]> git.kernelconcepts.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:47:30 +0000 (10:47 -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 caf6e4d194696204fa41632e220369a2ca2876a7..a08c8994c89d9975257f3658d3376b54cd222334 100644 (file)
@@ -4164,6 +4164,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 */