[PATCH 22/22] pcmcia: synclink_cs: fix information leak to userland
Dominik Brodowski
linux at dominikbrodowski.net
Thu Oct 21 11:35:38 EDT 2010
From: Vasiliy Kulikov <segooon at gmail.com>
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 at gmail.com>
CC: stable at kernel.org
Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
---
drivers/char/pcmcia/synclink_cs.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index d97a53c..be18100 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 */
--
1.7.0.4
More information about the linux-pcmcia
mailing list