All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Fernando Fernandez Mancera <fmancera@suse.de>
Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
	pablo@netfilter.org, phil@nwl.cc
Subject: Re: [PATCH 4/4 nf v2] netfilter: synproxy: fix possible write to stale pointer
Date: Tue, 26 May 2026 15:05:57 +0200	[thread overview]
Message-ID: <ahWatXyiNiBrE9FX@strlen.de> (raw)
In-Reply-To: <4887bf00-d044-4366-8588-a83e4bce0274@suse.de>

Fernando Fernandez Mancera <fmancera@suse.de> wrote:
> > In particular, seqadj and concurrent registration.  As these bugs aren't
> > as severe as patch 4, I think nf-next would be fine as well.
> > 
> > 
> 
> I have been taking a look to this. The seqadj issue isn't real IMHO.

We could be processing a 2nd packet in parallel, in particular reply
direction is a concern.

> The logic here is protected by the TCP state machine. AFAIU, ALGs only 
> look at fully established connections, I don't see how this can happen 
> even for retransmitted packets, the TCP state would remain the same so 
> nf_ct_seqadj_init() should never race with nf_ct_seqadj_set().

Can't we race with nf_ct_seq_adjust(), e.g. for closed state when
connection is reopened?

> FWIW; the concurrent registration issue is real. I am writing a fix.

Thanks.

  reply	other threads:[~2026-05-26 13:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-25 12:44 [PATCH 0/4 nf v2] netfilter: synproxy: timestamp adjustment fixes Fernando Fernandez Mancera
2026-05-25 12:44 ` [PATCH 1/4 nf v2] netfilter: synproxy: drop packets if timestamp adjustment fails Fernando Fernandez Mancera
2026-05-25 12:44 ` [PATCH 2/4 nf v2] netfilter: synproxy: adjust duplicate timestamp options Fernando Fernandez Mancera
2026-05-25 12:44 ` [PATCH 3/4 nf v2] netfilter: synproxy: fix unaligned memory access in timestamp adjustment Fernando Fernandez Mancera
2026-05-25 12:44 ` [PATCH 4/4 nf v2] netfilter: synproxy: fix possible write to stale pointer Fernando Fernandez Mancera
2026-05-25 13:45   ` Fernando Fernandez Mancera
2026-05-25 18:59     ` Florian Westphal
2026-05-25 19:02       ` Fernando Fernandez Mancera
2026-05-26 10:12       ` Fernando Fernandez Mancera
2026-05-26 13:05         ` Florian Westphal [this message]
2026-05-26 13:12           ` Fernando Fernandez Mancera

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=ahWatXyiNiBrE9FX@strlen.de \
    --to=fw@strlen.de \
    --cc=coreteam@netfilter.org \
    --cc=fmancera@suse.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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.