All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shaun Brady <brady.1345@gmail.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org, ppwaskie@kernel.org, fw@strlen.de
Subject: Re: [PATCH v5 1/2] netfilter: nf_tables: Implement jump limit for nft_table_validate
Date: Mon, 28 Jul 2025 00:13:32 -0400	[thread overview]
Message-ID: <aIb47BFO38UZGGWI@fedora> (raw)
In-Reply-To: <aH7zWPAVRV8_1ehk@calendula>

On Tue, Jul 22, 2025 at 04:11:36AM +0200, Pablo Neira Ayuso wrote:
> 
> This function is called from abort path too. I suspect total_jump_count
> for this table will not be OK in such case. And this selftest does cover
> many cases.
> 

Your suspicion was correct.  It took a bit to run over the abort path
that used validation (I think it would just be userland sending abort),
but it looked like it updated the total before the roll back.

My solution was to send in the abort state, and when
action != NFNL_ABORT_VALIDATE, we don't update the totals.

Another alternative would be to just run validate again at the end of
the abort (after the rollback), but that seemed wrong to do the costly
validate twice.

See v6 patch (just sent) that also addresses your other feedback.



Thanks!


SB

      parent reply	other threads:[~2025-07-28  4:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-20  3:08 [PATCH v5 1/2] netfilter: nf_tables: Implement jump limit for nft_table_validate Shaun Brady
2025-05-20  3:08 ` [PATCH v5 2/2] Add test for nft_max_table_jumps_netns sysctl Shaun Brady
2025-05-20 10:02 ` [PATCH v5 1/2] netfilter: nf_tables: Implement jump limit for nft_table_validate Florian Westphal
2025-05-28  2:39   ` Shaun Brady
2025-05-28 10:59     ` Florian Westphal
2025-07-22  2:11 ` Pablo Neira Ayuso
2025-07-23  3:19   ` Shaun Brady
2025-07-28  4:13   ` Shaun Brady [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=aIb47BFO38UZGGWI@fedora \
    --to=brady.1345@gmail.com \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=ppwaskie@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 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.