]> git.hungrycats.org Git - linux/commit
TC: oops in em_meta
authorStephen Hemminger <shemminger@vyatta.com>
Fri, 15 Feb 2008 09:37:49 +0000 (01:37 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 26 Feb 2008 00:18:34 +0000 (16:18 -0800)
commit79a25f70244c66402c99d9b32d19204dfded85d0
treec4e2cbdb40e3b3eba760a354f0481511d8ed5444
parent5531e217653acba748a687e949e9e2f39462c969
TC: oops in em_meta

Upstream commit: 04f217aca4d803fe72c2c54fe460d68f5233ce52

If userspace passes a unknown match index into em_meta, then
em_meta_change will return an error and the data for the match will
not be set. This then causes an null pointer dereference when the
cleanup is done in the error path via tcf_em_tree_destroy. Since the
tree structure comes kzalloc, it is initialized to NULL.

Discovered when testing a new version of tc command against an
accidental older kernel.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/sched/em_meta.c