aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorVasiliy Kulikov <segooon@gmail.com>2010-10-27 18:34:22 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-27 21:03:14 -0400
commited77ed6112f2d4b650f4be7dbaf14e06e1d393a5 (patch)
tree506f67a21101c4b26007057b2d83e245ff61fd46 /drivers/char
parentb9b1134260e036fb75c468514569864dd6722f3e (diff)
drivers/char/synclink_gt.c: fix information leak to userland
Structures tmp_params and new_line are copied to userland with some padding fields unitialized. It leads to leaking of stack memory. Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Acked-by: Paul Fulghum <paulkf@microgate.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/synclink_gt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c
index 11999784383e..9f7fc71474b4 100644
--- a/drivers/char/synclink_gt.c
+++ b/drivers/char/synclink_gt.c
@@ -1132,6 +1132,7 @@ static long get_params32(struct slgt_info *info, struct MGSL_PARAMS32 __user *us
1132 struct MGSL_PARAMS32 tmp_params; 1132 struct MGSL_PARAMS32 tmp_params;
1133 1133
1134 DBGINFO(("%s get_params32\n", info->device_name)); 1134 DBGINFO(("%s get_params32\n", info->device_name));
1135 memset(&tmp_params, 0, sizeof(tmp_params));
1135 tmp_params.mode = (compat_ulong_t)info->params.mode; 1136 tmp_params.mode = (compat_ulong_t)info->params.mode;
1136 tmp_params.loopback = info->params.loopback; 1137 tmp_params.loopback = info->params.loopback;
1137 tmp_params.flags = info->params.flags; 1138 tmp_params.flags = info->params.flags;
@@ -1617,6 +1618,8 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
1617 if (cmd != SIOCWANDEV) 1618 if (cmd != SIOCWANDEV)
1618 return hdlc_ioctl(dev, ifr, cmd); 1619 return hdlc_ioctl(dev, ifr, cmd);
1619 1620
1621 memset(&new_line, 0, sizeof(new_line));
1622
1620 switch(ifr->ifr_settings.type) { 1623 switch(ifr->ifr_settings.type) {
1621 case IF_GET_IFACE: /* return current sync_serial_settings */ 1624 case IF_GET_IFACE: /* return current sync_serial_settings */
1622 1625