net_sched: Fix stack info leak in cbq_dump_wrr().
authorDavid S. Miller <davem@davemloft.net>
Tue, 30 Jul 2013 07:16:21 +0000 (00:16 -0700)
committerWilly Tarreau <w@1wt.eu>
Mon, 19 May 2014 05:53:49 +0000 (07:53 +0200)
[ 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 <davem@davemloft.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
net/sched/sch_cbq.c

index 5b132c473264eb4b428607f524c87d17032b149c..8b6f05d2f3ce4f7a45e2a4ebb01d0dfb59b9efdc 100644 (file)
@@ -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);
        struct tc_cbq_wrropt opt;
 
+       memset(&opt, 0, sizeof(opt));
        opt.flags = 0;
        opt.allot = cl->allot;
        opt.priority = cl->priority+1;