diff options
author | David S. Miller <davem@davemloft.net> | 2013-07-30 11:16:21 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-07-30 11:16:21 +0400 |
commit | a0db856a95a29efb1c23db55c02d9f0ff4f0db48 (patch) | |
tree | ebd37821f7a9ea080e0319b7e30df3098e67e851 /net/sched/sch_cbq.c | |
parent | 7e44892c1b6bb499cb2f6d5c0f4afcc077a26074 (diff) | |
download | linux-a0db856a95a29efb1c23db55c02d9f0ff4f0db48.tar.xz |
net_sched: Fix stack info leak in cbq_dump_wrr().
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>
Diffstat (limited to 'net/sched/sch_cbq.c')
-rw-r--r-- | net/sched/sch_cbq.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c index 71a568862557..7a42c81a19eb 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c @@ -1465,6 +1465,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; |