From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft] json: reject too long interface names
Date: Wed, 25 Jun 2025 23:20:04 +0200 [thread overview]
Message-ID: <aFxoBC6EEHJ6PhJ-@calendula> (raw)
In-Reply-To: <20250624214702.25077-1-fw@strlen.de>
On Tue, Jun 24, 2025 at 11:46:59PM +0200, Florian Westphal wrote:
> Blamed commit added a length check on ifnames to the bison parser.
> Unfortunately that wasn't enough, json parser has the same issue.
>
> Bogon results in:
> BUG: Interface length 44 exceeds limit
> nft: src/mnl.c:742: nft_dev_add: Assertion `0' failed.
>
> After patch, included bogon results in:
> Error: Invalid device at index 0. name d2345678999999999999999999999999999999012345 too long
>
> I intentionally did not extend evaluate.c to catch this, past sentiment
> was that frontends should not send garbage.
>
> I'll send a followup patch to also catch this from eval stage in case there
> are further reports for frontends passing in such long names.
>
> Fixes: fa52bc225806 ("parser: reject zero-length interface names")
> Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Pablo Neira Ayuso <pablo@netfilter.org>
prev parent reply other threads:[~2025-06-25 21:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-24 21:46 [PATCH nft] json: reject too long interface names Florian Westphal
2025-06-25 21:20 ` Pablo Neira Ayuso [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=aFxoBC6EEHJ6PhJ-@calendula \
--to=pablo@netfilter.org \
--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 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.