public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/3] netfilter: conntrack: add shared port parser and use it in IRC and Amanda helpers
@ 2026-05-01  6:31 HACKE-RC
  2026-05-01  6:31 ` [PATCH net-next v2 1/3] netfilter: conntrack: add shared port parser for helpers HACKE-RC
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: HACKE-RC @ 2026-05-01  6:31 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
relies on nul-terminated strings and returns unsigned long without
range checking. Port values above 65535 silently truncate when
stored in u16.

This v2 adds a shared nf_ct_helper_parse_port() function to the
conntrack helper core, modeled after the approach in 8cf6809cddcb
("netfilter: nf_conntrack_sip: don't use simple_strtoul"), then
converts both helpers to use it.

Changes since v1:
  - Added shared nf_ct_helper_parse_port() in the helper core
    instead of open-coding range checks in each helper (Pablo)
  - Parser does not rely on nul-terminated strings
  - Dropped simple_strtoul usage entirely for port parsing

HACKE-RC (3):
  netfilter: conntrack: add shared port parser for helpers
  netfilter: nf_conntrack_irc: use nf_ct_helper_parse_port()
  netfilter: nf_conntrack_amanda: use nf_ct_helper_parse_port()

 include/net/netfilter/nf_conntrack_helper.h |  3 +++
 net/netfilter/nf_conntrack_amanda.c         | 11 ++++----
 net/netfilter/nf_conntrack_helper.c         | 28 +++++++++++++++++++++
 net/netfilter/nf_conntrack_irc.c            |  4 ++-
 4 files changed, 40 insertions(+), 6 deletions(-)

-- 
2.54.0


^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH net-next v2 0/3] netfilter: conntrack: add shared port parser and use it in IRC and Amanda helpers
@ 2026-04-30 18:25 HACKE-RC
  2026-04-30 18:25 ` [PATCH net-next v2 1/3] netfilter: conntrack: add shared port parser for helpers HACKE-RC
  0 siblings, 1 reply; 12+ messages in thread
From: HACKE-RC @ 2026-04-30 18:25 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
relies on nul-terminated strings and returns unsigned long without
range checking. Port values above 65535 silently truncate when
stored in u16.

This v2 adds a shared nf_ct_helper_parse_port() function to the
conntrack helper core, modeled after the approach in 8cf6809cddcb
("netfilter: nf_conntrack_sip: don't use simple_strtoul"), then
converts both helpers to use it.

Changes since v1:
  - Added shared nf_ct_helper_parse_port() in the helper core
    instead of open-coding range checks in each helper (Pablo)
  - Parser does not rely on nul-terminated strings
  - Dropped simple_strtoul usage entirely for port parsing

HACKE-RC (3):
  netfilter: conntrack: add shared port parser for helpers
  netfilter: nf_conntrack_irc: use nf_ct_helper_parse_port()
  netfilter: nf_conntrack_amanda: use nf_ct_helper_parse_port()

 include/net/netfilter/nf_conntrack_helper.h |  3 +++
 net/netfilter/nf_conntrack_amanda.c         | 11 ++++----
 net/netfilter/nf_conntrack_helper.c         | 28 +++++++++++++++++++++
 net/netfilter/nf_conntrack_irc.c            |  4 ++-
 4 files changed, 40 insertions(+), 6 deletions(-)

-- 
2.54.0


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

end of thread, other threads:[~2026-05-03  8:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-01  6:31 [PATCH net-next v2 0/3] netfilter: conntrack: add shared port parser and use it in IRC and Amanda helpers HACKE-RC
2026-05-01  6:31 ` [PATCH net-next v2 1/3] netfilter: conntrack: add shared port parser for helpers HACKE-RC
2026-05-01 10:25   ` Phil Sutter
2026-05-01  6:31 ` [PATCH net-next v2 2/3] netfilter: nf_conntrack_irc: use nf_ct_helper_parse_port() HACKE-RC
2026-05-01  6:31 ` [PATCH net-next v2 3/3] netfilter: nf_conntrack_amanda: " HACKE-RC
2026-05-01 10:34 ` [PATCH net-next v2 0/3] netfilter: conntrack: add shared port parser and use it in IRC and Amanda helpers Phil Sutter
2026-05-03  8:32   ` [PATCH net-next v3 0/4] netfilter: conntrack: shared port parser for helpers HACKE-RC
2026-05-03  8:32     ` [PATCH net-next v3 1/4] netfilter: conntrack: add shared port and uint parsers " HACKE-RC
2026-05-03  8:32     ` [PATCH net-next v3 2/4] netfilter: nf_conntrack_irc: use nf_ct_helper_parse_port() HACKE-RC
2026-05-03  8:32     ` [PATCH net-next v3 3/4] netfilter: nf_conntrack_amanda: " HACKE-RC
2026-05-03  8:32     ` [PATCH net-next v3 4/4] netfilter: nf_conntrack_sip: " HACKE-RC
  -- strict thread matches above, loose matches on Subject: below --
2026-04-30 18:25 [PATCH net-next v2 0/3] netfilter: conntrack: add shared port parser and use it in IRC and Amanda helpers HACKE-RC
2026-04-30 18:25 ` [PATCH net-next v2 1/3] netfilter: conntrack: add shared port parser for helpers HACKE-RC

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