All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Jonathon Reinhart <jonathon.reinhart@gmail.com>
Cc: stable@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Florian Westphal <fw@strlen.de>,
	netdev@vger.kernel.org
Subject: Re: [PATCH] netfilter: conntrack: Make global sysctls readonly in non-init netns
Date: Mon, 17 May 2021 14:03:55 +0200	[thread overview]
Message-ID: <YKJbq3ubZnUKIjcv@kroah.com> (raw)
In-Reply-To: <20210513082835.18854-1-jonathon.reinhart@gmail.com>

On Thu, May 13, 2021 at 04:28:35AM -0400, Jonathon Reinhart wrote:
> commit 2671fa4dc0109d3fb581bc3078fdf17b5d9080f6 upstream.
> 
> These sysctls point to global variables:
> - [0] "nf_conntrack_max"        (&nf_conntrack_max)
> - [2] "nf_conntrack_buckets"    (&nf_conntrack_htable_size_user)
> - [5] "nf_conntrack_expect_max" (&nf_ct_expect_max)
> 
> Because their data pointers are not updated to point to per-netns
> structures, they must be marked read-only in a non-init_net ns.
> Otherwise, changes in any net namespace are reflected in (leaked into)
> all other net namespaces. This problem has existed since the
> introduction of net namespaces.
> 
> This patch is necessarily different from the upstream patch due to the
> heavy refactoring which took place since 4.19:
> 
> d0febd81ae77 ("netfilter: conntrack: re-visit sysctls in unprivileged namespaces")
> b884fa461776 ("netfilter: conntrack: unify sysctl handling")
> 4a65798a9408 ("netfilter: conntrack: add mnemonics for sysctl table")
> 
> Signed-off-by: Jonathon Reinhart <jonathon.reinhart@gmail.com>
> ---
> 
> Upstream commit 2671fa4dc010 was already applied to the 5.10, 5.11, and
> 5.12 trees.
> 
> This was tested on 4.19.190, so please apply to 4.19.y.
> 
> It should also apply to:
> - 4.14.y
> - 4.9.y
> 
> Note that 5.4.y would require a slightly different patch that looks more
> like 2671fa4dc010.

All now queued up, thanks!

greg k-h

  reply	other threads:[~2021-05-17 12:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-13  8:28 [PATCH] netfilter: conntrack: Make global sysctls readonly in non-init netns Jonathon Reinhart
2021-05-17 12:03 ` Greg KH [this message]
2021-05-13  8:57 Jonathon Reinhart

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=YKJbq3ubZnUKIjcv@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=davem@davemloft.net \
    --cc=fw@strlen.de \
    --cc=jonathon.reinhart@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stable@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.