netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pham Thanh Tuyen <phamtyn@gmail.com>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel <netfilter-devel@vger.kernel.org>
Subject: Re: PROBLEM: Injected conntrack lost helper
Date: Tue, 1 Feb 2022 10:08:55 +0700	[thread overview]
Message-ID: <2ea7f9da-22be-17db-88d7-10738b95faf3@gmail.com> (raw)
In-Reply-To: <20220131112050.GQ25922@breakpoint.cc>

When the conntrack is created, the extension is created before the 
conntrack is assigned confirmed and inserted into the hash table. But 
the function ctnetlink_setup_nat() causes loss of helper in the 
mentioned situation. I mention the template because it's seamless in the 
__nf_ct_try_assign_helper() function. Please double check.

On 1/31/22 18:20, Florian Westphal wrote:
> Pham Thanh Tuyen <phamtyn@gmail.com> wrote:
>
> [ moving to netfilter-devel ]
>
>>>> My name is Pham Thanh Tuyen. I found a bug related to the ctnetlink
>>>> and conntrack subsystems. Details are as follows:
>>>>
>>>> 1. Summary: Injected conntrack lost helper
>>>>
>>>> 2. Description: When a conntrack whose helper is injected from
>>>> userspace, the ctnetlink creates helper for it but NAT then loses
>>>> the helper in case the user defined helper explicitly with CT
>>>> target.
> Hmm.  If you insert a conntrack entry from userspace, it will already
> be confirmed, so nat rules will have no effect, and template CT rules
> are irrelevant wrt. to the helper, as extension can only be created if
> the conntrack is not in the hash yet.
>
> Can you describe the steps to reproduce this bug?

  parent reply	other threads:[~2022-02-01  3:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f9fb5616-0b37-d76b-74e5-53751d473432@gmail.com>
     [not found] ` <3f416429-b1be-b51a-c4ef-6274def33258@iogearbox.net>
     [not found]   ` <0f4edf58-7b4e-05e8-3f13-d34819b8d5db@gmail.com>
2022-01-31 11:20     ` PROBLEM: Injected conntrack lost helper Florian Westphal
2022-01-31 13:47       ` Pham Thanh Tuyen
2022-01-31 13:55         ` Pham Thanh Tuyen
2022-02-01  3:08       ` Pham Thanh Tuyen [this message]
2022-02-01 10:29         ` Pablo Neira Ayuso
2022-02-01 12:04           ` Florian Westphal
2022-02-01 13:32             ` Pham Thanh Tuyen
2022-02-01 14:14               ` Florian Westphal
2022-02-02  1:43                 ` Pham Thanh Tuyen
2022-02-02 11:48             ` 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=2ea7f9da-22be-17db-88d7-10738b95faf3@gmail.com \
    --to=phamtyn@gmail.com \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).