From 2daf4331a648cc2df6982c1a6ec47a705e038255 Mon Sep 17 00:00:00 2001 From: Radosław Piliszek Date: Mon, 29 Aug 2022 18:13:34 +0000 Subject: 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 --- docker/keystone/keystone-base/Dockerfile.j2 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'docker/keystone') diff --git a/docker/keystone/keystone-base/Dockerfile.j2 b/docker/keystone/keystone-base/Dockerfile.j2 index 0415e0ace..a3e5b73f7 100644 --- a/docker/keystone/keystone-base/Dockerfile.j2 +++ b/docker/keystone/keystone-base/Dockerfile.j2 @@ -39,11 +39,9 @@ RUN ln -s keystone-base-source/* keystone \ && mkdir -p /etc/keystone /var/www/cgi-bin/keystone \ && cp -r /keystone/etc/* /etc/keystone/ \ && cp /var/lib/kolla/venv/bin/keystone-wsgi-admin /var/www/cgi-bin/keystone/admin \ - && cp /var/lib/kolla/venv/bin/keystone-wsgi-public /var/www/cgi-bin/keystone/main \ - && chown -R keystone: /etc/keystone /var/www/cgi-bin/keystone + && cp /var/lib/kolla/venv/bin/keystone-wsgi-public /var/www/cgi-bin/keystone/main {% endblock %} -RUN chown -R keystone: /var/www/cgi-bin/keystone \ - && chmod 755 /var/www/cgi-bin/keystone/* +RUN chmod 755 /var/www/cgi-bin/keystone/* {% block keystone_base_footer %}{% endblock %} -- cgit v1.2.3