]> git.ipfire.org Git - thirdparty/linux.git/commit
netfilter: nft_synproxy: stop bypassing the priv->info snapshot
authorRunyu Xiao <runyu.xiao@seu.edu.cn>
Thu, 11 Jun 2026 04:21:20 +0000 (12:21 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 23 Jun 2026 06:11:22 +0000 (08:11 +0200)
commit11d4bc4e26fb66040a5b5d95e9abf37deac2b1fc
tree6bd5a8bcfc744770877120d55c3ea79f934eb07d
parent22f9dbed18bcc865d750ed109c6ae2dd4cf2af55
netfilter: nft_synproxy: stop bypassing the priv->info snapshot

nft_synproxy_eval_v4() and nft_synproxy_eval_v6() already take a
whole-object READ_ONCE() snapshot of the shared priv->info state before
building the SYNACK reply, but nft_synproxy_tcp_options() still masks
opts->options with priv->info.options from the live shared object.

When a named synproxy object is updated concurrently with SYN traffic,
the eval path can then mix mss and timestamp handling from the local
snapshot with an options mask taken from a newer configuration, so one
SYNACK no longer reflects a coherent synproxy configuration.

Use info->options so nft_synproxy_tcp_options() stays on the same local
snapshot that the eval path already copied from priv->info.

Fixes: ee394f96ad75 ("netfilter: nft_synproxy: add synproxy stateful object support")
Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
Reviewed-by: Fernando Fernandez Mancera <fmancera@suse.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_synproxy.c