I think it does interfere with other tennats - Nova applies all IPtables rules in one operation, including those that haven't been changed. The basic approach is:
- Save iptables
- Modify the ones that need changing in this saved file
- Reapply the new settings
If a bug like this causes the reapply to fail part way though it could leave other VMs in other groups on the same host exposed.
Phil
-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Russell Bryant
Sent: 24 April 2012 15:23
To: Day, Phil
Subject: [Bug 985184] Re: Security groups fail to be set correctly if incorrect case is used for protocol specification
I also wonder if we should classify this as 'Medium' or 'Low' instead of 'High' since this can't really be exploited. It doesn't allow any privilege escalation and doesn't interfere with service for other tenants as far as I can tell.
Title:
Security groups fail to be set correctly if incorrect case is used for
protocol specification
Status in OpenStack Compute (Nova):
Triaged
Bug description:
The high level issue is that if a security group rule is specified
with the protocol in uppercase (e.g. TCP instead of tcp) on a system
using the IpTablesFirewallDriver then the security group rules may
fail to be properly applied, leading to security groups that are more
open than specified.
The detail of the issue is as follows (Described from the OSAPI
perspective, but the problem also exists on EC2)
When a security group rule is specified with the protocol in upper case it is validated (contrig/security_groups.py: _rule_args_to_dict() regardless of case but stored in the database in the supplied case:
if ip_protocol.upper() not in ['TCP', 'UDP', 'ICMP']: raise exception.InvalidIpProtocol(protocol=ip_protocol)
…
values['protocol'] = ip_protocol
When the security group refresh is triggered (virt/firewall.py – instance_rules() the protocol check is case sensitive:
Because the protocol doesn’t match ‘udp’ or ‘tcp’ the protocol part of
the rule is skipped, leading to an incomplete and invalid iptables
command line.
I think it does interfere with other tennats - Nova applies all IPtables rules in one operation, including those that haven't been changed. The basic approach is:
- Save iptables
- Modify the ones that need changing in this saved file
- Reapply the new settings
If a bug like this causes the reapply to fail part way though it could leave other VMs in other groups on the same host exposed.
Phil
-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Russell Bryant
Sent: 24 April 2012 15:23
To: Day, Phil
Subject: [Bug 985184] Re: Security groups fail to be set correctly if incorrect case is used for protocol specification
I also wonder if we should classify this as 'Medium' or 'Low' instead of 'High' since this can't really be exploited. It doesn't allow any privilege escalation and doesn't interfere with service for other tenants as far as I can tell.
-- /bugs.launchpad .net/bugs/ 985184
You received this bug notification because you are subscribed to the bug report.
https:/
Title:
Security groups fail to be set correctly if incorrect case is used for
protocol specification
Status in OpenStack Compute (Nova):
Triaged
Bug description: lDriver then the security group rules may
The high level issue is that if a security group rule is specified
with the protocol in uppercase (e.g. TCP instead of tcp) on a system
using the IpTablesFirewal
fail to be properly applied, leading to security groups that are more
open than specified.
The detail of the issue is as follows (Described from the OSAPI
perspective, but the problem also exists on EC2)
When a security group rule is specified with the protocol in upper case it is validated (contrig/ security_ groups. py: _rule_args_ to_dict( ) regardless of case but stored in the database in the supplied case:
raise exception. InvalidIpProtoc ol(protocol= ip_protocol)
if ip_protocol.upper() not in ['TCP', 'UDP', 'ICMP']:
…
values[ 'protocol' ] = ip_protocol
When the security group refresh is triggered (virt/firewall.py – instance_rules() the protocol check is case sensitive:
Because the protocol doesn’t match ‘udp’ or ‘tcp’ the protocol part of
the rule is skipped, leading to an incomplete and invalid iptables
command line.
To manage notifications about this bug go to: /bugs.launchpad .net/nova/ +bug/985184/ +subscriptions
https:/