From: Dan Carpenter <dan.carpenter@oracle.com>
To: Kevin Curtis <kevin.curtis@farsite.co.uk>
Cc: "Salva Peiró" <speiro@ai2.upv.es>,
security@kernel.org, netdev@vger.kernel.org
Subject: [patch] farsync: fix info leak in ioctl
Date: Fri, 11 Oct 2013 12:50:03 +0300 [thread overview]
Message-ID: <20131011095003.GD6247@mwanda> (raw)
In-Reply-To: <5257BFBA.7030405@ai2.upv.es>
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
next parent reply other threads:[~2013-10-11 9:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5257BFBA.7030405@ai2.upv.es>
2013-10-11 9:50 ` Dan Carpenter [this message]
2013-10-11 21:55 ` [patch] farsync: fix info leak in ioctl David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131011095003.GD6247@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kevin.curtis@farsite.co.uk \
--cc=netdev@vger.kernel.org \
--cc=security@kernel.org \
--cc=speiro@ai2.upv.es \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.