From: Pablo Neira Ayuso <pablo@netfilter.org>
To: HACKE-RC <rc@rexion.ai>
Cc: Florian Westphal <fw@strlen.de>, Phil Sutter <phil@nwl.cc>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 0/2] netfilter: conntrack: validate parsed port values in IRC and Amanda helpers
Date: Thu, 30 Apr 2026 18:18:11 +0200 [thread overview]
Message-ID: <afOAw3V2PAKy1gPJ@chamomile> (raw)
In-Reply-To: <20260430161230.3438973-1-rc@rexion.ai>
On Thu, Apr 30, 2026 at 09:42:28PM +0530, HACKE-RC wrote:
> Both nf_conntrack_irc and nf_conntrack_amanda parse port numbers from
> application-layer protocol data using simple_strtoul(), which returns
> unsigned long. The results are stored in u16 variables without range
> checks, silently truncating values above 65535.
>
> This series adds explicit upper-bound validation in both helpers.
>
> Note: checkpatch warns about simple_strtoul being obsolete. Both
> call sites use the endptr output parameter to advance the parse
> position, which kstrtoul does not provide. Converting to kstrtoul
> would require restructuring the parsers, which is out of scope for
> this fix.
>
> HACKE-RC (2):
HAHA, this nickname is funny, it is making my day here. Thanks!
> netfilter: nf_conntrack_irc: reject DCC port values above 65535
> netfilter: nf_conntrack_amanda: reject port values above 65535
>
> net/netfilter/nf_conntrack_amanda.c | 10 ++++++----
> net/netfilter/nf_conntrack_irc.c | 7 ++++++-
> 2 files changed, 12 insertions(+), 5 deletions(-)
>
> --
> 2.54.0
>
prev parent reply other threads:[~2026-04-30 16:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 16:12 [PATCH net-next 0/2] netfilter: conntrack: validate parsed port values in IRC and Amanda helpers HACKE-RC
2026-04-30 16:12 ` [PATCH net-next 1/2] netfilter: nf_conntrack_irc: reject DCC port values above 65535 HACKE-RC
2026-04-30 16:18 ` Pablo Neira Ayuso [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=afOAw3V2PAKy1gPJ@chamomile \
--to=pablo@netfilter.org \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=phil@nwl.cc \
--cc=rc@rexion.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