diff options
author | Roman Mashak <mrv@mojatatu.com> | 2018-05-11 20:35:33 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-11 22:37:03 +0200 |
commit | a52956dfc503f8cc5cfe6454959b7049fddb4413 (patch) | |
tree | f00a5558d6d47ff70b07ac0ce7c772ec11f9edb8 /include/net | |
parent | net: sched: fix error path in tcf_proto_create() when modules are not configured (diff) | |
download | linux-a52956dfc503f8cc5cfe6454959b7049fddb4413.tar.xz linux-a52956dfc503f8cc5cfe6454959b7049fddb4413.zip |
net sched actions: fix refcnt leak in skbmod
When application fails to pass flags in netlink TLV when replacing
existing skbmod action, the kernel will leak refcnt:
$ tc actions get action skbmod index 1
total acts 0
action order 0: skbmod pipe set smac 00:11:22:33:44:55
index 1 ref 1 bind 0
For example, at this point a buggy application replaces the action with
index 1 with new smac 00:aa:22:33:44:55, it fails because of zero flags,
however refcnt gets bumped:
$ tc actions get actions skbmod index 1
total acts 0
action order 0: skbmod pipe set smac 00:11:22:33:44:55
index 1 ref 2 bind 0
$
Tha patch fixes this by calling tcf_idr_release() on existing actions.
Fixes: 86da71b57383d ("net_sched: Introduce skbmod action")
Signed-off-by: Roman Mashak <mrv@mojatatu.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
0 files changed, 0 insertions, 0 deletions