4 ms·
Note that this repros on a default unprivileged container, with the default seccomp profile, and SELinux enabled. Relevant filed issue: https://github.com/moby
by bthornbury 9y ago
Note that this repros on a default unprivileged container, with the default seccomp profile, and SELinux enabled.
Relevant filed issue: https://github.com/moby/moby/issues/36355 https://github.com/moby/moby/issues/36355
There are three immediate workarounds.
1. Dropping `CAP_SYS_RAW` in docker run will prevent the raw socket from being opened (and is always a good idea).
2. Placing each container on it's own bridge network blocks this communication but requires you to manually specify the subnets of those networks to work around dockers default limit of 31 networks.
3. Create ebtables rules, to filter below the ip layer (layer 2) see the repo for an example.
- waittrtwut 9y agoFor #2 did you mean CAP_NET_RAW or CAP_SYS_RAWIO?
- bthornbury 9y agoCAP_SYS_RAWIO looks even more terrifying, but CAP_NET_RAW gates your ability to use raw sockets. https://linux.die.net/man/7/capabilities https://linux.die.net/man/7/capabilities
- contingencies 9y agoI raised this stuff in 2014. https://github.com/moby/moby/issues/5661 https://github.com/moby/moby/issues/5661