]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
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)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Jul 2013 07:16:21 +0000 (00:16 -0700)
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>
net/sched/sch_cbq.c

index 71a568862557c26cb9fd97bfbd26531b55ad4283..7a42c81a19ebe55f0b6a137f89c55b46314f8cd7 100644 (file)
@@ -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;