From davanum at gmail.com Sun Mar 1 17:49:24 2015 From: davanum at gmail.com (Davanum Srinivas (DIMS)) Date: Sun, 01 Mar 2015 17:49:24 -0000 Subject: [Openstack-security] [Bug 1368073] Re: [Security-NIST]SimpleDH in nova/virt/xenapi/agent.py does not fit the NIST References: <20140911075020.4966.25460.malonedeb@wampee.canonical.com> Message-ID: <20150301174925.17597.70490.launchpad@gac.canonical.com> ** Summary changed: - [Security-NIST]SimpleDH in nova/virt/xenapi/agent.py does not fit the NIST + [Security-NIST]SimpleDH in nova/virt/xenapi/agent.py does not fit the NIST -- You received this bug notification because you are a member of OpenStack Security Group, which is subscribed to OpenStack. https://bugs.launchpad.net/bugs/1368073 Title: [Security-NIST]SimpleDH in nova/virt/xenapi/agent.py does not fit the NIST Status in OpenStack Compute (Nova): Confirmed Status in OpenStack Security Advisories: Won't Fix Bug description: class SimpleDH(object): """This class wraps all the functionality needed to implement basic Diffie-Hellman-Merkle key exchange in Python. It features intelligent defaults for the prime and base numbers needed for the calculation, while allowing you to supply your own. It requires that the openssl binary be installed on the system on which this is run, as it uses that to handle the encryption and decryption. If openssl is not available, a RuntimeError will be raised. """ def __init__(self): self._prime = 162259276829213363391578010288127 self._base = 5 self._public = None self._shared = None self.generate_private() def generate_private(self): self._private = int(binascii.hexlify(os.urandom(10)), 16) return self._private def get_public(self): self._public = pow(self._base, self._private, self._prime) return self._public def compute_shared(self, other): self._shared = pow(other, self._private, self._prime) return self._shared def _run_ssl(self, text, decrypt=False): cmd = ['openssl', 'aes-128-cbc', '-A', '-a', '-pass', 'pass:%s' % self._shared, '-nosalt'] if decrypt: cmd.append('-d') out, err = utils.execute(*cmd, process_input=text) if err: raise RuntimeError(_('OpenSSL error: %s') % err) return out def encrypt(self, text): return self._run_ssl(text).strip('\n') def decrypt(self, text): return self._run_ssl(text, decrypt=True)  Nova use the SimpleDH to call the xen agent to set the root password of the instance. In NIST, the DH algorithm need |p| = 2048 bit, and |q| = 224 or 256 bits In the SimpleDH, |q| = int(binascii.hexlify(os.urandom(10)), 16) It was only 24*4 = 96bit p = 162259276829213363391578010288127 is far less than 2048 bit So the SimpleDH is not fit the NIST To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1368073/+subscriptions From gmollett at redhat.com Sun Mar 1 22:04:04 2015 From: gmollett at redhat.com (Garth Mollett) Date: Mon, 02 Mar 2015 09:04:04 +1100 Subject: [Openstack-security] Host and Network Intrusion detection In-Reply-To: References: <5D7F9996EA547448BC6C54C8C5AAF4E501026310F1@CERNXCHG41.cern.ch> Message-ID: <54F38CD4.3050708@redhat.com> I proposed a project for students at a local university here, that was sort of along these lines: http://cs.anu.edu.au/TechLauncher/project540627.html I had planned to post about it on this list once the students had some ground work to show, unfortunately at this stage it looks like it hasn't got enough expression of interest from students to actually go ahead and run. On 02/15/2015 10:17 AM, matt wrote: > tap as a service will be very useful in this if it ever gets written and > merged. =/ > > On Sat, Feb 14, 2015 at 12:31 PM, Sriram Subramanian > wrote: > >> Tim - did you get any response on this? >> >> On Tue, Jan 6, 2015 at 10:39 AM, Tim Bell wrote: >> >>> >>> >>> I asked on the operators list but someone suggested I ask here. >>> >>> Does anyone have experience of open source host and network intrusion >>> detection with OpenStack ? >>> >>> The security guide has mention of a few systems but it is not clear on >>> the operational and performance impact of the different choices. The aim >>> would be to identify anomalous traffic out of the permitted computing >>> policies over 1000s of hypervisors. >>> >>> Tim >>> >>> >>> >>> _______________________________________________ >>> Openstack-security mailing list >>> Openstack-security at lists.openstack.org >>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-security >>> >>> >> >> >> -- >> Thanks, >> -Sriram >> 425-610-8465 >> www.sriramhere.com | www.clouddon.com >> >> _______________________________________________ >> Openstack-security mailing list >> Openstack-security at lists.openstack.org >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-security >> >> > > > > _______________________________________________ > Openstack-security mailing list > Openstack-security at lists.openstack.org > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-security > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From 1404862 at bugs.launchpad.net Mon Mar 2 13:00:49 2015 From: 1404862 at bugs.launchpad.net (Darren Birkett) Date: Mon, 02 Mar 2015 13:00:49 -0000 Subject: [Openstack-security] [Bug 1404862] Re: Horizon SSL configuration vulnerable References: <20141222115556.21788.73486.malonedeb@gac.canonical.com> Message-ID: <20150302130051.19703.24151.launchpad@wampee.canonical.com> ** Changed in: openstack-ansible/juno Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of OpenStack Security Group, which is subscribed to OpenStack. https://bugs.launchpad.net/bugs/1404862 Title: Horizon SSL configuration vulnerable Status in Ansible playbooks for deploying OpenStack: Fix Committed Status in openstack-ansible icehouse series: Fix Released Status in openstack-ansible juno series: Fix Released Bug description: Currently the Apache configuration for Horizon is very simple and therefore vulnerable to various forms of SSL and TLS attack vectors. The Qualys SSL test on the default setup results in a C grading. In order to ensure that best practices are implemented and anyone using os-ansible-deployment has a secure by default setup, this needs to be addressed. To manage notifications about this bug go to: https://bugs.launchpad.net/openstack-ansible/+bug/1404862/+subscriptions From 1404862 at bugs.launchpad.net Mon Mar 2 13:11:12 2015 From: 1404862 at bugs.launchpad.net (Darren Birkett) Date: Mon, 02 Mar 2015 13:11:12 -0000 Subject: [Openstack-security] [Bug 1404862] Re: Horizon SSL configuration vulnerable References: <20141222115556.21788.73486.malonedeb@gac.canonical.com> Message-ID: <20150302131113.17393.24202.launchpad@gac.canonical.com> ** Changed in: openstack-ansible/icehouse Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of OpenStack Security Group, which is subscribed to OpenStack. https://bugs.launchpad.net/bugs/1404862 Title: Horizon SSL configuration vulnerable Status in Ansible playbooks for deploying OpenStack: Fix Committed Status in openstack-ansible icehouse series: Fix Released Status in openstack-ansible juno series: Fix Released Bug description: Currently the Apache configuration for Horizon is very simple and therefore vulnerable to various forms of SSL and TLS attack vectors. The Qualys SSL test on the default setup results in a C grading. In order to ensure that best practices are implemented and anyone using os-ansible-deployment has a secure by default setup, this needs to be addressed. To manage notifications about this bug go to: https://bugs.launchpad.net/openstack-ansible/+bug/1404862/+subscriptions From gerrit2 at review.openstack.org Tue Mar 3 10:22:03 2015 From: gerrit2 at review.openstack.org (gerrit2 at review.openstack.org) Date: Tue, 03 Mar 2015 10:22:03 +0000 Subject: [Openstack-security] [openstack/glance] SecurityImpact review request change I60b42d5a5d71602be7adc321406ea87dfcf93f46 Message-ID: Hi, I'd like you to take a look at this patch for potential SecurityImpact. https://review.openstack.org/158480 Log: commit 7f0b2c98a55dbac09b82a237f8670e8910e8b793 Author: Geetika Batra Date: Tue Feb 24 04:32:51 2015 +0530 Fixes insecure use of asserts in cache.py The assert statement is replaced by if image_id == 'detail': continue As stated in the Python documentation assert statements will not be evaluated when the Python code is compiled with optimization flags. This means that these checks will not be properly executed and one can in that case call a specific method with a completely different HTTP verb. This can result in security issues. SecurityImpact Closes-bug: #1414532 Change-Id: I60b42d5a5d71602be7adc321406ea87dfcf93f46 From gerrit2 at review.openstack.org Tue Mar 3 10:45:53 2015 From: gerrit2 at review.openstack.org (gerrit2 at review.openstack.org) Date: Tue, 03 Mar 2015 10:45:53 +0000 Subject: [Openstack-security] [openstack/glance] SecurityImpact review request change I60b42d5a5d71602be7adc321406ea87dfcf93f46 Message-ID: Hi, I'd like you to take a look at this patch for potential SecurityImpact. https://review.openstack.org/158480 Log: commit 565566f417876a84ae815a7381d93d62597a9196 Author: Geetika Batra Date: Tue Feb 24 04:32:51 2015 +0530 Fixes insecure use of asserts in cache.py The assert statement is replaced by if image_id == 'detail': continue As stated in the Python documentation assert statements will not be evaluated when the Python code is compiled with optimization flags. This means that these checks will not be properly executed and one can in that case call a specific method with a completely different HTTP verb. This can result in security issues. SecurityImpact Closes-bug: #1414532 Change-Id: I60b42d5a5d71602be7adc321406ea87dfcf93f46 From gerrit2 at review.openstack.org Tue Mar 3 21:14:33 2015 From: gerrit2 at review.openstack.org (gerrit2 at review.openstack.org) Date: Tue, 03 Mar 2015 21:14:33 +0000 Subject: [Openstack-security] [openstack/glance] SecurityImpact review request change I0196a6f327c0147f897ae051ee60a8cb11b8fd40 Message-ID: Hi, I'd like you to take a look at this patch for potential SecurityImpact. https://review.openstack.org/159129 Log: commit 02c43e58388ca3daea5efc166d53930596f74741 Author: Flavio Percoco Date: Wed Feb 25 14:50:06 2015 +0100 Basic support for image conversion This patch adds a task for image conversion. It uses `qemu-img` to convert images. This tool has support for several image formats. The current implementation converts images if and only if the operator has configured glance to do so. That is, the `convert_to_format` option has been set. There are few things about this patch that should be improved by follow-up patches. The first one is the fact that it relies on the entry_points order for task execution. Although this works, it is not the most flexible/controllable way to do it. The second thing is that it relies on the aforementioned configuration option to enable/disable the task (as in, it becomes a non-op). There should be an explicit way to enable/disable tasks. Since both things mentioned in the previous paragraph affect the task management in general, I've decided to let the fix for a follow-up patch. DocImpact SecurityImpact Partially-implements blueprint: new-upload-workflow Partially-implements blueprint: basic-import-conversion Change-Id: I0196a6f327c0147f897ae051ee60a8cb11b8fd40 From gerrit2 at review.openstack.org Wed Mar 4 12:12:35 2015 From: gerrit2 at review.openstack.org (gerrit2 at review.openstack.org) Date: Wed, 04 Mar 2015 12:12:35 +0000 Subject: [Openstack-security] [openstack/glance] SecurityImpact review request change I0196a6f327c0147f897ae051ee60a8cb11b8fd40 Message-ID: Hi, I'd like you to take a look at this patch for potential SecurityImpact. https://review.openstack.org/159129 Log: commit ec06b3653f471c4317eb1089983637d68974375d Author: Flavio Percoco Date: Wed Feb 25 14:50:06 2015 +0100 Basic support for image conversion This patch adds a task for image conversion. It uses `qemu-img` to convert images. This tool has support for several image formats. The current implementation converts images if and only if the operator has configured glance to do so. That is, the `convert_to_format` option has been set. There are few things about this patch that should be improved by follow-up patches. The first one is the fact that it relies on the entry_points order for task execution. Although this works, it is not the most flexible/controllable way to do it. The second thing is that it relies on the aforementioned configuration option to enable/disable the task (as in, it becomes a non-op). There should be an explicit way to enable/disable tasks. Since both things mentioned in the previous paragraph affect the task management in general, I've decided to let the fix for a follow-up patch. DocImpact SecurityImpact Partially-implements blueprint: new-upload-workflow Partially-implements blueprint: basic-import-conversion Change-Id: I0196a6f327c0147f897ae051ee60a8cb11b8fd40 From davanum at gmail.com Wed Mar 4 13:10:20 2015 From: davanum at gmail.com (Davanum Srinivas (DIMS)) Date: Wed, 04 Mar 2015 13:10:20 -0000 Subject: [Openstack-security] [Bug 1118066] Re: Nova should confirm quota requests against Keystone References: <20130207064604.19234.83660.malonedeb@gac.canonical.com> Message-ID: <20150304131020.12978.72982.malone@chaenomeles.canonical.com> There are no reviews, so this should not be in "In Progress" ** Changed in: nova Status: In Progress => Confirmed -- You received this bug notification because you are a member of OpenStack Security Group, which is subscribed to OpenStack. https://bugs.launchpad.net/bugs/1118066 Title: Nova should confirm quota requests against Keystone Status in OpenStack Compute (Nova): Confirmed Bug description: os-quota-sets API should check requests for /v2/:tenant/os-quota-sets/ against Keystone to ensure that :tenant does exist. POST requests to a non-existant tenant should fail with a 400 error code. GET requests to a non-existant tenant may fail with a 400 error code. Current behavior is to return 200 with the default quotas. A slightly incompatible change would be to return a 302 redirect to /v2/:tenant /os-quota-sets/defaults in this case. Edit (2014-01-22) Original Description -------------------- GET /v2/:tenant/os-quota-sets/:this_tenant_does_not_exist returns 200 with the default quotas. Moreover POST /v2/:tenant/os-quota-sets/:this_tenant_does_not_exist with updated quotas succeeds and that metadata is saved! I'm not sure if this is a bug or not. I cannot find any documentation on this interface. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1118066/+subscriptions From gerrit2 at review.openstack.org Wed Mar 4 13:53:56 2015 From: gerrit2 at review.openstack.org (gerrit2 at review.openstack.org) Date: Wed, 04 Mar 2015 13:53:56 +0000 Subject: [Openstack-security] [openstack/glance] SecurityImpact review request change I0196a6f327c0147f897ae051ee60a8cb11b8fd40 Message-ID: Hi, I'd like you to take a look at this patch for potential SecurityImpact. https://review.openstack.org/159129 Log: commit 9e6e87c772ba929d15c6bdb819f0f1b9a92a40ef Author: Flavio Percoco Date: Wed Feb 25 14:50:06 2015 +0100 Basic support for image conversion This patch adds a task for image conversion. It uses `qemu-img` to convert images. This tool has support for several image formats. The current implementation converts images if and only if the operator has configured glance to do so. That is, the `convert_to_format` option has been set. There are few things about this patch that should be improved by follow-up patches. The first one is the fact that it relies on the entry_points order for task execution. Although this works, it is not the most flexible/controllable way to do it. The second thing is that it relies on the aforementioned configuration option to enable/disable the task (as in, it becomes a non-op). There should be an explicit way to enable/disable tasks. Since both things mentioned in the previous paragraph affect the task management in general, I've decided to let the fix for a follow-up patch. DocImpact SecurityImpact Partially-implements blueprint: new-upload-workflow Partially-implements blueprint: basic-import-conversion Change-Id: I0196a6f327c0147f897ae051ee60a8cb11b8fd40 From 1187107 at bugs.launchpad.net Wed Mar 4 17:20:56 2015 From: 1187107 at bugs.launchpad.net (OpenStack Infra) Date: Wed, 04 Mar 2015 17:20:56 -0000 Subject: [Openstack-security] [Bug 1187107] Re: quantum-ns-metadata-proxy runs as root References: <20130603194234.27198.32504.malonedeb@gac.canonical.com> Message-ID: <20150304172056.21337.19785.malone@soybean.canonical.com> Reviewed: https://review.openstack.org/147437 Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=ac6cf685176c3a985a71174b9e8f0161068e38e0 Submitter: Jenkins Branch: master commit ac6cf685176c3a985a71174b9e8f0161068e38e0 Author: Cedric Brandily Date: Wed Jan 7 23:12:20 2015 +0000 Do not run neutron-ns-metadata-proxy as root on dhcp agent Currently neutron-ns-metadata-proxy runs with root permissions when namespaces are enabled on the dhcp agent because root permissions are required to "enter" in the namespace. But neutron-ns-metadata-proxy permissions should be reduced as much as possible because it is reachable from vms. This change allows to change neutron-ns-metadata-proxy permissions after its startup through the 2 new options metadata_proxy_user and metadata_proxy_group which allow to define user/group running metadata proxy after its initialization. Their default values are neutron-dhcp-agent effective user and group. This change delegates metadata proxy management to metadata driver methods in order to reuse the work already done on l3 agent side. Permissions drop is done after metadata proxy daemon writes its pid in its pidfile (it could be disallowed after permissions drop) and after metadata proxy daemon binds its privileged server port (80). Using nobody as metadata_proxy_user/group (more secure) is currently not supported because: * nobody has not the permission to connect the metadata socket, * nobody has not the permission to log to file because neutron uses WatchedFileHandler (which requires read/write permissions after permissions drop). This limitation will be addressed in a daughter change. DocImpact Closes-Bug: #1187107 Change-Id: I53e97254d560e608101010f67bd2dcdec81fb6a2 ** Changed in: neutron Status: In Progress => Fix Committed -- You received this bug notification because you are a member of OpenStack Security Group, which is subscribed to OpenStack. https://bugs.launchpad.net/bugs/1187107 Title: quantum-ns-metadata-proxy runs as root Status in OpenStack Neutron (virtual network service): Fix Committed Bug description: # ps -ef | grep quantum-ns-metadata-proxy root 10239 1 0 19:01 ? 00:00:00 python /usr/bin/quantum-ns-metadata-proxy --pid_file=/var/lib/quantum/external/pids/7a44de32-3ac0-4f3e-92cc-1a37d8211db8.pid --router_id=7a44de32-3ac0-4f3e-92cc-1a37d8211db8 --state_path=/var/lib/quantum --debug --log-file=quantum-ns-metadata-proxy7a44de32-3ac0-4f3e-92cc-1a37d8211db8.log --log-dir=/var/log/quantum Root is needed to open the namespace, but the quantum-ns-metadata-proxy does not need root - it listens on 9697 by default not 80. I tried changing /etc/quantum/rootwrap.d/l3.filters for it to run as quantum instead: metadata_proxy: CommandFilter, /usr/bin/quantum-ns-metadata-proxy, quantum but it still runs as root. To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1187107/+subscriptions From 1361360 at bugs.launchpad.net Wed Mar 4 22:41:14 2015 From: 1361360 at bugs.launchpad.net (Alan Pevec) Date: Wed, 04 Mar 2015 22:41:14 -0000 Subject: [Openstack-security] [Bug 1361360] Re: Eventlet green threads not released back to the pool leading to choking of new requests References: <20140825203231.13086.48412.malonedeb@wampee.canonical.com> Message-ID: <20150304224119.6132.51927.launchpad@wampee.canonical.com> ** Changed in: nova/icehouse Importance: Undecided => High ** Changed in: nova/icehouse Status: New => In Progress ** Changed in: nova/icehouse Milestone: None => 2014.1.4 -- You received this bug notification because you are a member of OpenStack Security Group, which is subscribed to OpenStack. https://bugs.launchpad.net/bugs/1361360 Title: Eventlet green threads not released back to the pool leading to choking of new requests Status in Cinder: Fix Released Status in Cinder icehouse series: Fix Committed Status in Cinder juno series: Fix Released Status in OpenStack Image Registry and Delivery Service (Glance): In Progress Status in Glance icehouse series: In Progress Status in Orchestration API (Heat): In Progress Status in OpenStack Identity (Keystone): In Progress Status in Keystone icehouse series: Confirmed Status in Keystone juno series: Fix Committed Status in OpenStack Neutron (virtual network service): Fix Released Status in neutron icehouse series: New Status in neutron juno series: Fix Committed Status in OpenStack Compute (Nova): Fix Released Status in OpenStack Compute (nova) icehouse series: In Progress Status in OpenStack Security Advisories: Won't Fix Status in OpenStack Data Processing (Sahara): New Bug description: Currently reproduced on Juno milestone 2. but this issue should be reproducible in all releases since its inception. It is possible to choke OpenStack API controller services using wsgi+eventlet library by simply not closing the client socket connection. Whenever a request is received by any OpenStack API service for example nova api service, eventlet library creates a green thread from the pool and starts processing the request. Even after the response is sent to the caller, the green thread is not returned back to the pool until the client socket connection is closed. This way, any malicious user can send many API requests to the API controller node and determine the wsgi pool size configured for the given service and then send those many requests to the service and after receiving the response, wait there infinitely doing nothing leading to disrupting services for other tenants. Even when service providers have enabled rate limiting feature, it is possible to choke the API services with a group (many tenants) attack. Following program illustrates choking of nova-api services (but this problem is omnipresent in all other OpenStack API Services using wsgi+eventlet) Note: I have explicitly set the wsi_default_pool_size default value to 10 in order to reproduce this problem in nova/wsgi.py. After you run the below program, you should try to invoke API ============================================================================================ import time import requests from multiprocessing import Process def request(number): #Port is important here path = 'http://127.0.0.1:8774/servers' try: response = requests.get(path) print "RESPONSE %s-%d" % (response.status_code, number) #during this sleep time, check if the client socket connection is released or not on the API controller node. time.sleep(1000) print “Thread %d complete" % number except requests.exceptions.RequestException as ex: print “Exception occurred %d-%s" % (number, str(ex)) if __name__ == '__main__': processes = [] for number in range(40): p = Process(target=request, args=(number,)) p.start() processes.append(p) for p in processes: p.join() ================================================================================================ Presently, the wsgi server allows persist connections if you configure keepalive to True which is default. In order to close the client socket connection explicitly after the response is sent and read successfully by the client, you simply have to set keepalive to False when you create a wsgi server. Additional information: By default eventlet passes “Connection: keepalive” if keepalive is set to True when a response is sent to the client. But it doesn’t have capability to set the timeout and max parameter. For example. Keep-Alive: timeout=10, max=5 Note: After we have disabled keepalive in all the OpenStack API service using wsgi library, then it might impact all existing applications built with the assumptions that OpenStack API services uses persistent connections. They might need to modify their applications if reconnection logic is not in place and also they might experience the performance has slowed down as it will need to reestablish the http connection for every request. To manage notifications about this bug go to: https://bugs.launchpad.net/cinder/+bug/1361360/+subscriptions From gerrit2 at review.openstack.org Wed Mar 4 23:34:03 2015 From: gerrit2 at review.openstack.org (gerrit2 at review.openstack.org) Date: Wed, 04 Mar 2015 23:34:03 +0000 Subject: [Openstack-security] [openstack/glance] SecurityImpact review request change I0196a6f327c0147f897ae051ee60a8cb11b8fd40 Message-ID: Hi, I'd like you to take a look at this patch for potential SecurityImpact. https://review.openstack.org/159129 Log: commit e8628e676127085f6ea81286625f5e6537a258c5 Author: Flavio Percoco Date: Wed Feb 25 14:50:06 2015 +0100 Basic support for image conversion This patch adds a task for image conversion. It uses `qemu-img` to convert images. This tool has support for several image formats. The current implementation converts images if and only if the operator has configured glance to do so. That is, the `convert_to_format` option has been set. There are few things about this patch that should be improved by follow-up patches. The first one is the fact that it relies on the entry_points order for task execution. Although this works, it is not the most flexible/controllable way to do it. The second thing is that it relies on the aforementioned configuration option to enable/disable the task (as in, it becomes a non-op). There should be an explicit way to enable/disable tasks. Since both things mentioned in the previous paragraph affect the task management in general, I've decided to let the fix for a follow-up patch. DocImpact SecurityImpact Partially-implements blueprint: new-upload-workflow Partially-implements blueprint: basic-import-conversion Change-Id: I0196a6f327c0147f897ae051ee60a8cb11b8fd40 From 1361360 at bugs.launchpad.net Thu Mar 5 01:06:18 2015 From: 1361360 at bugs.launchpad.net (OpenStack Infra) Date: Thu, 05 Mar 2015 01:06:18 -0000 Subject: [Openstack-security] [Bug 1361360] Fix merged to nova (stable/icehouse) References: <20140825203231.13086.48412.malonedeb@wampee.canonical.com> Message-ID: <20150305010618.29031.85172.malone@chaenomeles.canonical.com> Reviewed: https://review.openstack.org/138811 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=a657582c5cd8a39580c44ad401fd3e69870068b1 Submitter: Jenkins Branch: stable/icehouse commit a657582c5cd8a39580c44ad401fd3e69870068b1 Author: abhishekkekane Date: Tue Oct 21 01:37:42 2014 -0700 Eventlet green threads not released back to pool Presently, the wsgi server allows persist connections hence even after the response is sent to the client, it doesn't close the client socket connection. Because of this problem, the green thread is not released back to the pool. In order to close the client socket connection explicitly after the response is sent and read successfully by the client, you simply have to set keepalive to False when you create a wsgi server. Add a parameter to take advantage of the new(ish) eventlet socket timeout behaviour. Allows closing idle client connections after a period of time, eg: $ time nc localhost 8776 real 1m0.063s Setting 'client_socket_timeout = 0' means do not timeout. DocImpact: Added wsgi_keep_alive option (default=True). Added client_socket_timeout option (default=0). Conflicts: nova/tests/unit/test_wsgi.py Note: The required unit-tests are manually added to the below path, as new path for unit-tests is not present in stable/icehouse release. nova/tests/compute/test_host_api.py This patch is not 1:1 cherry-pick, I have changed the default value of client_socket_timeout to 0, as per the policy for changes to stable branches. (https://wiki.openstack.org/wiki/StableBranch#Appropriate_Fixes) SecurityImpact Closes-Bug: #1361360 Change-Id: I399b812f6d452226fd306c423de8dcea8520d2aa (cherry picked from commit 04d7a724fdf80db51e73f12c5b8c982db9310742) -- You received this bug notification because you are a member of OpenStack Security Group, which is subscribed to OpenStack. https://bugs.launchpad.net/bugs/1361360 Title: Eventlet green threads not released back to the pool leading to choking of new requests Status in Cinder: Fix Released Status in Cinder icehouse series: Fix Committed Status in Cinder juno series: Fix Released Status in OpenStack Image Registry and Delivery Service (Glance): In Progress Status in Glance icehouse series: In Progress Status in Orchestration API (Heat): In Progress Status in OpenStack Identity (Keystone): In Progress Status in Keystone icehouse series: Confirmed Status in Keystone juno series: Fix Committed Status in OpenStack Neutron (virtual network service): Fix Released Status in neutron icehouse series: New Status in neutron juno series: Fix Committed Status in OpenStack Compute (Nova): Fix Released Status in OpenStack Compute (nova) icehouse series: In Progress Status in OpenStack Security Advisories: Won't Fix Status in OpenStack Data Processing (Sahara): New Bug description: Currently reproduced on Juno milestone 2. but this issue should be reproducible in all releases since its inception. It is possible to choke OpenStack API controller services using wsgi+eventlet library by simply not closing the client socket connection. Whenever a request is received by any OpenStack API service for example nova api service, eventlet library creates a green thread from the pool and starts processing the request. Even after the response is sent to the caller, the green thread is not returned back to the pool until the client socket connection is closed. This way, any malicious user can send many API requests to the API controller node and determine the wsgi pool size configured for the given service and then send those many requests to the service and after receiving the response, wait there infinitely doing nothing leading to disrupting services for other tenants. Even when service providers have enabled rate limiting feature, it is possible to choke the API services with a group (many tenants) attack. Following program illustrates choking of nova-api services (but this problem is omnipresent in all other OpenStack API Services using wsgi+eventlet) Note: I have explicitly set the wsi_default_pool_size default value to 10 in order to reproduce this problem in nova/wsgi.py. After you run the below program, you should try to invoke API ============================================================================================ import time import requests from multiprocessing import Process def request(number): #Port is important here path = 'http://127.0.0.1:8774/servers' try: response = requests.get(path) print "RESPONSE %s-%d" % (response.status_code, number) #during this sleep time, check if the client socket connection is released or not on the API controller node. time.sleep(1000) print “Thread %d complete" % number except requests.exceptions.RequestException as ex: print “Exception occurred %d-%s" % (number, str(ex)) if __name__ == '__main__': processes = [] for number in range(40): p = Process(target=request, args=(number,)) p.start() processes.append(p) for p in processes: p.join() ================================================================================================ Presently, the wsgi server allows persist connections if you configure keepalive to True which is default. In order to close the client socket connection explicitly after the response is sent and read successfully by the client, you simply have to set keepalive to False when you create a wsgi server. Additional information: By default eventlet passes “Connection: keepalive” if keepalive is set to True when a response is sent to the client. But it doesn’t have capability to set the timeout and max parameter. For example. Keep-Alive: timeout=10, max=5 Note: After we have disabled keepalive in all the OpenStack API service using wsgi library, then it might impact all existing applications built with the assumptions that OpenStack API services uses persistent connections. They might need to modify their applications if reconnection logic is not in place and also they might experience the performance has slowed down as it will need to reestablish the http connection for every request. To manage notifications about this bug go to: https://bugs.launchpad.net/cinder/+bug/1361360/+subscriptions From 1414532 at bugs.launchpad.net Thu Mar 5 17:21:41 2015 From: 1414532 at bugs.launchpad.net (Robert Clark) Date: Thu, 05 Mar 2015 17:21:41 -0000 Subject: [Openstack-security] [Bug 1414532] Re: asserts used in cache.py References: <20150126041237.12665.35620.malonedeb@soybean.canonical.com> Message-ID: <20150305172142.11614.40178.launchpad@gac.canonical.com> ** Changed in: ossn Assignee: (unassigned) => Robert Clark (robert-clark) -- You received this bug notification because you are a member of OpenStack Security Group, which is subscribed to OpenStack. https://bugs.launchpad.net/bugs/1414532 Title: asserts used in cache.py Status in OpenStack Image Registry and Delivery Service (Glance): In Progress Status in OpenStack Security Advisories: Won't Fix Status in OpenStack Security Notes: New Bug description: The asserts in the snippet below check at #2 to see if the HTTP method match the HTTP methods actually specified in the patterns at #1. /opt/stack/glance/glance/api/middleware/cache.py PATTERNS = { <--- #1 ('v1', 'GET'): re.compile(r'^/v1/images/([^\/]+)$'), ('v1', 'DELETE'): re.compile(r'^/v1/images/([^\/]+)$'), ('v2', 'GET'): re.compile(r'^/v2/images/([^\/]+)/file$'), ('v2', 'DELETE'): re.compile(r'^/v2/images/([^\/]+)$') } ... @staticmethod def _match_request(request): """Determine the version of the url and extract the image id :returns tuple of version and image id if the url is a cacheable, otherwise None """ for ((version, method), pattern) in PATTERNS.items(): match = pattern.match(request.path_info) try: assert request.method == method <--- #2 image_id = match.group(1) # Ensure the image id we got looks like an image id to filter # out a URI like /images/detail. See LP Bug #879136 assert image_id != 'detail' except (AttributeError, AssertionError): continue else: return (version, method, image_id) As stated in the Python documentation assert statements will not be evaluated when the Python code is compiled with optimization flags. This means that these checks will not be properly executed and one can in that case call a specific method with a completely different HTTP verb. This can result in security issues. For example think of having some filtering in place in front of the glance API to maybe allow only certain API queries to come from certain IP addresses. For example: 'the HTTP verb DELETE may only be executed from this IP range'. An attacker can now specify a completely different HTTP verb such as GET and make sure he still matches regular expressions at #1 and then bypass the firewall. It's a bit of a hypothetical scenario but in general one should never ever do error checking with assert statemetns. This should only be done for things which can never realistically fail and that is simply not an assumption one can hold when it comes to untrusted input from the network. For more information see https://docs.python.org/2/reference/simple_stmts.html#the-assert-statement and https://docs.python.org/2/using/cmdline.html#envvar-PYTHONOPTIMIZE This seems to be related to https://bugs.launchpad.net/cinder/+bug/1199354 but it's not fixed and maybe it should even be a security issue hence why I reported it again and tagged as a security vulnerability. I am not familiar enough with the code base to make that call. To manage notifications about this bug go to: https://bugs.launchpad.net/glance/+bug/1414532/+subscriptions From gerrit2 at review.openstack.org Fri Mar 6 05:21:03 2015 From: gerrit2 at review.openstack.org (gerrit2 at review.openstack.org) Date: Fri, 06 Mar 2015 05:21:03 +0000 Subject: [Openstack-security] [openstack/keystonemiddleware] SecurityImpact review request change Ic9402ef35ce3dd7c905d868a9eff7db5f3a4a40b Message-ID: Hi, I'd like you to take a look at this patch for potential SecurityImpact. https://review.openstack.org/153247 Log: commit c682b07a4f7ce8d66dbee9976582edf0bc3ff2c6 Author: Alistair Coles Date: Thu Feb 5 15:01:50 2015 +0000 Delay denial when service token is invalid This patch modifies AuthProtocol to defer authentication to a downstream service if an invalid service token is found and delay_auth_decision is True. This makes the behavior for an invalid service token similar to that for an invalid user token. This is required by Swift because multiple auth middlewares may co-exist, and auth_token will currently deny a request on detecting an invalid service token when that service token is in fact intended to be validated by another downstream auth middleware. This is precisely the configuration used in devstack which configures both authtoken and tempauth in the Swift proxy pipeline [1]. Swift support for service tokens is currently in review [2] and functional tests will not pass using devstack without the change proposed here. [1] https://github.com/openstack-dev/devstack/blob/master/lib/swift#L396 [2] change I6072b4efb3a479a8e0cc2d9c11ffda5764b55e30 DocImpact SecurityImpact Closes-Bug: #1422389 Change-Id: Ic9402ef35ce3dd7c905d868a9eff7db5f3a4a40b From gerrit2 at review.openstack.org Fri Mar 6 05:30:56 2015 From: gerrit2 at review.openstack.org (gerrit2 at review.openstack.org) Date: Fri, 06 Mar 2015 05:30:56 +0000 Subject: [Openstack-security] [openstack/glance-specs] SecurityImpact review request change I94428288cb6851ae74bd80b02b761f3509a188fc Message-ID: Hi, I'd like you to take a look at this patch for potential SecurityImpact. https://review.openstack.org/138051 Log: commit 6c89f3f6b44e44108807e0b59e8d6a57dd968c68 Author: Lakshmi N Sampath Date: Mon Dec 1 04:13:06 2014 -0800 Catalog Index Service Implements: blueprint catalog-index-service This is intended to improve performance of Glance API services while dramatically improving search capabilities. It will improve performance by offloading user search queries from existing API servers. In addition, we are working on numerous improvements in Horizon which will include improvements to image, snapshot, artifact details and searching. The desired user experience is greatly dependent upon a rich, dynamic, near real time faceted and aggregated search capability with a strong query language. DocImpact APIImpact SecurityImpact Change-Id: I94428288cb6851ae74bd80b02b761f3509a188fc Co-Authored-By: Lakshmi N Sampath Co-Authored-By: Travis Tripp Co-Authored-By: Murali Sundar From gerrit2 at review.openstack.org Fri Mar 6 14:18:12 2015 From: gerrit2 at review.openstack.org (gerrit2 at review.openstack.org) Date: Fri, 06 Mar 2015 14:18:12 +0000 Subject: [Openstack-security] [openstack/glance] SecurityImpact review request change I0196a6f327c0147f897ae051ee60a8cb11b8fd40 Message-ID: Hi, I'd like you to take a look at this patch for potential SecurityImpact. https://review.openstack.org/159129 Log: commit 902b1f7a31f550bec96feb1ec73297fdaef3e550 Author: Flavio Percoco Date: Wed Feb 25 14:50:06 2015 +0100 Basic support for image conversion This patch adds a task for image conversion. It uses `qemu-img` to convert images. This tool has support for several image formats. The current implementation converts images if and only if the operator has configured glance to do so. That is, the `convert_to_format` option has been set. There are few things about this patch that should be improved by follow-up patches. The first one is the fact that it relies on the entry_points order for task execution. Although this works, it is not the most flexible/controllable way to do it. The second thing is that it relies on the aforementioned configuration option to enable/disable the task (as in, it becomes a non-op). There should be an explicit way to enable/disable tasks. Since both things mentioned in the previous paragraph affect the task management in general, I've decided to let the fix for a follow-up patch. DocImpact SecurityImpact Partially-implements blueprint: new-upload-workflow Partially-implements blueprint: basic-import-conversion Change-Id: I0196a6f327c0147f897ae051ee60a8cb11b8fd40 From gerrit2 at review.openstack.org Fri Mar 6 15:35:20 2015 From: gerrit2 at review.openstack.org (gerrit2 at review.openstack.org) Date: Fri, 06 Mar 2015 15:35:20 +0000 Subject: [Openstack-security] [openstack/sahara] SecurityImpact review request change I462f2f6cdc35470f75771b5beca10899a591b46a Message-ID: Hi, I'd like you to take a look at this patch for potential SecurityImpact. https://review.openstack.org/162198 Log: commit 9b447a95902094da3d763a9ee214a0e0104c9d96 Author: Michael McCune Date: Fri Feb 27 21:47:16 2015 -0500 Adding barbican client and keymgr module This change implements the key manager abstraction module and barbican client helper for the improved secret storage spec. Changes * adding barbican module * adding keymgr module * adding a session method to the keystone module * adding tests for keymgr module * adding documentation for keymgr usage SecurityImpact Implements: blueprint improved-secret-storage Change-Id: I462f2f6cdc35470f75771b5beca10899a591b46a From gerrit2 at review.openstack.org Fri Mar 6 20:41:42 2015 From: gerrit2 at review.openstack.org (gerrit2 at review.openstack.org) Date: Fri, 06 Mar 2015 20:41:42 +0000 Subject: [Openstack-security] [openstack/glance] SecurityImpact review request change I0196a6f327c0147f897ae051ee60a8cb11b8fd40 Message-ID: Hi, I'd like you to take a look at this patch for potential SecurityImpact. https://review.openstack.org/159129 Log: commit f9e334accf0b3a3248caabd198adf43840205bf3 Author: Flavio Percoco Date: Wed Feb 25 14:50:06 2015 +0100 Basic support for image conversion This patch adds a task for image conversion. It uses `qemu-img` to convert images. This tool has support for several image formats. The current implementation converts images if and only if the operator has configured glance to do so. That is, the `convert_to_format` option has been set. There are few things about this patch that should be improved by follow-up patches. The first one is the fact that it relies on the entry_points order for task execution. Although this works, it is not the most flexible/controllable way to do it. The second thing is that it relies on the aforementioned configuration option to enable/disable the task (as in, it becomes a non-op). There should be an explicit way to enable/disable tasks. Since both things mentioned in the previous paragraph affect the task management in general, I've decided to let the fix for a follow-up patch. DocImpact SecurityImpact Partially-implements blueprint: new-upload-workflow Partially-implements blueprint: basic-import-conversion Change-Id: I0196a6f327c0147f897ae051ee60a8cb11b8fd40 From gerrit2 at review.openstack.org Fri Mar 6 22:09:33 2015 From: gerrit2 at review.openstack.org (gerrit2 at review.openstack.org) Date: Fri, 06 Mar 2015 22:09:33 +0000 Subject: [Openstack-security] [openstack/glance] SecurityImpact review request change I0196a6f327c0147f897ae051ee60a8cb11b8fd40 Message-ID: Hi, I'd like you to take a look at this patch for potential SecurityImpact. https://review.openstack.org/159129 Log: commit 81ae368d23b3e013ea717e68519130a6a5be1726 Author: Flavio Percoco Date: Wed Feb 25 14:50:06 2015 +0100 Basic support for image conversion This patch adds a task for image conversion. It uses `qemu-img` to convert images. This tool has support for several image formats. The current implementation converts images if and only if the operator has configured glance to do so. That is, the `convert_to_format` option has been set. There are few things about this patch that should be improved by follow-up patches. The first one is the fact that it relies on the entry_points order for task execution. Although this works, it is not the most flexible/controllable way to do it. The second thing is that it relies on the aforementioned configuration option to enable/disable the task (as in, it becomes a non-op). There should be an explicit way to enable/disable tasks. Since both things mentioned in the previous paragraph affect the task management in general, I've decided to let the fix for a follow-up patch. DocImpact SecurityImpact Partially-implements blueprint: new-upload-workflow Partially-implements blueprint: basic-import-conversion Change-Id: I0196a6f327c0147f897ae051ee60a8cb11b8fd40 From gerrit2 at review.openstack.org Mon Mar 9 02:47:00 2015 From: gerrit2 at review.openstack.org (gerrit2 at review.openstack.org) Date: Mon, 09 Mar 2015 02:47:00 +0000 Subject: [Openstack-security] [openstack/sahara] SecurityImpact review request change I462f2f6cdc35470f75771b5beca10899a591b46a Message-ID: Hi, I'd like you to take a look at this patch for potential SecurityImpact. https://review.openstack.org/162198 Log: commit ffff7b368200c085a49f4ae2d78edd6c58e8f9ee Author: Michael McCune Date: Fri Feb 27 21:47:16 2015 -0500 Adding barbican client and keymgr module This change implements the key manager abstraction module and barbican client helper for the improved secret storage spec. Changes * adding barbican module * adding keymgr module * adding a session method to the keystone module * adding tests for keymgr module * adding documentation for keymgr usage SecurityImpact Implements: blueprint improved-secret-storage Change-Id: I462f2f6cdc35470f75771b5beca10899a591b46a From gerrit2 at review.openstack.org Mon Mar 9 05:28:16 2015 From: gerrit2 at review.openstack.org (gerrit2 at review.openstack.org) Date: Mon, 09 Mar 2015 05:28:16 +0000 Subject: [Openstack-security] [openstack/glance-specs] SecurityImpact review request change I94428288cb6851ae74bd80b02b761f3509a188fc Message-ID: Hi, I'd like you to take a look at this patch for potential SecurityImpact. https://review.openstack.org/138051 Log: commit e4deb7fa8604f20b91327465492a8c94d312cb59 Author: Lakshmi N Sampath Date: Mon Dec 1 04:13:06 2014 -0800 Catalog Index Service Implements: blueprint catalog-index-service This is intended to improve performance of Glance API services while dramatically improving search capabilities. It will improve performance by offloading user search queries from existing API servers. In addition, we are working on numerous improvements in Horizon which will include improvements to image, snapshot, artifact details and searching. The desired user experience is greatly dependent upon a rich, dynamic, near real time faceted and aggregated search capability with a strong query language. DocImpact APIImpact SecurityImpact Change-Id: I94428288cb6851ae74bd80b02b761f3509a188fc Co-Authored-By: Lakshmi N Sampath Co-Authored-By: Travis Tripp Co-Authored-By: Murali Sundar From tsufiev at mirantis.com Mon Mar 2 11:36:49 2015 From: tsufiev at mirantis.com (Timur Sufiev) Date: Mon, 02 Mar 2015 11:36:49 -0000 Subject: [Openstack-security] [Bug 1369865] Re: Permanent Cookie Contains Sensitive Session Information References: <20140916062427.24753.72518.malonedeb@soybean.canonical.com> Message-ID: <20150302113649.17736.40171.malone@gac.canonical.com> The most obvious solution is to use the setting https://docs.djangoproject.com/en/1.7/ref/settings/#csrf-cookie-age but since it has appeared only in Django 1.7, it should wait until Horizon moves to Django 1.7. -- You received this bug notification because you are a member of OpenStack Security Group, which is subscribed to OpenStack. https://bugs.launchpad.net/bugs/1369865 Title: Permanent Cookie Contains Sensitive Session Information Status in OpenStack Dashboard (Horizon): Confirmed Bug description: Affected URL: https://Ip_address/admin/ Entity: csrftoken (Cookie) Risk: It may be possible to steal session information (cookies) that was kept on disk as permanent cookies. Causes: The web application stores sensitive session information in a permanent cookie (on disk) Recommend Fix: Avoid storing sensitive session information in permanent cookies Test requests and response: GET /admin/ HTTP/1.1 Host: 9.5.29.52 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Referer: https://9.5.29.52/ Cookie: csrftoken=JPjBiDp6Ex6YDw3sgfZPCTPUwWKZdZTm; sessionid=oad3bpy15qm8ntml9wx604yr79cc6zpb Connection: keep-alive HTTP/1.1 200 OK Date: Fri, 12 Sep 2014 07:52:50 GMT Server: Apache Vary: Accept-Language,Cookie,Accept-Encoding X-Frame-Options: SAMEORIGIN Content-Language: en Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html Set-Cookie: csrftoken=silTP6ARbLvXohF6YYFLlWHce0KZkjPy; expires=Fri, 11-Sep-2015 07:52:52 GMT; Max-Age=31449600; Path=/; secure Set-Cookie: sessionid=ygq094phgr6og471j6n0asq7x6q37j6n; httponly; Path=/; secure 2014/9/12 516 Usage Overview - Cloud Management Dashboard