From: Julian Anastasov <ja@ssi.bg>
To: Kyle Zeng <kylebot@openai.com>
Cc: netdev@vger.kernel.org, Simon Horman <horms@verge.net.au>,
Pablo Neira Ayuso <pablo@netfilter.org>,
Florian Westphal <fw@strlen.de>, Phil Sutter <phil@nwl.cc>,
"David S. Miller" <davem@davemloft.net>,
linux-kernel <linux-kernel@vger.kernel.org>,
lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] ipvs: fix reversed sequence option serialization
Date: Tue, 11 Aug 2026 20:12:37 +0300 (EEST) [thread overview]
Message-ID: <3fcb66ae-b20f-b97e-5f85-e91ab4a4792c@ssi.bg> (raw)
In-Reply-To: <20260810221347.34267-1-kylebot@openai.com>
Hello,
On Mon, 10 Aug 2026, Kyle Zeng wrote:
> hton_seq() expects the host-order source first and the unaligned
> network-order destination second. The version 1 sync sender passes these
> arguments in reverse for both sequence blocks. This leaves 24 bytes of the
> kmalloc-backed message unwritten. It may disclose stale heap data and
> replace the live connection sequence state with values read from the
> buffer.
>
> Pass the connection sequence state as the source and the message payload as
> the destination for both blocks.
>
> Fixes: 986a07579533 ("IPVS: Backup, Change sending to Version 1 format")
> Assisted-by: Codex:gpt-5.6-sol
> Signed-off-by: Kyle Zeng <kylebot@openai.com>
Looks good to me for the nf tree, thanks!
Acked-by: Julian Anastasov <ja@ssi.bg>
> ---
> net/netfilter/ipvs/ip_vs_sync.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c
> index 93038abbf..f6ea6c953 100644
> --- a/net/netfilter/ipvs/ip_vs_sync.c
> +++ b/net/netfilter/ipvs/ip_vs_sync.c
> @@ -747,9 +747,9 @@ sloop:
> if (cp->flags & IP_VS_CONN_F_SEQ_MASK) {
> *(p++) = IPVS_OPT_SEQ_DATA;
> *(p++) = sizeof(struct ip_vs_sync_conn_options);
> - hton_seq((struct ip_vs_seq *)p, &cp->in_seq);
> + hton_seq(&cp->in_seq, (struct ip_vs_seq *)p);
> p += sizeof(struct ip_vs_seq);
> - hton_seq((struct ip_vs_seq *)p, &cp->out_seq);
> + hton_seq(&cp->out_seq, (struct ip_vs_seq *)p);
> p += sizeof(struct ip_vs_seq);
> }
> /* Handle pe data */
> --
> 2.53.0
Regards
--
Julian Anastasov <ja@ssi.bg>
prev parent reply other threads:[~2026-08-11 17:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 22:13 [PATCH] ipvs: fix reversed sequence option serialization Kyle Zeng
2026-08-11 17:12 ` Julian Anastasov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3fcb66ae-b20f-b97e-5f85-e91ab4a4792c@ssi.bg \
--to=ja@ssi.bg \
--cc=davem@davemloft.net \
--cc=fw@strlen.de \
--cc=horms@verge.net.au \
--cc=kylebot@openai.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lvs-devel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=phil@nwl.cc \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox