netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] farsync: fix info leak in ioctl
       [not found] <5257BFBA.7030405@ai2.upv.es>
@ 2013-10-11  9:50 ` Dan Carpenter
  2013-10-11 21:55   ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-10-11  9:50 UTC (permalink / raw)
  To: Kevin Curtis; +Cc: Salva Peiró, security, netdev

From: Salva Peiró <speiro@ai2.upv.es>

The fst_get_iface() code fails to initialize the two padding bytes of
struct sync_serial_settings after the ->loopback member. Add an explicit
memset(0) before filling the structure to avoid the info leak.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

---
 linux-3.4-xm/drivers/net/wan/farsync.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/linux-3.4-xm/drivers/net/wan/farsync.c b/linux-3.4-xm/drivers/net/wan/farsync.c
index 1a62318..3710427 100644
--- a/drivers/net/wan/farsync.c
+++ b/drivers/net/wan/farsync.c
@@ -1972,6 +1972,7 @@ fst_get_iface(struct fst_card_info *card, struct fst_port_info *port,
 	}
 
 	i = port->index;
+	memset(&sync, 0, sizeof(sync));
 	sync.clock_rate = FST_RDL(card, portConfig[i].lineSpeed);
 	/* Lucky card and linux use same encoding here */
 	sync.clock_type = FST_RDB(card, portConfig[i].internalClock) ==
-- 
1.7.10.4

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

* Re: [patch] farsync: fix info leak in ioctl
  2013-10-11  9:50 ` [patch] farsync: fix info leak in ioctl Dan Carpenter
@ 2013-10-11 21:55   ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-10-11 21:55 UTC (permalink / raw)
  To: dan.carpenter; +Cc: kevin.curtis, speiro, security, netdev

From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Fri, 11 Oct 2013 12:50:03 +0300

> From: Salva Peiró <speiro@ai2.upv.es>
> 
> The fst_get_iface() code fails to initialize the two padding bytes of
> struct sync_serial_settings after the ->loopback member. Add an explicit
> memset(0) before filling the structure to avoid the info leak.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied and queued up for -stable.

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

end of thread, other threads:[~2013-10-11 21:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <5257BFBA.7030405@ai2.upv.es>
2013-10-11  9:50 ` [patch] farsync: fix info leak in ioctl Dan Carpenter
2013-10-11 21:55   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).