nft_flow_offload_eval() makes flow_offload session but it doesn't check tcp state. So, it can make un-ESTABLISHED tcp flow offload session such as SYN-RECV. But, this is not a normal case. Fixes: a3c90f7a2323 ("netfilter: nf_tables: flow offload expression") Signed-off-by: Taehee Yoo <ap420073@xxxxxxxxx> --- net/netfilter/nft_flow_offload.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/netfilter/nft_flow_offload.c b/net/netfilter/nft_flow_offload.c index ff50bc1b144f..8538ddf9c6bf 100644 --- a/net/netfilter/nft_flow_offload.c +++ b/net/netfilter/nft_flow_offload.c @@ -84,6 +84,9 @@ static void nft_flow_offload_eval(const struct nft_expr *expr, switch (ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum) { case IPPROTO_TCP: + if (ct->proto.tcp.state != TCP_CONNTRACK_ESTABLISHED) + goto out; + break; case IPPROTO_UDP: break; default: -- 2.17.1