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 <email@example.com>
Cc: Jiri Pirko <firstname.lastname@example.org>
Cc: John Fastabend <email@example.com>
Signed-off-by: Cong Wang <firstname.lastname@example.org>
Signed-off-by: David S. Miller <email@example.com>
1 file changed