Patchwork [45/75] net_sched: Fix stack info leak in cbq_dump_wrr().

login
register
mail settings
Submitter Luis Henriques
Date Aug. 14, 2013, 10:36 a.m.
Message ID <1376476624-10011-46-git-send-email-luis.henriques@canonical.com>
Download mbox | patch
Permalink /patch/267051/
State New
Headers show

Comments

Luis Henriques - Aug. 14, 2013, 10:36 a.m.
3.5.7.19 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: "David S. Miller" <davem@davemloft.net>

commit a0db856a95a29efb1c23db55c02d9f0ff4f0db48 upstream.

Make sure the reserved fields, and padding (if any), are
fully initialized.

Based upon a patch by Dan Carpenter and feedback from
Joe Perches.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 net/sched/sch_cbq.c | 1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index 611d5e9..823f07f 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -1469,6 +1469,7 @@  static int cbq_dump_wrr(struct sk_buff *skb, struct cbq_class *cl)
 	unsigned char *b = skb_tail_pointer(skb);
 	struct tc_cbq_wrropt opt;
 
+	memset(&opt, 0, sizeof(opt));
 	opt.flags = 0;
 	opt.allot = cl->allot;
 	opt.priority = cl->priority + 1;