lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aL9FQ47keDNxygQw@calendula>
Date: Mon, 8 Sep 2025 23:06:11 +0200
From: Pablo Neira Ayuso <pablo@...filter.org>
To: Eric Woudstra <ericwouds@...il.com>
Cc: Jozsef Kadlecsik <kadlec@...filter.org>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Simon Horman <horms@...nel.org>,
	Nikolay Aleksandrov <razor@...ckwall.org>,
	netfilter-devel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH v3 nf-next 3/3] netfilter: nf_flow_table_ip: don't follow
 fastpath when marked teardown

On Tue, Jun 17, 2025 at 09:00:07AM +0200, Eric Woudstra wrote:
> When a flow is marked for teardown, because the destination is not valid
> any more, the software fastpath may still be in effect and traffic is
> still send to the wrong destination. Change the ip/ipv6 hooks to not use
> the software fastpath for a flow that is marked to be teared down and let
> the packet continue along the normal path.
> 
> Signed-off-by: Eric Woudstra <ericwouds@...il.com>
> ---
>  net/netfilter/nf_flow_table_ip.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/net/netfilter/nf_flow_table_ip.c b/net/netfilter/nf_flow_table_ip.c
> index 64a12b9668e7..f9bf2b466ca8 100644
> --- a/net/netfilter/nf_flow_table_ip.c
> +++ b/net/netfilter/nf_flow_table_ip.c
> @@ -542,6 +542,9 @@ nf_flow_offload_ip_hook(void *priv, struct sk_buff *skb,
>  	dir = tuplehash->tuple.dir;
>  	flow = container_of(tuplehash, struct flow_offload, tuplehash[dir]);
>  
> +	if (test_bit(NF_FLOW_TEARDOWN, &flow->flags))
> +		return NF_ACCEPT;

nf_flow_offload_lookup() already checks for this bit, I don't a
benefit from this re-check.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ