Linux Netfilter development
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Guillaume Nault <gnault@redhat.com>
Cc: kadlec@netfilter.org, Florian Westphal <fw@strlen.de>,
	netfilter-devel@vger.kernel.org,
	Lorenzo Colitti <lorenzo@google.com>
Subject: Re: [PATCH nf] netfilter: rpfilter/fib: Set ->flowic_uid correctly for user namespaces.
Date: Wed, 19 Oct 2022 08:46:33 +0200	[thread overview]
Message-ID: <Y0+dSZ2bVZN6mqgY@salvia> (raw)
In-Reply-To: <8853c474dc0f7baafcd3efb8e34a4d12be472495.1665671763.git.gnault@redhat.com>

On Thu, Oct 13, 2022 at 04:37:47PM +0200, Guillaume Nault wrote:
> Currently netfilter's rpfilter and fib modules implicitely initialise
> ->flowic_uid with 0. This is normally the root UID. However, this isn't
> the case in user namespaces, where user ID 0 is mapped to a different
> kernel UID. By initialising ->flowic_uid with sock_net_uid(), we get
> the root UID of the user namespace, thus keeping the same behaviour
> whether or not we're running in a user namepspace.
> 
> Note, this is similar to commit 8bcfd0925ef1 ("ipv4: add missing
> initialization for flowi4_uid"), which fixed the rp_filter sysctl.

Applied, thanks

      reply	other threads:[~2022-10-19  6:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-13 14:37 [PATCH nf] netfilter: rpfilter/fib: Set ->flowic_uid correctly for user namespaces Guillaume Nault
2022-10-19  6:46 ` Pablo Neira Ayuso [this message]

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=Y0+dSZ2bVZN6mqgY@salvia \
    --to=pablo@netfilter.org \
    --cc=fw@strlen.de \
    --cc=gnault@redhat.com \
    --cc=kadlec@netfilter.org \
    --cc=lorenzo@google.com \
    --cc=netfilter-devel@vger.kernel.org \
    /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