netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, tom@herbertland.com, edumazet@google.com
Subject: Re: [PATCH net 2/2] udp: restrict offloads to one namespace
Date: Thu, 17 Dec 2015 09:49:53 +0100	[thread overview]
Message-ID: <56727731.2010605@stressinduktion.org> (raw)
In-Reply-To: <20151216.190417.1337922066819496682.davem@davemloft.net>

Hi all,

On 17.12.2015 01:04, David Miller wrote:
> From: Hannes Frederic Sowa <hannes@stressinduktion.org>
> Date: Tue, 15 Dec 2015 21:01:54 +0100
> 
>> udp tunnel offloads tend to aggregate datagrams based on inner
>> headers. gro engine gets notified by tunnel implementations about
>> possible offloads. The match is solely based on the port number.
>>
>> Imagine a tunnel bound to port 53, the offloading will look into all
>> DNS packets and tries to aggregate them based on the inner data found
>> within. This could lead to data corruption and malformed DNS packets.
>>
>> While this patch minimizes the problem and helps an administrator to find
>> the issue by querying ip tunnel/fou, a better way would be to match on
>> the specific destination ip address so if a user space socket is bound
>> to the same address it will conflict.
>>
>> Cc: Tom Herbert <tom@herbertland.com>
>> Cc: Eric Dumazet <edumazet@google.com>
>> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
> 
> It looks this issue is still being hashed out so I've marked this
> patch as deferred for now.


I think we need this patch. We later can decide to add more
classification attributes, like dst ip down to gro, but the netns marks
are important.

With user namespaces a normal user can start a new network namespace
with all privileges and thus add new offloads, letting the other stack
interpret this garbage. Because the user namespace can also add
arbitrary ip addresses to its interface, solely matching those is not
enough.

Tom any further comments?

Thanks,
Hannes

  reply	other threads:[~2015-12-17  8:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15 20:01 [PATCH net 1/2] fou: clean up socket with kfree_rcu Hannes Frederic Sowa
2015-12-15 20:01 ` [PATCH net 2/2] udp: restrict offloads to one namespace Hannes Frederic Sowa
2015-12-15 20:26   ` Tom Herbert
2015-12-15 20:46     ` Hannes Frederic Sowa
2015-12-15 22:39       ` Tom Herbert
2015-12-16 16:43         ` Hannes Frederic Sowa
2015-12-17  0:04   ` David Miller
2015-12-17  8:49     ` Hannes Frederic Sowa [this message]
2015-12-17 17:32       ` Tom Herbert
2015-12-17 17:40         ` Hannes Frederic Sowa
2015-12-17 18:10           ` Tom Herbert
2015-12-17 20:33             ` Hannes Frederic Sowa
2015-12-17 21:31               ` Tom Herbert
2015-12-17  0:03 ` [PATCH net 1/2] fou: clean up socket with kfree_rcu 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=56727731.2010605@stressinduktion.org \
    --to=hannes@stressinduktion.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=tom@herbertland.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).