2c53eea
Bugzilla: 1053647
2c53eea
Upstream-status: 3.13 and 3.12.8
2c53eea
2c53eea
From foo@baz Mon Jan 13 09:44:41 PST 2014
2c53eea
From: =?UTF-8?q?Salva=20Peir=C3=B3?= <speiro@ai2.upv.es>
2c53eea
Date: Tue, 17 Dec 2013 10:06:30 +0100
2c53eea
Subject: hamradio/yam: fix info leak in ioctl
2c53eea
MIME-Version: 1.0
2c53eea
Content-Type: text/plain; charset=UTF-8
2c53eea
Content-Transfer-Encoding: 8bit
2c53eea
2c53eea
From: Salva Peiró <speiro@ai2.upv.es>
2c53eea
2c53eea
[ Upstream commit 8e3fbf870481eb53b2d3a322d1fc395ad8b367ed ]
2c53eea
2c53eea
The yam_ioctl() code fails to initialise the cmd field
2c53eea
of the struct yamdrv_ioctl_cfg. Add an explicit memset(0)
2c53eea
before filling the structure to avoid the 4-byte info leak.
2c53eea
2c53eea
Signed-off-by: Salva Peiró <speiro@ai2.upv.es>
2c53eea
Signed-off-by: David S. Miller <davem@davemloft.net>
2c53eea
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2c53eea
---
2c53eea
 drivers/net/hamradio/yam.c |    1 +
2c53eea
 1 file changed, 1 insertion(+)
2c53eea
2c53eea
--- a/drivers/net/hamradio/yam.c
2c53eea
+++ b/drivers/net/hamradio/yam.c
2c53eea
@@ -1057,6 +1057,7 @@ static int yam_ioctl(struct net_device *
2c53eea
 		break;
2c53eea
 
2c53eea
 	case SIOCYAMGCFG:
2c53eea
+		memset(&yi, 0, sizeof(yi));
2c53eea
 		yi.cfg.mask = 0xffffffff;
2c53eea
 		yi.cfg.iobase = yp->iobase;
2c53eea
 		yi.cfg.irq = yp->irq;