Commit 2b696a2
ipvs: allow some sysctls in non-init user namespaces
Let's make all IPVS sysctls writtable even when
network namespace is owned by non-initial user namespace.
Let's make a few sysctls to be read-only for non-privileged users:
- sync_qlen_max
- sync_sock_size
- run_estimation
- est_cpulist
- est_nice
I'm trying to be conservative with this to prevent
introducing any security issues in there. Maybe,
we can allow more sysctls to be writable, but let's
do this on-demand and when we see real use-case.
This patch is motivated by user request in the LXC
project [1]. Having this can help with running some
Kubernetes [2] or Docker Swarm [3] workloads inside the system
containers.
Link: lxc/lxc#4278 [1]
Link: https://github.com/kubernetes/kubernetes/blob/b722d017a34b300a2284b890448e5a605f21d01e/pkg/proxy/ipvs/proxier.go#L103 [2]
Link: https://github.com/moby/libnetwork/blob/3797618f9a38372e8107d8c06f6ae199e1133ae8/osl/namespace_linux.go#L682 [3]
Cc: Julian Anastasov <ja@ssi.bg>
Cc: Simon Horman <horms@verge.net.au>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Jozsef Kadlecsik <kadlec@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 643bb5d commit 2b696a2
1 file changed
Lines changed: 15 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4269 | 4269 | | |
4270 | 4270 | | |
4271 | 4271 | | |
| 4272 | + | |
4272 | 4273 | | |
4273 | 4274 | | |
4274 | 4275 | | |
| |||
4283 | 4284 | | |
4284 | 4285 | | |
4285 | 4286 | | |
4286 | | - | |
4287 | | - | |
4288 | | - | |
4289 | | - | |
4290 | 4287 | | |
4291 | 4288 | | |
4292 | 4289 | | |
| |||
4312 | 4309 | | |
4313 | 4310 | | |
4314 | 4311 | | |
| 4312 | + | |
4315 | 4313 | | |
| 4314 | + | |
| 4315 | + | |
4316 | 4316 | | |
| 4317 | + | |
4317 | 4318 | | |
| 4319 | + | |
| 4320 | + | |
4318 | 4321 | | |
| 4322 | + | |
4319 | 4323 | | |
4320 | 4324 | | |
4321 | 4325 | | |
| |||
4338 | 4342 | | |
4339 | 4343 | | |
4340 | 4344 | | |
| 4345 | + | |
4341 | 4346 | | |
| 4347 | + | |
| 4348 | + | |
4342 | 4349 | | |
4343 | 4350 | | |
4344 | 4351 | | |
4345 | 4352 | | |
| 4353 | + | |
| 4354 | + | |
4346 | 4355 | | |
4347 | 4356 | | |
4348 | 4357 | | |
4349 | 4358 | | |
| 4359 | + | |
| 4360 | + | |
4350 | 4361 | | |
4351 | 4362 | | |
4352 | 4363 | | |
| |||
0 commit comments