From: Florian Westphal <fw@strlen.de>
To: Jann Horn <jannh@google.com>
Cc: Florian Westphal <fw@strlen.de>,
Eric Dumazet <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>,
Network Development <netdev@vger.kernel.org>,
eric.dumazet@gmail.com, posk@google.com, pabeni@redhat.com
Subject: Re: [PATCH net] inet: frag: enforce memory limits earlier
Date: Tue, 31 Jul 2018 17:52:54 +0200 [thread overview]
Message-ID: <20180731155254.o2cnyx7walzu6chj@breakpoint.cc> (raw)
In-Reply-To: <CAG48ez3+4P6MVSeTSY1XGyc-77Kk83PvpAT3p5tn0Ajk9Pj9Qg@mail.gmail.com>
Jann Horn <jannh@google.com> wrote:
> On Tue, Jul 31, 2018 at 7:54 AM Florian Westphal <fw@strlen.de> wrote:
> >
> > Eric Dumazet <edumazet@google.com> wrote:
> > > We currently check current frags memory usage only when
> > > a new frag queue is created. This allows attackers to first
> > > consume the memory budget (default : 4 MB) creating thousands
> > > of frag queues, then sending tiny skbs to exceed high_thresh
> > > limit by 2 to 3 order of magnitude.
> > >
> > > Note that before commit 648700f76b03 ("inet: frags: use rhashtables
> > > for reassembly units"), work queue could be starved under DOS,
> > > getting no cpu cycles.
> > > After commit 648700f76b03, only the per frag queue timer can eventually
> > > remove an incomplete frag queue and its skbs.
> >
> > I'm not sure this is a good idea.
> >
> > This can now prevent "good" queue from completing just because attacker
> > is sending garbage.
>
> There is only a limited amount of memory available to store fragments.
> If you receive lots of fragments that don't form complete packets,
> you'll have to drop some packets. I don't see why it matters whether
> incoming garbage only prevents the creation of new queues or also the
> completion of existing queues.
Agreed. Objection withdrawn.
Acked-by: Florian Westphal <fw@strlen.de>
next prev parent reply other threads:[~2018-07-31 17:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-31 3:09 [PATCH net] inet: frag: enforce memory limits earlier Eric Dumazet
2018-07-31 5:54 ` Florian Westphal
2018-07-31 15:23 ` Jann Horn
2018-07-31 15:52 ` Florian Westphal [this message]
2018-07-31 21:44 ` David Miller
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=20180731155254.o2cnyx7walzu6chj@breakpoint.cc \
--to=fw@strlen.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=jannh@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=posk@google.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).