<div dir="ltr"><div>Hi,</div><div><br></div><div>(Not sure it's the right mailing-list to discuss about this, tell me if it's another one)</div><div><br></div><div>For your information, systemd offers several options to increase the security of each daemon based on cgroups, like Docker or rkt.</div><div>For example: <a href="https://www.freedesktop.org/software/systemd/man/systemd.exec.html#Capabilities">https://www.freedesktop.org/software/systemd/man/systemd.exec.html#Capabilities</a></div><div><br></div><div>This approach permits to keep the classical Linux distribution daemons with simple maintenance actions via apt or yum + the same container security as a Docker image.</div><div><br></div><div>A discussion has already started on Debian tracker:</div><a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863841">https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863841</a><div><br></div><div>Based on this proposal, I made a new service override with extra security (see below).</div><div><br></div><div>But now, I need your help for two parameters of systemd:</div><div>1. The list of minimal capabilities needed for bind to run correctly: <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html">http://man7.org/linux/man-pages/man7/capabilities.7.html</a></div><div>2. The list of minimal SystemCallFilter: <a href="https://www.freedesktop.org/software/systemd/man/systemd.exec.html#SystemCallFilter=">https://www.freedesktop.org/software/systemd/man/systemd.exec.html#SystemCallFilter=</a></div><div><br></div><div>Where I could find the lists ?</div><div><br></div><div>If you have other ideas to increase the security, I'm interested in:</div><div>My objective is to propose this service file to be integrated in Debian and Fedora.</div><div><br></div><div>Thanks for your feedback.</div><div><br></div><div>The service override:</div><div><br></div><div><div>[Service]</div><div>CapabilityBoundingSet=CAP_DAC_OVERRIDE CAP_NET_BIND_SERVICE CAP_SETGID CAP_SETUID<br></div><div>SystemCallFilter=~@mount @debug</div><div>NoNewPrivileges=true</div><div>PrivateDevices=true</div><div>PrivateTmp=true</div><div>ProtectHome=true</div><div>ProtectSystem=strict</div><div>ProtectKernelModules=true</div><div>ProtectKernelTunables=true</div><div>ProtectControlGroups=true</div><div>InaccessiblePaths=/home<br></div><div>InaccessiblePaths=/opt<br></div><div>InaccessiblePaths=/root</div><div>ReadWritePaths=/run/named<br></div><div>ReadWritePaths=/var/cache/bind</div><div>ReadWritePaths=/var/lib/bind</div><div><br></div><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr">--<br><div style="font-size:small"><div>Ludovic Gasc (GMLudo)</div></div></div></div></div></div></div></div>
</div></div>