Ethernet Bridge development
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Zhiling Zou <zhilinz@nebusec.ai>
Cc: netfilter-devel@vger.kernel.org, bridge@lists.linux.dev,
	pablo@netfilter.org, phil@nwl.cc, razor@blackwall.org,
	idosch@nvidia.com, vega@nebusec.ai
Subject: Re: [PATCH nf 1/1] netfilter: ebtables: validate compat nentries
Date: Fri, 23 Oct 2026 08:46:11 +0200	[thread overview]
Message-ID: <atsCs5zS3x9wxBSN@strlen.de> (raw)
In-Reply-To: <280a41badb424f8dc5fa22d03d6abf82025d539e.1792733039.git.zhilinz@nebusec.ai>

Zhiling Zou <zhilinz@nebusec.ai> wrote:
> compat_do_replace() allocates per-CPU counters from the compat header's
> nentries before it parses the entries blob. A malformed request can claim
> millions of rules while supplying only a single empty chain, causing a
> large vmalloc() before the request is rejected by later validation.
> 
> Each rule occupies at least sizeof(struct ebt_entry) bytes in the input
> blob. Reject a rule count that cannot fit in entries_size before the
> compat path allocates counters.

Looks like a nothingburger.  User could also supply a larger blob?

Also: CONFIG_COMPAT should no longer be reachable from userns:
ec1806a730a1 ("netfilter: x_tables: disable 32bit compat interface in user namespaces")

@Pablo: if you prefer to take this, no objections from my side;
it doesn't look wrong.

      reply	other threads:[~2026-10-23  6:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-23  5:26 [PATCH nf 0/1] netfilter: ebtables: validate compat nentries Zhiling Zou
2026-10-23  5:26 ` [PATCH nf 1/1] " Zhiling Zou
2026-10-23  6:46   ` Florian Westphal [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=atsCs5zS3x9wxBSN@strlen.de \
    --to=fw@strlen.de \
    --cc=bridge@lists.linux.dev \
    --cc=idosch@nvidia.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=phil@nwl.cc \
    --cc=razor@blackwall.org \
    --cc=vega@nebusec.ai \
    --cc=zhilinz@nebusec.ai \
    /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