]> git.kernelconcepts.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 Apr 2010 22:52:24 +0000 (15:52 -0700)
commit 16ebb5e0b36ceadc8186f71d68b0c4fa4b6e781b upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/sched/sch_api.c

index 1122c952aa99bd17f78f3de3d6c6d6600c3d81b5..2b801a09f19c3d2cb32b45648028850963f6dc88 100644 (file)
@@ -1453,6 +1453,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;