summaryrefslogtreecommitdiff
path: root/docker/ironic
diff options
context:
space:
mode:
authorRadosław Piliszek <radoslaw.piliszek@gmail.com>2022-08-29 18:13:34 +0000
committerRadosław Piliszek <radoslaw.piliszek@gmail.com>2022-10-10 15:06:05 +0000
commit2daf4331a648cc2df6982c1a6ec47a705e038255 (patch)
tree9fe722152766faad365172b1ae442bf76453ef47 /docker/ironic
parentb8a352647d57d35463e551a0d360c19fb2ad34c6 (diff)
downloadkolla-2daf4331a648cc2df6982c1a6ec47a705e038255.tar.gz
kolla-2daf4331a648cc2df6982c1a6ec47a705e038255.zip
Fix writable rootwrap/privsep config
Fixes a hypothetical security issue related to privilege escalation via rootwrap/privsep. A potential vulnerable service could previously allow writes to its rootwrap/privsep config and thus allow for more commands to be run with root privileges via rootwrap/privsep. For a succesful attack, this would also require the service to allow to run arbitrary commands via rootwrap/privsep. Thus far, no such vulnerabilities have been reported and thus this fix is simply strengthening the container images against such an issue in the future. Change-Id: I92c81c77e6a16570a108cde8031f7977930fb02a Closes-Bug: #1874298
Diffstat (limited to 'docker/ironic')
-rw-r--r--docker/ironic/ironic-base/Dockerfile.j24
1 files changed, 1 insertions, 3 deletions
diff --git a/docker/ironic/ironic-base/Dockerfile.j2 b/docker/ironic/ironic-base/Dockerfile.j2
index 210e6e905..aced0b709 100644
--- a/docker/ironic/ironic-base/Dockerfile.j2
+++ b/docker/ironic/ironic-base/Dockerfile.j2
@@ -22,12 +22,10 @@ RUN ln -s ironic-base-source/* ironic \
&& {{ macros.install_pip(ironic_base_pip_packages | customizable("pip_packages")) }} \
&& mkdir -p /etc/ironic \
&& cp -r /var/lib/kolla/venv/etc/ironic/* /etc/ironic/ \
- && chown -R ironic: /etc/ironic \
&& sed -i 's|^exec_dirs.*|exec_dirs=/var/lib/kolla/venv/bin,/sbin,/usr/sbin,/bin,/usr/bin,/usr/local/bin,/usr/local/sbin|g' /etc/ironic/rootwrap.conf \
&& chmod 750 /etc/sudoers.d \
&& chmod 440 /etc/sudoers.d/kolla_ironic_sudoers \
&& touch /usr/local/bin/kolla_ironic_extend_start \
- && chmod 644 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_ironic_extend_start \
- && chown -R ironic: /etc/ironic
+ && chmod 644 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_ironic_extend_start
{% block ironic_base_footer %}{% endblock %}