netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jesper Dangaard Brouer <brouer@redhat.com>
To: ebiederm@xmission.com (Eric W. Biederman)
Cc: brouer@redhat.com, Cong Wang <xiyou.wangcong@gmail.com>,
	David Miller <davem@davemloft.net>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	Patrick McHardy <kaber@trash.net>,
	Stephen Hemminger <stephen@networkplumber.org>,
	Cong Wang <cwang@twopensource.com>,
	Stefan Bader <stefan.bader@canonical.com>,
	stephane.graber@canonical.com, chris.j.arges@canonical.com,
	Serge Hallyn <serge.hallyn@canonical.com>,
	Hannes Frederic Sowa <hannes@stressinduktion.org>
Subject: Re: [Patch net-next] net: make neigh tables per netns
Date: Mon, 30 Jun 2014 20:15:18 +0200	[thread overview]
Message-ID: <20140630201518.653ebbaf@redhat.com> (raw)
In-Reply-To: <87vbrl8vmz.fsf@x220.int.ebiederm.org>


On Fri, 27 Jun 2014 22:12:52 -0700 ebiederm@xmission.com (Eric W. Biederman) wrote:
> Cong Wang <xiyou.wangcong@gmail.com> writes:
> > On Thu, Jun 26, 2014 at 3:44 PM, David Miller <davem@davemloft.net> wrote:
> >>
[...]
> >
> > Hmm, I did overlook the potential DOS problem. But hold on, isn't
> > IP fragments have the same problem? The fragment queues are per
> > netns, and the thresh is per netns as well, we will eventually have
> > memory pressure as well.
> 
> Interesting.  It does look like ip fragments are susceptible that way.

For IP fragments we have per netns mem-limit and LRU-list, but all
netns share the same hash table, which have its own DoS potential.

And argh! - we have a hardcoded INETFRAGS_MAXDEPTH=128, which can be
used for (slow) DoS of IP frags if enough netns are created.

https://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/tree/net/ipv4/inet_fragment.c#n344

Introduced by commit 5a3da1fe9 ("inet: limit length of fragment queue
hash table bucket lists").
-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Sr. Network Kernel Developer at Red Hat
  Author of http://www.iptv-analyzer.org
  LinkedIn: http://www.linkedin.com/in/brouer

  reply	other threads:[~2014-06-30 18:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-23 22:09 [Patch net-next] net: make neigh tables per netns Cong Wang
2014-06-25 23:33 ` David Miller
2014-06-26  0:04 ` Eric W. Biederman
2014-06-26  0:22   ` Cong Wang
2014-06-26  1:17     ` Eric W. Biederman
2014-06-26  6:14       ` Michal Kubecek
2014-06-26 12:10         ` Eric W. Biederman
2014-06-26 20:43       ` David Miller
     [not found]         ` <87egybibh5.fsf@x220.int.ebiederm.org>
2014-06-26 22:44           ` David Miller
2014-06-28  0:09             ` Cong Wang
2014-06-28  5:12               ` Eric W. Biederman
2014-06-30 18:15                 ` Jesper Dangaard Brouer [this message]
2014-06-30 18:54                   ` Hannes Frederic Sowa
2014-11-04 15:49                     ` Stéphane Graber

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=20140630201518.653ebbaf@redhat.com \
    --to=brouer@redhat.com \
    --cc=chris.j.arges@canonical.com \
    --cc=cwang@twopensource.com \
    --cc=davem@davemloft.net \
    --cc=ebiederm@xmission.com \
    --cc=hannes@stressinduktion.org \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=serge.hallyn@canonical.com \
    --cc=stefan.bader@canonical.com \
    --cc=stephane.graber@canonical.com \
    --cc=stephen@networkplumber.org \
    --cc=xiyou.wangcong@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).