<tt><font size=2>David Stevens/Beaverton/IBM@IBMUS wrote on 05/09/2011
04:00:05 PM:<br>
<br>
> <br>
>    The following series of patches replaces IP address learning
in<br>
> network filtering with DHCP snooping. The existing address learning
<br>
> capability <br>
> does not provide security since it relies on addresses used in initial
packets<br>
> sent by the guest to determine an IP address. A spoofing guest can
simply<br>
> arrange to send packets using the target address early on.</font></tt>
<br>
<br><tt><font size=2>The current IP address learning algo. takes either
the address given by the DHCP</font></tt>
<br><tt><font size=2>server or the address a VM seems to be using, which
can either be from an ARP reply</font></tt>
<br><tt><font size=2>or the first packet a VM is sending out. It then locks
the VM's interface into</font></tt>
<br><tt><font size=2>that address. This works for static configuration
or DHCP and if DHCP is used it</font></tt>
<br><tt><font size=2>also works when libvirt is restarted while a VM is
running -- then it will simply</font></tt>
<br><tt><font size=2>pick the address from the ARP reply or first packet
treating the VM as if it was</font></tt>
<br><tt><font size=2>using static configuration.</font></tt>
<br>
<br><tt><font size=2>Looking at patch 8 I would assume you need to store
the IP leases you track into</font></tt>
<br><tt><font size=2>a file so you can handle the cases of libvirt restart
while a VM is running. How</font></tt>
<br><tt><font size=2>does the DHCP snooping currently deal with libvirt
restarts or a SIGHUP to libvirt.</font></tt>
<br><tt><font size=2>Both I believe are currently rebuilding all filters
when libvirt restarts and on</font></tt>
<br><tt><font size=2>those interfaces where it is necessary the learning
will again start up.</font></tt>
<br><tt><font size=2><br>
>    With DHCP snooping, only addresses acknowledged by a
DHCP server can<br>
> be used by the guest, and only for the given lease time if the address
lease<br>
> is not renewed.</font></tt>
<br>
<br><tt><font size=2>How do you treat VMs with statically configured interfaces?
Are they permanently blocked</font></tt>
<br><tt><font size=2>from sending?</font></tt>
<br><tt><font size=2><br>
>    The patches also add support for multiple IP addresses
per interface.</font></tt>
<br>
<br><tt><font size=2>This would be great!</font></tt>
<br>
<br><tt><font size=2>   Stefan</font></tt>
<br><tt><font size=2><br>
> <br>
> The split:<br>
> <br>
> p1 -add return & continue support<br>
>    Add support for "return" and "continue"
in filters.<br>
> p2 -fix ARP input checks<br>
>    Fix a bug that breaks correct use of ARP by overfiltering.<br>
> p3 -add MAC check; split ARP intp ARPMAC and ARPIP<br>
>    Support for multiple IP addresses in ARP checks, and
allow for<br>
>    multiple MAC addresses in the future.<br>
> p4 -set default protocol policy to "DROP"; edit filters<br>
>    Change default protocol policy to "DROP", rather
than adding explicit<br>
>    "DROP" rules at the end of all of them. This
is for multiple address<br>
>    support.<br>
> p5 -optional "modify" (don't use temp, generate placeholder
rules)<br>
>    Add support to dynamically add and remove filters without
re-installing<br>
>    an entire chain.<br>
> p6 -addRules<br>
>    Add support for adding new rules to a chain incrementally.
Remove<br>
>    support was already there.<br>
> p7 -ChangeVar support<br>
>    Add support to change chains that have a matching variable
substitution<br>
>    to either add or delete rules with the given variable
value (e.g., "IP")<br>
> p8 -add DHCP snooping<br>
>    The DHCP snooping code itself.<br>
> p9 -delete learnipaddr<br>
>    Clean up remaining learnipaddr infrastructure.<br>
> <br>
> <br>
</font></tt>