]> git.baikalelectronics.ru Git - kernel.git/commit
net/sched: act_ct: Fix skb double-free in tcf_ct_handle_fragments() error flow
authorAlaa Hleihel <alaa@mellanox.com>
Wed, 19 Aug 2020 15:24:10 +0000 (18:24 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Aug 2020 23:39:31 +0000 (16:39 -0700)
commit9eaa2fded476b58f35d107049ebdd58c868ae0fd
treecaac1541309a67e607993592661a6ee2838ea7d5
parent280524cb9b8872ff61e6e8b41839e045638307bc
net/sched: act_ct: Fix skb double-free in tcf_ct_handle_fragments() error flow

tcf_ct_handle_fragments() shouldn't free the skb when ip_defrag() call
fails. Otherwise, we will cause a double-free bug.
In such cases, just return the error to the caller.

Fixes: 1a23a38cf53c ("net/sched: Introduce action ct")
Signed-off-by: Alaa Hleihel <alaa@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_ct.c