提交 a0db856a 编写于 作者: D David S. Miller

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: NDavid S. Miller <davem@davemloft.net>
上级 7e44892c
...@@ -1465,6 +1465,7 @@ static int cbq_dump_wrr(struct sk_buff *skb, struct cbq_class *cl) ...@@ -1465,6 +1465,7 @@ static int cbq_dump_wrr(struct sk_buff *skb, struct cbq_class *cl)
unsigned char *b = skb_tail_pointer(skb); unsigned char *b = skb_tail_pointer(skb);
struct tc_cbq_wrropt opt; struct tc_cbq_wrropt opt;
memset(&opt, 0, sizeof(opt));
opt.flags = 0; opt.flags = 0;
opt.allot = cl->allot; opt.allot = cl->allot;
opt.priority = cl->priority + 1; opt.priority = cl->priority + 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册