Skip to content

Ensuring net sysctl isolation

Jonathon Reinhart netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (refs/heads/master):

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2net: Ensure net namespace isolation of sysctlsnet/sysctl_net.c+48 -00 repliesApplied
2/2netfilter: conntrack: Make global sysctls readonly in non-init netnsnet/netfilter/nf_conntrack_standalone.c+2 -80 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 0/2] Ensuring net sysctl isolation

This patchset is the result of an audit of /proc/sys/net to prove that it is safe to be mouted read-write in a container when a net namespace is in use. See [1].

The first commit adds code to detect sysctls which are not netns-safe, and can "leak" changes to other net namespaces.

My manual audit found, and the above feature confirmed, that there are two nf_conntrack sysctls which are in fact not netns-safe.

I considered sending the latter to netfilter-devel, but I think it's better to have both together on net-next: Adding only the former causes undesirable warnings in the kernel log.

[1]: https://github.com/opencontainers/runc/issues/2826

Jonathon Reinhart (2):
net: Ensure net namespace isolation of sysctls
netfilter: conntrack: Make global sysctls readonly in non-init netns

 net/netfilter/nf_conntrack_standalone.c | 10 ++----
 net/sysctl_net.c                        | 48 +++++++++++++++++++++++++
 2 files changed, 50 insertions(+), 8 deletions(-)
Signature · 1 line
2.20.1