aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSalva Peiró <speiro@ai2.upv.es>2013-12-17 10:06:30 +0100
committerStefan Bader <stefan.bader@canonical.com>2014-05-20 16:35:07 +0200
commit1a73745c33a1a3e52bc299301f86c11483c9e6b3 (patch)
treee26b69ff9f46779145cec3ce07daa70ad8d8b870
parent58a1a81d023dc80ccf0917934f9d5321c0e56f97 (diff)
downloadlinux-2.6.32.y-drm33.z-1a73745c33a1a3e52bc299301f86c11483c9e6b3.tar.gz
hamradio/yam: fix info leak in ioctl
[ Upstream commit 8e3fbf870481eb53b2d3a322d1fc395ad8b367ed ] The yam_ioctl() code fails to initialise the cmd field of the struct yamdrv_ioctl_cfg. Add an explicit memset(0) before filling the structure to avoid the 4-byte info leak. Signed-off-by: Salva Peiró <speiro@ai2.upv.es> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
-rw-r--r--drivers/net/hamradio/yam.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index 694132e04af697..1a1002d069b9d4 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -1060,6 +1060,7 @@ static int yam_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
break;
case SIOCYAMGCFG:
+ memset(&yi, 0, sizeof(yi));
yi.cfg.mask = 0xffffffff;
yi.cfg.iobase = yp->iobase;
yi.cfg.irq = yp->irq;