From: netdev-bot+sashiko@kernel.org
To: zihanx@nebusec.ai
Cc: netfilter-devel@vger.kernel.org, netdev@vger.kernel.org,
lvs-devel@vger.kernel.org, coreteam@netfilter.org,
linux-kernel@vger.kernel.org, horms@verge.net.au, ja@ssi.bg,
pablo@netfilter.org, fw@strlen.de, phil@nwl.cc,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, stable@vger.kernel.org, vega@nebusec.ai,
root@tr0jan.top
Subject: Re: [PATCH nf v4 3/3] ipvs: reject FTP control ports as data ports
Date: Sun, 27 Sep 2026 10:21:58 +0000 [thread overview]
Message-ID: <179050451874.2160803.17236009960023426401@kernel.org> (raw)
In-Reply-To: <b5c5a01607eabe55a6a5a27a9ed40a0ac8ec65fe.1790146910.git.zihanx@nebusec.ai>
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The commit message is imprecise, and for a Cc: stable fix it
leaves out the impact.
--
ipvs: reject FTP control ports as data ports
With this patch, ip_vs_ftp_out() will not create a passive-mode data
connection if the port advertised by the server is zero or is one of the
configured FTP control ports. It also changes ip_vs_ftp_in() so that
active-mode handling is refused when the client port is zero or when
vport - 1 is a configured control port.
> ip_vs_ftp_out() creates a wildcard data connection from the
> server-advertised passive port. If that port is one of the configured FTP
> control ports, ip_vs_conn_new() binds the FTP helper to the new connection
> again. A subsequent wildcard lookup can then extend a controlled-connection
> chain.
>
> Reject zero and configured control ports before creating passive
> connections. For active mode, reject a zero client port and a data port
> derived from a configured control port.
[Severity: Low]
This is tagged for stable. Could the commit message say what goes wrong
once the controlled-connection chain gets extended?
The earlier patch in this series, "ipvs: avoid stack overflow from
recursive connection expiration", points to the actual consequence. That
consequence is chains of controlled connections pinned through n_control,
and stack exhaustion from recursive ip_vs_conn_expire(). This message does
not mention that, or any dependency on that patch.
The message also doesn't say where the trigger comes from. In passive mode
the port comes from the real server's 227/229 reply. The active case needs
an admin configuration where vport - 1 is also a configured FTP port.
Is the active-mode sentence accurate? Every active-mode data port is
derived from a configured control port. The data port is vport - 1, and
vport is always a configured FTP port, because tcp_app_conn_bind() only
binds the helper when:
if (inc->port == cp->vport) {
Read literally, the sentence says all active transfers are rejected. The
code in ip_vs_ftp_in() only rejects them when the derived port is itself
a configured control port:
if (!port || is_control_port(ntohs(cp->vport) - 1))
return 0;
Could this be reworded along the lines of "reject a derived data port
(vport - 1) that is itself a configured control port"?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/cover.1790146910.git.zihanx%40nebusec.ai
prev parent reply other threads:[~2026-09-27 10:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 9:54 [PATCH nf v4 0/3] ipvs: avoid stack overflow from recursive connection expiration Zihan Xi
2026-09-23 9:54 ` [PATCH nf v4 1/3] ipvs: wait the running timer cb on conn deletion Zihan Xi
2026-09-24 12:11 ` Julian Anastasov
2026-09-27 10:21 ` netdev-bot+sashiko
2026-09-27 14:03 ` Julian Anastasov
2026-09-23 9:54 ` [PATCH nf v4 2/3] ipvs: avoid stack overflow from recursive connection expiration Zihan Xi
2026-09-27 10:21 ` netdev-bot+sashiko
2026-09-27 14:48 ` Julian Anastasov
2026-09-23 9:54 ` [PATCH nf v4 3/3] ipvs: reject FTP control ports as data ports Zihan Xi
2026-09-27 10:21 ` netdev-bot+sashiko [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=179050451874.2160803.17236009960023426401@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=horms@verge.net.au \
--cc=ja@ssi.bg \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lvs-devel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=phil@nwl.cc \
--cc=root@tr0jan.top \
--cc=stable@vger.kernel.org \
--cc=vega@nebusec.ai \
--cc=zihanx@nebusec.ai \
/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
all inboxes | Powered by JetHome®