]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
tc: Fix unitialized kernel memory leak
authorEric Dumazet <eric.dumazet@gmail.com>
Wed, 2 Sep 2009 02:40:09 +0000 (02:40 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Sep 2009 05:55:17 +0000 (22:55 -0700)
Three bytes of uninitialized kernel memory are currently leaked to user

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_api.c

index 24d17ce9c294f384f1a638b7888540455479f3aa..fdb694e9f75938bafad249723c9318b2e4750c3f 100644 (file)
@@ -1456,6 +1456,8 @@ static int tc_fill_tclass(struct sk_buff *skb, struct Qdisc *q,
        nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags);
        tcm = NLMSG_DATA(nlh);
        tcm->tcm_family = AF_UNSPEC;
+       tcm->tcm__pad1 = 0;
+       tcm->tcm__pad2 = 0;
        tcm->tcm_ifindex = qdisc_dev(q)->ifindex;
        tcm->tcm_parent = q->handle;
        tcm->tcm_handle = q->handle;