All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Fernando Fernandez Mancera <fmancera@suse.de>
Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
	phil@nwl.cc, fw@strlen.de
Subject: Re: [PATCH 3/3 nf v5] netfilter: xtables: fix L4 header parsing for non-first fragments
Date: Thu, 30 Apr 2026 08:08:31 +0200	[thread overview]
Message-ID: <afLx347nrAJLqsyf@chamomile> (raw)
In-Reply-To: <20260428102548.6750-3-fmancera@suse.de>

Hi Fernando,

On Tue, Apr 28, 2026 at 12:25:48PM +0200, Fernando Fernandez Mancera wrote:
> Multiple targets and matches relies on L4 header to operate. For
> fragmented packets, every fragment carries the transport protocol
> identifier, but only the first fragment contains the L4 header.
> 
> As the 'raw' table can be configured to run at priority -450 (before
> defragmentation at -400), the target/match can be reached before
> reassembly. In this case, non-first fragments have their payload
> incorrectly parsed as a TCP/UDP header. This would be of course a
> misconfiguration scenario. In most of the cases this just lead to a
> unreliable behavior for fragmented traffic.
> 
> Add a fragment check to ensure target/match only evaluates unfragmented
> packets or the first fragment in the stream.

One more little issue here: There seems to be an issue in
xt_hashlimit, hashlimit_init_dst() drops packets via hotdrop if it
returns -1.

  reply	other threads:[~2026-04-30  6:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-28 10:25 [PATCH 1/3 nf v5] netfilter: nf_socket: skip socket lookup for non-first fragments Fernando Fernandez Mancera
2026-04-28 10:25 ` [PATCH 2/3 nf v5] netfilter: nf_tables: skip L4 header parsing " Fernando Fernandez Mancera
2026-04-28 10:25 ` [PATCH 3/3 nf v5] netfilter: xtables: fix " Fernando Fernandez Mancera
2026-04-30  6:08   ` Pablo Neira Ayuso [this message]
2026-04-30 14:53     ` Fernando Fernandez Mancera
2026-04-30 15:06       ` Pablo Neira Ayuso

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=afLx347nrAJLqsyf@chamomile \
    --to=pablo@netfilter.org \
    --cc=coreteam@netfilter.org \
    --cc=fmancera@suse.de \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.