Skip to contentSkip to conversation

char: pcmcia: synclink_cs: fix information leak to userland

PATCH In review Vasiliy Kulikov 1 participant 1 message Oct 17, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 4/8 char: pcmcia: synclink_cs: fix information leak to userland

Structure new_line is copied to userland with some padding fields unitialized. It leads to leaking of stack memory.

---
Compile tested.

 drivers/char/pcmcia/synclink_cs.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/char/pcmcia/synclink_cs.c +2 -0
index db9efbe..bfc10f8 100644
@@ -4091,6 +4091,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 */
 
Signature · 1 line
1.7.0.4