]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - include/net/ip.h
Introduce a sysctl that modifies the value of PROT_SOCK.
authorKrister Johansen <kjlx@templeofstupid.com>
Sat, 21 Jan 2017 01:49:11 +0000 (17:49 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Jan 2017 17:10:51 +0000 (12:10 -0500)
commit4548b683b78137f8eadeb312b94e20bb0d4a7141
tree8b285d141f533807625336c4524411bf31d48d9f
parentd140199af510ad4749dc5e38b7922135258ba5fd
Introduce a sysctl that modifies the value of PROT_SOCK.

Add net.ipv4.ip_unprivileged_port_start, which is a per namespace sysctl
that denotes the first unprivileged inet port in the namespace.  To
disable all privileged ports set this to zero.  It also checks for
overlap with the local port range.  The privileged and local range may
not overlap.

The use case for this change is to allow containerized processes to bind
to priviliged ports, but prevent them from ever being allowed to modify
their container's network configuration.  The latter is accomplished by
ensuring that the network namespace is not a child of the user
namespace.  This modification was needed to allow the container manager
to disable a namespace's priviliged port restrictions without exposing
control of the network namespace to processes in the user namespace.

Signed-off-by: Krister Johansen <kjlx@templeofstupid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/ip-sysctl.txt
include/net/ip.h
include/net/netns/ipv4.h
net/ipv4/af_inet.c
net/ipv4/sysctl_net_ipv4.c
net/ipv6/af_inet6.c
net/netfilter/ipvs/ip_vs_ctl.c
net/sctp/socket.c
security/selinux/hooks.c