mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 15:10:38 +00:00
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: b57dc7c13ea9 ("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>
This commit is contained in:
parent
ab921f3cdb
commit
eda814b97d
@ -704,7 +704,7 @@ static int tcf_ct_handle_fragments(struct net *net, struct sk_buff *skb,
|
||||
err = ip_defrag(net, skb, user);
|
||||
local_bh_enable();
|
||||
if (err && err != -EINPROGRESS)
|
||||
goto out_free;
|
||||
return err;
|
||||
|
||||
if (!err) {
|
||||
*defrag = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user