[PATCH 1/8] net: introduce CLONE_NEWNET_LOOPBACK to auto-enable loopback
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Thu Oct 29 22:18:25 UTC 2026
> New network namespaces start with the loopback interface DOWN by
> default, requiring CAP_NET_ADMIN over the owning user namespace to
> bring it up.
>
> To block external network access while preserving the localhost
> networking that many applications expect, sandboxes (such as bwrap,
> nsjail and minijail) commonly create an isolated network namespace
> with only the loopback interface enabled.
>
> However, requiring a sandbox to hold CAP_NET_ADMIN in a new user
> namespace solely to bring loopback up conflicts with reducing the
> CAP_NET_ADMIN attack surface.
>
> Today, an unprivileged sandbox or sandbox manager must start with
> CAP_NET_ADMIN in its user namespace to be able to bring up loopback,
> [ ... ]
> semantics while allowing unprivileged sandboxes to create an isolated
> network namespace with functional localhost networking without ever
> holding CAP_NET_ADMIN.
>
> Signed-off-by: Hallgrimur H. Gunnarsson <halg at google.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261028221705.3915340-1-halg@google.com?part=1
More information about the Linux-security-module-archive
mailing list