]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.10.18/farsync-fix-info-leak-in-ioctl.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.10.18 / farsync-fix-info-leak-in-ioctl.patch
CommitLineData
7f7c74eb
GKH
1From 530fd8e305b59abdb5f2a04069a28d11506ded22 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Salva=20Peir=C3=B3?= <speiro@ai2.upv.es>
3Date: Fri, 11 Oct 2013 12:50:03 +0300
4Subject: farsync: fix info leak in ioctl
5
6From: =?UTF-8?q?Salva=20Peir=C3=B3?= <speiro@ai2.upv.es>
7
8[ Upstream commit 96b340406724d87e4621284ebac5e059d67b2194 ]
9
10The fst_get_iface() code fails to initialize the two padding bytes of
11struct sync_serial_settings after the ->loopback member. Add an explicit
12memset(0) before filling the structure to avoid the info leak.
13
14Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
15Signed-off-by: David S. Miller <davem@davemloft.net>
16Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17---
18 drivers/net/wan/farsync.c | 1 +
19 1 file changed, 1 insertion(+)
20
21--- a/drivers/net/wan/farsync.c
22+++ b/drivers/net/wan/farsync.c
23@@ -1972,6 +1972,7 @@ fst_get_iface(struct fst_card_info *card
24 }
25
26 i = port->index;
27+ memset(&sync, 0, sizeof(sync));
28 sync.clock_rate = FST_RDL(card, portConfig[i].lineSpeed);
29 /* Lucky card and linux use same encoding here */
30 sync.clock_type = FST_RDB(card, portConfig[i].internalClock) ==