All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: zhangmh25@mails.tsinghua.edu.cn
Cc: netfilter-devel@vger.kernel.org, jianjun@tsinghua.edu.cn
Subject: Re: [PATCH nf-next v2] netfilter: nf_reject: validate TCP header length before sending resets
Date: Tue, 10 Nov 2026 02:07:03 +0100	[thread overview]
Message-ID: <avJuN1cClzssVmi0@chamomile> (raw)
In-Reply-To: <20261109164726.3868529-1-zhangmh25@mails.tsinghua.edu.cn>

On Tue, Nov 10, 2026 at 12:47:26AM +0800, zhangmh25@mails.tsinghua.edu.cn wrote:
> From: Minghao Zhang <zhangmh25@mails.tsinghua.edu.cn>
> 
[...]
> With connection tracking enabled, segments with an inconsistent data
> offset are already flagged by tcp_error() in nf_conntrack_proto_tcp.c
> (th->doff*4 < sizeof(struct tcphdr) || tcplen < th->doff*4) on the
> paths where conntrack runs before the reject rule, so rulesets with
> an early "ct state invalid drop" rule never pass them to the reject
> target. The netdev and inet ingress reject paths run before conntrack
> and are not covered by that. The affected configurations are stateless
> rulesets, netdev-family reject rules, and rulesets whose reject rule
> is not preceded by an invalid-state drop.

I am not sure I want to duplicate all these checks that already exist
in nf_conntrack only for the stateless case.

      reply	other threads:[~2026-11-10  1:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09 16:47 [PATCH nf-next v2] netfilter: nf_reject: validate TCP header length before sending resets zhangmh25
2026-11-10  1:07 ` 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=avJuN1cClzssVmi0@chamomile \
    --to=pablo@netfilter.org \
    --cc=jianjun@tsinghua.edu.cn \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=zhangmh25@mails.tsinghua.edu.cn \
    /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.