From: David S. Miller Date: Tue, 30 Jul 2013 07:16:21 +0000 (-0700) Subject: net_sched: Fix stack info leak in cbq_dump_wrr(). X-Git-Tag: firefly_0821_release~6453^2~1142 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7515b17b548cfc509ccbe3fcf8d9f004356d1845;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c index 1bc210ffcba2..8ec15988b5f3 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;