public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 6/8] char: synclink: fix information leak to userland
@ 2010-10-17 14:41 Vasiliy Kulikov
  2010-10-17 15:34 ` Jiri Slaby
  0 siblings, 1 reply; 7+ messages in thread
From: Vasiliy Kulikov @ 2010-10-17 14:41 UTC (permalink / raw)
  To: kernel-janitors
  Cc: Greg Kroah-Hartman, Alan Cox, Jiri Slaby, Arnd Bergmann,
	linux-kernel

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>
---
 Compile tested.

 drivers/char/synclink.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c
index 3a6824f..abd0867 100644
--- a/drivers/char/synclink.c
+++ b/drivers/char/synclink.c
@@ -7846,6 +7846,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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-10-17 17:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-17 14:41 [PATCH 6/8] char: synclink: fix information leak to userland Vasiliy Kulikov
2010-10-17 15:34 ` Jiri Slaby
2010-10-17 15:38   ` Vasiliy Kulikov
2010-10-17 17:36     ` Dan Carpenter
2010-10-17 17:50       ` Vasiliy Kulikov
2010-10-17 17:46     ` Jiri Slaby
2010-10-17 17:55       ` Vasiliy Kulikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox