Commit dd0938fa authored by David S. Miller's avatar David S. Miller Committed by Willy Tarreau

net_sched: Fix stack info leak in cbq_dump_wrr().

[ Upstream commit a0db856a ]

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: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
parent e409e24a
...@@ -1458,6 +1458,7 @@ static __inline__ int cbq_dump_wrr(struct sk_buff *skb, struct cbq_class *cl) ...@@ -1458,6 +1458,7 @@ static __inline__ 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment