summaryrefslogtreecommitdiffstats
path: root/net/psample
diff options
context:
space:
mode:
authorRoman Kapl <code@rkapl.cz>2017-11-20 22:21:13 +0100
committerDavid S. Miller <davem@davemloft.net>2017-11-24 01:25:37 +0900
commitd7aa04a5e82b4f254d306926c81eae8df69e5200 (patch)
tree58ef4949cc32041b00d14eeaa0aef4587331a45e /net/psample
parent0cc03504c9f1b9c9da819094db37507c69ee9145 (diff)
downloadlinux-stable-d7aa04a5e82b4f254d306926c81eae8df69e5200.tar.gz
linux-stable-d7aa04a5e82b4f254d306926c81eae8df69e5200.tar.bz2
linux-stable-d7aa04a5e82b4f254d306926c81eae8df69e5200.zip
net: sched: fix crash when deleting secondary chains
If you flush (delete) a filter chain other than chain 0 (such as when deleting the device), the kernel may run into a use-after-free. The chain refcount must not be decremented unless we are sure we are done with the chain. To reproduce the bug, run: ip link add dtest type dummy tc qdisc add dev dtest ingress tc filter add dev dtest chain 1 parent ffff: flower ip link del dtest Introduced in: commit f93e1cdcf42c ("net/sched: fix filter flushing"), but unless you have KAsan or luck, you won't notice it until commit 0dadc117ac8b ("cls_flower: use tcf_exts_get_net() before call_rcu()") Fixes: f93e1cdcf42c ("net/sched: fix filter flushing") Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Roman Kapl <code@rkapl.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/psample')
0 files changed, 0 insertions, 0 deletions