Subject: Re: [PATCH net-next] net: preserve sock reference when scrubbing the skb.

From: Flavio Leitner <[email-masked]>
Date: Tue, 26 Jun 2018 09:38:05 -0300

On Mon, Jun 25, 2018 at 11:41:05PM -0700, Eric Dumazet wrote:
> I am not sure why the patch is so complex, I would have simply
> removed the skb_orphan().

All the rest is fixing netfilter to consider the namespaces before
doing any actions.  For instance, it would be possible to dump GID/UID
of the process originating the packet in a foreign net namespace.

Another example is matching if it has a socket or not. I don't think
it's correct to match on a socket that is on a foreign netns.

So, you're right that removing the skb_orphan() is the only thing
required to fix both issues, but then what about the above examples?

-- 
Flavio