OSSN-0011: Heat templates with invalid references allows unintended network access

Summary

Orchestration templates can create security groups to define network access rules. When creating these rules, it is possible to have a rule grant incoming network access to instances belonging to another security group. If a rule references a non-existent security group, it can result in allowing incoming access to all hosts for that rule.

Affected Services / Software

Heat, nova-network, Havana

Discussion

When defining security groups of the AWS::EC2::SecurityGroup type in a CloudFormation-compatible format (CFN) orchestration template, it is possible to use references to other security groups as the source for ingress rules. When these rules are evaluated by Heat in the OpenStack Havana release, a reference to a non-existent security group will be silently ignored. This results in the rule using a CidrIp property of 0.0.0.0/0. This will allow incoming access to any host for the affected rule. This has the effect of allowing unintended network access to instances.

This issue only occurs when Nova is used for networking (nova-network). The Neutron networking service is not affected by this issue.

The OpenStack Icehouse release is not affected by this issue. In the Icehouse release, Heat will check if a non-existent security group is referenced in a template and return an error, causing the creation of the security group to fail.

Contacts / References

Author: Nathan Kinder, Red Hat