From: Pablo Neira Ayuso <pablo@netfilter.org>
To: SaifAllah benMassaoud <saifmassaoudi18@gmail.com>
Cc: netfilter-devel@vger.kernel.org, security@kernel.org
Subject: Re: [SECURITY] netfilter: nft_limit byte-rate bypass via unchecked u64 multiplication
Date: Sun, 11 Oct 2026 18:55:59 +0200 [thread overview]
Message-ID: <asu_nz0tXmnsZIFQ@chamomile> (raw)
In-Reply-To: <CADikNYCzQRErYLwDLoUPrDs8dmuBB8z+45yxKAaps7QTCrLXXA@mail.gmail.com>
Restoring ML as Cc:, please don't drop these.
On Sun, Oct 11, 2026 at 02:06:15PM +0100, SaifAllah benMassaoud wrote:
> Hi,
>
> Thank you for your feedback.
>
> The issue I reported is not that limit rate 30000 bytes/week fails to
> configure. The concern is that the multiplication used to calculate the
> token-bucket cost can overflow:
>
> u64 cost = div64_u64(priv->nsecs * pkt->skb->len, priv->rate);
>
> This occurs in both nft_limit_bytes_eval() and nft_limit_obj_bytes_eval().
> For the tested configuration and packet lengths, the overflow causes the
> calculated cost to wrap to a significantly smaller value, allowing
> substantially more traffic than the configured byte rate would otherwise
> permit.
>
> I understand your suggestion to use nft_quota for byte-count enforcement.
> However, I would appreciate clarification on whether this behavior is
> considered expected for nft_limit or whether packet lengths that trigger
> the overflow are intended to be unsupported.
This can just be rejected from _init() path in a patch for nf-next.
> If this behavior is expected, could you point me to the relevant
> documentation or implementation rationale?
You decided to tag this with [SECURITY].
But why you or your LLM decided that this a security issue!?
next prev parent reply other threads:[~2026-10-11 16:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 17:01 [SECURITY] netfilter: nft_limit byte-rate bypass via unchecked u64 multiplication SaifAllah benMassaoud
2026-10-11 7:34 ` Pablo Neira Ayuso
[not found] ` <CADikNYCzQRErYLwDLoUPrDs8dmuBB8z+45yxKAaps7QTCrLXXA@mail.gmail.com>
2026-10-11 16:55 ` Pablo Neira Ayuso [this message]
[not found] ` <CADikNYBiijxQjptcYf-2+omXj8Mf5PTGVwK-Ho53E7JEe_ehvQ@mail.gmail.com>
2026-10-11 18:23 ` SaifAllah benMassaoud
2026-10-11 19:14 ` Florian Westphal
[not found] ` <CADikNYDzCg46TWPk0dAXQF-Yar+FgEegWEzFZvzCp3x7-k_mOg@mail.gmail.com>
[not found] ` <CADikNYBZ5MqJWypk5NFYcxYvPKJhKKyJ5iOWN4JTZrUWf1AUAQ@mail.gmail.com>
2026-10-11 21:11 ` Pablo Neira Ayuso
[not found] ` <CADikNYC4P0F7gz4nCxKcJwsAzXEEA-a-8QRu1TE3SUzXvmcuZA@mail.gmail.com>
2026-10-11 21:43 ` Pablo Neira Ayuso
2026-10-11 22:08 ` 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=asu_nz0tXmnsZIFQ@chamomile \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=saifmassaoudi18@gmail.com \
--cc=security@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.