aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-07-30 00:16:21 -0700
committerKamal Mostafa <kamal@canonical.com>2013-08-21 10:58:37 -0700
commite9890f1bce588406c7ab3229cb7c90d43c104cab (patch)
tree8f6a15b38fab41d395da47d70a7516ff4dd695b7
parentc8a6520bfa38306f2df0f80e57ab4d689b9eed1b (diff)
net_sched: Fix stack info leak in cbq_dump_wrr().
[ Upstream commit a0db856a95a29efb1c23db55c02d9f0ff4f0db48 ] 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: Kamal Mostafa <kamal@canonical.com>
-rw-r--r--net/sched/sch_cbq.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index ced81a1583e2..27cedc1f3b14 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -1468,6 +1468,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;