Re: [PATCH 3.12 28/88] netfilter: x_tables: validate targets of jumps

From: Michal Kubecek
Date: Mon Jul 25 2016 - 02:51:20 EST


On pondělí 25. července 2016 8:41 Florian Westphal wrote:
> Michal Kubecek <mkubecek@xxxxxxx> wrote:
> > On Thu, Jul 21, 2016 at 09:00:33PM +0200, Jiri Slaby wrote:
> > > On 07/21/2016, 08:56 PM, Greg KH wrote:
> > > > On Thu, Jul 21, 2016 at 08:36:18AM +0200, Jiri Slaby wrote:
> > > >> On 07/14/2016, 10:15 AM, Jiri Slaby wrote:
> > > >>> From: Florian Westphal <fw@xxxxxxxxx>
> > > >>>
> > > >>> 3.12-stable review patch. If anyone has any objections,
> > > >>> please let me know.
> > > >>>
> > > >>> ===============
> > > >>>
> > > >>> commit 36472341017529e2b12573093cc0f68719300997 upstream.
> > > >>
> > > >> I am now dropping this one. 3.12.62 will be released without
> > > >> that patch. After the performance issue is resolved, it will
> > > >> be requeued.> > >
> > > > Personally, I think the bug fixes were more important than the
> > > > performance issues at this point in time, but it's your call to
> > > > make :)> >
> > > Ok, but to quote [1]:
> > > iptables-restore will take forever (gave up after 10 minutes)
> > >
> > > I would say it proved itself not to be a performance issue, but
> > > rather a functional issue :). Both Pablo and Florian suggested to
> > > postpone the patch.>
> > Even worse: because of a shared lock which is held for all this
> > time,
> > this allows (on kernel >= 3.8) an unprivileged user to block similar
> > operation in all network namespaces including init_net.
>
> What lock are you talking about?
>
> The table lock is aquired after the sanity/translation pass.

I meant xt_compat_lock(AF_INET) (or AF_INET6 or NFPROTO_ARP) which is
held for almost all of translate_compat_table().

Michal Kubecek