]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net/sched: act_ct: fix err check for nf_conntrack_confirm
authorwenxu <wenxu@ucloud.cn>
Fri, 2 Jul 2021 03:34:31 +0000 (11:34 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Jul 2021 12:35:14 +0000 (14:35 +0200)
commit 8955b90c3cdad199137809aac8ccbbb585355913 upstream.

The confirm operation should be checked. If there are any failed,
the packet should be dropped like in ovs and netfilter.

Fixes: b57dc7c13ea9 ("net/sched: Introduce action ct")
Signed-off-by: wenxu <wenxu@ucloud.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sched/act_ct.c

index 16c4cbf6d1f0a6151190236064b4fe75c311b71b..02d4491991b5e37e006514f79fc636b0ab8c322d 100644 (file)
@@ -474,7 +474,8 @@ static int tcf_ct_act(struct sk_buff *skb, const struct tc_action *a,
                /* This will take care of sending queued events
                 * even if the connection is already confirmed.
                 */
-               nf_conntrack_confirm(skb);
+               if (nf_conntrack_confirm(skb) != NF_ACCEPT)
+                       goto drop;
        }
 
 out_push: