From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Jan Engelhardt <jengelh@inai.de>
Cc: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf-next] netfilter: allow to turn off xtables compat layer
Date: Mon, 26 Apr 2021 12:57:14 +0200 [thread overview]
Message-ID: <20210426105714.GA300@salvia> (raw)
In-Reply-To: <25p6qsnp-r7p1-ps60-s7np-nsq1899446n2@vanv.qr>
On Mon, Apr 26, 2021 at 12:47:12PM +0200, Jan Engelhardt wrote:
>
> On Monday 2021-04-26 12:14, Florian Westphal wrote:
>
> >The compat layer needs to parse untrusted input (the ruleset)
> >to translate it to a 64bit compatible format.
> >
> >We had a number of bugs in this department in the past, so allow users
> >to turn this feature off.
> >
> >+++ b/include/linux/netfilter/x_tables.h
> >@@ -158,7 +158,7 @@ struct xt_match {
> >
> > /* Called when entry of this type deleted. */
> > void (*destroy)(const struct xt_mtdtor_param *);
> >-#ifdef CONFIG_COMPAT
> >+#ifdef CONFIG_NETFILTER_XTABLES_COMPAT
> > /* Called when userspace align differs from kernel space one */
> > void (*compat_from_user)(void *dst, const void *src);
> > int (*compat_to_user)(void __user *dst, const void *src);
>
> There are not a lot of '\.compat_to_user' instaces anymore. It would appear we
> managed to throw out most of the flexing structs over the past 15 years.
>
> Perhaps the remaining one (struct xt_rateinfo) could be respecified
> as a v1, with the plan to ditch the v0.
>
> Then the entire xtables_compat code could go as well.
If the remaining matches and targets that rely on this get a new
revision to fix their structure layout issues, then this entire layer
could be peeled off.
next prev parent reply other threads:[~2021-04-26 10:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-26 10:14 [PATCH nf-next] netfilter: allow to turn off xtables compat layer Florian Westphal
2021-04-26 10:47 ` Jan Engelhardt
2021-04-26 10:57 ` Pablo Neira Ayuso [this message]
2021-04-26 12:06 ` Florian Westphal
2021-04-26 15:38 ` 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=20210426105714.GA300@salvia \
--to=pablo@netfilter.org \
--cc=fw@strlen.de \
--cc=jengelh@inai.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.