Neutron firewall anti-spoofing does not prevent ARP poisoning
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Security Advisory |
Invalid
|
Undecided
|
Unassigned | ||
OpenStack Security Notes |
Fix Released
|
Undecided
|
Tim Kelsey | ||
neutron |
Fix Released
|
High
|
Kevin Benton | ||
Juno |
Fix Released
|
Undecided
|
Unassigned | ||
Kilo |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The neutron firewall driver 'iptabes_firawall' does not prevent ARP cache poisoning.
When anti-spoofing rules are handled by Nova, a list of rules was added through the libvirt network filter feature:
- no-mac-spoofing
- no-ip-spoofing
- no-arp-spoofing
- nova-no-
- allow-dhcp-server
Actually, the neutron firewall driver 'iptabes_firawall' handles only MAC and IP anti-spoofing rules.
This is a security vulnerability, especially on shared networks.
Reproduce an ARP cache poisoning and man in the middle:
- Create a private network/subnet 10.0.0.0/24
- Start 2 VM attached to that private network (VM1: IP 10.0.0.3, VM2: 10.0.0.4)
- Log on VM1 and install ettercap [1]
- Launch command: 'ettercap -T -w dump -M ARP /10.0.0.4/ // output:'
- Log on too on VM2 (with VNC/spice console) and ping google.fr => ping is ok
- Go back on VM1, and see the VM2's ping to google.fr going to the VM1 instead to be send directly to the network gateway and forwarded by the VM1 to the gw. The ICMP capture looks something like that [2]
- Go back to VM2 and check the ARP table => the MAC address associated to the GW is the MAC address of VM1
[1] http://
[2] http://
Changed in neutron: | |
status: | New → Incomplete |
status: | Incomplete → New |
Changed in ossa: | |
status: | New → Incomplete |
description: | updated |
description: | updated |
Changed in ossa: | |
status: | Incomplete → Confirmed |
status: | Confirmed → Incomplete |
Changed in neutron: | |
status: | New → Triaged |
tags: | added: l3-ipam-dhcp |
tags: | added: havana-backport-potential |
Changed in neutron: | |
assignee: | nobody → Kevin Bringard (kbringard) |
status: | Triaged → In Progress |
tags: | added: icehouse-backport-potential |
Changed in neutron: | |
assignee: | Kevin Bringard (kbringard) → nobody |
Changed in neutron: | |
assignee: | nobody → Juergen Brendel (jbrendel) |
Changed in neutron: | |
importance: | Undecided → High |
Changed in ossn: | |
assignee: | nobody → Tim Kelsey (tim-kelsey) |
Changed in ossn: | |
status: | New → In Progress |
Changed in ossn: | |
status: | In Progress → Fix Committed |
Changed in neutron: | |
milestone: | none → kilo-3 |
Changed in neutron: | |
milestone: | kilo-3 → none |
Changed in neutron: | |
milestone: | none → liberty-1 |
Changed in ossa: | |
assignee: | nobody → Juergen Brendel (jbrendel) |
tags: | added: juno-backport-potential kilo-backport-potential |
Changed in neutron: | |
assignee: | nobody → Mark McClain (markmcclain) |
Changed in neutron: | |
milestone: | liberty-1 → liberty-2 |
Changed in neutron: | |
assignee: | Mark McClain (markmcclain) → Kevin Benton (kevinbenton) |
Changed in neutron: | |
status: | In Progress → Fix Committed |
Changed in neutron: | |
status: | Fix Committed → Fix Released |
Changed in neutron: | |
milestone: | liberty-2 → 7.0.0 |
I propose a draft patch (without UT) that corrects this bug (attached to that bug).
iptables is not able to prevent the ARP cache poisoning but ebtables could.
My proposed patch implements an ebtables manager and add a 'NWFilterFirewall' class that iptables firewall driver instantiates when security are enabled on a port.
I move MAC and IP spoofing protection to that class and I propose to delegate all the fist hop security (FHS) rules to the 'NWFilterFirewall' class.
Note: The security groups mix-in [1] implements by default some provider default rules (DHCP and RA). Should we delegate that to the 'NWFilterFirewall' class?
I also want to point you other IPv6 FHS rules we should prevent too (especially for IPv6, I think we have enough for IPv4 protection(IP, MAC, ARP, DHCPv4)).
I link [2][3] CISCO documents that list this FHS rules that their equipments implement by default.
My proposed patch is rebased on the Nachi's review [4]. I modified the list of 'vif_security' attributes to: securitygroup: Neutron requires an external service to support security group.
- require_iptables: Neutron requires an external service to support iptables,
- prevent_spoofing: Neutron requires an external service to prevent base spoofing,
- require_
Any though?
For the backport, I though we could use together the 'NWFilterFirewall' [5] driver as firewall_driver for Nova and the 'IptablesFirewa llDriver' as Neutron firewall driver.
I just made a rapid test but I think Nova will need a small patch to be able to do that (some mother class 'FirewallDriver' methods need to be implemented by the 'NWFilterFirewall' class). Any though?
This bug should impact Havana and Grizzly stable releases.
[1] neutron/ db/securitygrou ps_rpc_ base.py line 284 www.cisco. com/en/ US/prod/ collateral/ iosswrel/ ps6537/ ps6553/ aag_c45- 707354. pdf docwiki. cisco.com/ wiki/FHS /review. openstack. org/#/c/ 21946/ /github. com/openstack/ nova/blob/ master/ nova/virt/ libvirt/ firewall. py#L35
[2] http://
[3] http://
[4] https:/
[5] https:/