]> git.baikalelectronics.ru Git - kernel.git/commit
net_sched: fix a use-after-free in tc_ctl_tfilter()
authorWANG Cong <xiyou.wangcong@gmail.com>
Tue, 5 May 2015 22:22:02 +0000 (15:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 9 May 2015 20:14:04 +0000 (16:14 -0400)
commit133bd642e28d806326153d3875c5e1d97f137dbc
tree86814b3ab96984332dc666650a574e835008516c
parent240a15676cc8b3a8b20ee7129f7222bb79468fae
net_sched: fix a use-after-free in tc_ctl_tfilter()

When tcf_destroy() returns true, tp could be already destroyed,
we should not use tp->next after that.

For long term, we probably should move tp list to list_head.

Fixes: 0e569919ba4e ("net_sched: destroy proto tp when all filters are gone")
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_api.c