Merge branch 'net-sched-bind-logic-fixes-for-cls_fw-cls_u32-and-cls_route'
authorJakub Kicinski <kuba@kernel.org>
Tue, 1 Aug 2023 03:10:39 +0000 (20:10 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 1 Aug 2023 03:10:39 +0000 (20:10 -0700)
commitc5ccff70501d92db445a135fa49cf9bc6b98c444
treef4c5c3a4d75bf88d1e78c5aad27c156498b680a8
parent611e1b016c7beceec5ae82ac62d4a7ca224c8f9d
parentb80b829e9e2c1b3f7aae34855e04d8f6ecaf13c8
Merge branch 'net-sched-bind-logic-fixes-for-cls_fw-cls_u32-and-cls_route'

valis says:

====================
net/sched Bind logic fixes for cls_fw, cls_u32 and cls_route

Three classifiers (cls_fw, cls_u32 and cls_route) always copy
tcf_result struct into the new instance of the filter on update.

This causes a problem when updating a filter bound to a class,
as tcf_unbind_filter() is always called on the old instance in the
success path, decreasing filter_cnt of the still referenced class
and allowing it to be deleted, leading to a use-after-free.

This patch set fixes this issue in all affected classifiers by no longer
copying the tcf_result struct from the old filter.
====================

Link: https://lore.kernel.org/r/20230729123202.72406-1-jhs@mojatatu.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>