[ https://issues.apache.org/jira/browse/CLOUDSTACK-309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13602621#comment-13602621 ]
ASF subversion and git services commented on CLOUDSTACK-309: ------------------------------------------------------------ Commit 4a556d1280a558c8234c40ce6511794b0ad4081c in branch refs/heads/4.1 from Chip Childers <chip.child...@gmail.com> [ https://git-wip-us.apache.org/repos/asf?p=incubator-cloudstack.git;h=4a556d1 ] Summary: Prevent deletion of wrong iptables rules Detail: A grep in security_group.py wasn't defined well enough, could potentially delete rules for VMs other than intended BUG-ID: CLOUDSTACK-309 Bugfix-for: master Reviewed-by: Reported-by: Francois Scala Signed-off-by: John Kinsella <j...@stratosec.co> 1363222521 -0700 > iptables rules being deleted from wrong VM after a migration > ------------------------------------------------------------ > > Key: CLOUDSTACK-309 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-309 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Affects Versions: pre-4.0.0 > Environment: cloudstack 3.0.2 with kvm on centos > Reporter: Francois Scala > Assignee: John Kinsella > Fix For: 4.1.0 > > > First migration : > 2012-10-09 17:57:26,571 - iptables-save | grep BF | grep i-2-82 | grep > physdev-is-bridged | sed 's/-A/-D/' > 2012-10-09 17:57:26,619 - iptables -A BF-cloudbr0-OUT -m physdev > --physdev-is-bridged --physdev-out vnet1 -j i-2-82-def > 2012-10-09 17:57:26,628 - iptables -A BF-cloudbr0-IN -m physdev > --physdev-is-bridged --physdev-in vnet1 -j i-2-82-def > Second migration, wrong rules are being deleted due to a grep mismatch : > 2012-10-09 18:33:22,301 - iptables-save | grep BF | grep i-2-8 | grep > physdev-is-bridged | sed 's/-A/-D/' > 2012-10-09 18:33:22,307 - iptables -D BF-cloudbr0-IN -m physdev --physdev-in > vnet1 --physdev-is-bridged -j i-2-82-def > 2012-10-09 18:33:22,317 - iptables -D BF-cloudbr0-OUT -m physdev > --physdev-out vnet1 --physdev-is-bridged -j i-2-82-def > 2012-10-09 18:33:22,372 - iptables -A BF-cloudbr0-OUT -m physdev > --physdev-is-bridged --physdev-out vnet2 -j i-2-8-def > 2012-10-09 18:33:22,382 - iptables -A BF-cloudbr0-IN -m physdev > --physdev-is-bridged --physdev-in vnet2 -j i-2-8-def > Proposed patch : > /usr/lib64/cloud/agent/scripts/vm/network/security_group.py line 342 : > << delcmd = "iptables-save | grep BF | grep " + vmchain + " | grep > physdev-is-bridged | sed 's/-A/-D/'" > >> delcmd = "iptables-save | grep BF | grep " + vmchain + "- | grep > >> physdev-is-bridged | sed 's/-A/-D/'" -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira