Skip to content

Commit

Permalink
net_sched: Fix stack info leak in cbq_dump_wrr().
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
davem330 committed Jul 30, 2013
1 parent 7e44892 commit a0db856
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/sched/sch_cbq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a0db856

Please sign in to comment.