public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] netfilter: conntrack: validate parsed port values in IRC and Amanda helpers
@ 2026-04-30 16:12 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 ` [PATCH net-next 0/2] netfilter: conntrack: validate parsed port values in IRC and Amanda helpers Pablo Neira Ayuso
  0 siblings, 2 replies; 3+ messages in thread
From: HACKE-RC @ 2026-04-30 16:12 UTC (permalink / raw)
  To: Pablo Neira Ayuso, Florian Westphal
  Cc: Phil Sutter, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Simon Horman, netfilter-devel, coreteam, netdev,
	linux-kernel, HACKE-RC

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):
  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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-30 16:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH net-next 0/2] netfilter: conntrack: validate parsed port values in IRC and Amanda helpers Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox