<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Some of the Glance metadef APIs likely to leak resources<br>--------------------------------------------------------<br><br>### Summary ###<br>Metadef APIs are vulnerable and potentially leaking information to<br>unauthorized users and also there is currently no limit on creation<br>of metadef namespaces, objects, properties, resources and tags. This<br>can be abused by malicious users to fill the Glance database resulting<br>in a Denial of Service (DoS) condition.<br><br>### Affected Services / Software ###<br>Glance<br><br>### Discussion ###<br>There is no restriction on creation of metadef namespaces, objects,<br>properties, resources and tags as well as it could also leak the<br>information to unauthorized users or to the users outside of the project. By<br>taking advantage of this lack of restrictions around metadef APIs, a<br>a single user could fill the Glance database by creating<br>unlimited resources, resulting in a Denial Of Service (DoS) style<br>attack.<br><br>Glance does allow metadef APIs to be controlled by policy. However, the<br>default policy setting for metadef APIs allows all users to create or<br>read the metadef information.<br><br>Because metadef resources are not properly isolated to the<br>owner, any use of them with potentially sensitive names (such as internal<br>infrastructure details, customer names, etc) could unintentionally<br>expose that information to a malicious user.<br><br>### Recommended Actions ###<br>Since these fundamental issues have been present since the API was<br>introduced, the Glance project is recommending operators disable all<br>metadef APIs by default in their deployments.<br><br>Here is an example of disabling the metadef APIs in the deployments for current<br>stable OpenStack releases either in policy.json or policy.yaml.<br><br>---- begin example policy.json/policy.yaml snippet ----<br>"metadef_default": "!",<br><br>"get_metadef_namespace": "rule:metadef_default",<br>"get_metadef_namespaces": "rule:metadef_default",<br>"modify_metadef_namespace": "rule:metadef_default",<br>"add_metadef_namespace": "rule:metadef_default",<br><br>"get_metadef_object": "rule:metadef_default",<br>"get_metadef_objects": "rule:metadef_default",<br>"modify_metadef_object": "rule:metadef_default",<br>"add_metadef_object": "rule:metadef_default",<br><br>"list_metadef_resource_types": "rule:metadef_default",<br>"get_metadef_resource_type": "rule:metadef_default",<br>"add_metadef_resource_type_association": "rule:metadef_default",<br><br>"get_metadef_property": "rule:metadef_default",<br>"get_metadef_properties": "rule:metadef_default",<br>"modify_metadef_property": "rule:metadef_default",<br>"add_metadef_property": "rule:metadef_default",<br><br>"get_metadef_tag": "rule:metadef_default",<br>"get_metadef_tags": "rule:metadef_default",<br>"modify_metadef_tag": "rule:metadef_default",<br>"add_metadef_tag": "rule:metadef_default",<br>"add_metadef_tags": "rule:metadef_default"<br>---- end example policy.json/policy.yaml snippet ----<br><br>To re-enable metadef policies to be allowed to be admin only, operator(s)<br>can make a change in respective policy.json or policy.yaml as shown below;<br>(assuming all metadef policies are configured to use rule:metadeta_default<br>as shown in above example)<br><br>---- begin example policy.json/policy.yaml snippet ----<br>"metadef_default": "rule:admin",<br>---- begin example policy.json/policy.yaml snippet ----<br><br>Operators with users that depend on metadef APIs may choose to leave<br>these accessible to all users. In that case, education of users about<br>the potential for information leakage in the resource names is<br>advisable so that vulnerable practices can be altered as mitigation.<br><br>To re-enable metadef policies to all users, operator(s)<br>can make a change in respective policy.json or policy.yaml as shown below;<br>(assuming all metadef policies are configured to use rule:metadeta_default<br>as shown in above example)<br><br>---- begin example policy.json/policy.yaml snippet ----<br>"metadef_default": "",<br>---- begin example policy.json/policy.yaml snippet ----<br><br>### Contacts / References ###<br>Author: Abhishek Kekane, Red Hat<br>Author: Lance Bragstad, Red Hat<br>This OSSN : <a href="https://wiki.openstack.org/wiki/OSSN/OSSN-0088">https://wiki.openstack.org/wiki/OSSN/OSSN-0088</a><br>Original LaunchPad Bug : <a href="https://bugs.launchpad.net/glance/+bug/1545702">https://bugs.launchpad.net/glance/+bug/1545702</a><br>Original LaunchPad Bug : <a href="https://bugs.launchpad.net/glance/+bug/1916926">https://bugs.launchpad.net/glance/+bug/1916926</a><br>Original LaunchPad Bug : <a href="https://bugs.launchpad.net/glance/+bug/1916922">https://bugs.launchpad.net/glance/+bug/1916922</a><br>Mailing List : [Security] <a href="mailto:openstack-security@lists.openstack.org">openstack-security@lists.openstack.org</a><br>OpenStack Security Project : <a href="https://launchpad.net/~openstack-ossg">https://launchpad.net/~openstack-ossg</a></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Thanks & Best Regards,<br><br></div>Abhishek Kekane<br></div></div></div></div>