net_sched: cls_route: remove the right filter from hashtable
route4_change() allocates a new filter and copies values from
the old one. After the new filter is inserted into the hash
table, the old filter should be removed and freed, as the final
step of the update.
However, the current code mistakenly removes the new one. This
looks apparently wrong to me, and it causes double "free" and
use-after-free too, as reported by syzbot.
Fixes: 1109c00547fc ("net: sched: RCU cls_route")
Cc: Jamal Hadi Salim <firstname.lastname@example.org>
Cc: Jiri Pirko <email@example.com>
Cc: John Fastabend <firstname.lastname@example.org>
Signed-off-by: Cong Wang <email@example.com>
Signed-off-by: David S. Miller <firstname.lastname@example.org>
1 file changed