libvirt/tests/networkxml2argvdata
Laine Stump 84cbd3a98a network: prevent dnsmasq from listening on localhost
This patch resolves the problem reported in:

   https://bugzilla.redhat.com/show_bug.cgi?id=886663

The source of the problem was the fix for CVE 2011-3411:

   https://bugzilla.redhat.com/show_bug.cgi?id=833033

which was originally committed upstream in commit
753ff83a50. That commit improperly
removed the "--except-interface lo" from dnsmasq commandlines when
--bind-dynamic was used (based on comments in the latter bug).

It turns out that the problem reported in the CVE could be eliminated
without removing "--except-interface lo", and removing it actually
caused each instance of dnsmasq to listen on localhost on port 53,
which created a new problem:

If another instance of dnsmasq using "bind-interfaces" (instead of
"bind-dynamic") had already been started (or if another instance
started later used "bind-dynamic"), this wouldn't have any immediately
visible ill effects, but if you tried to start another dnsmasq
instance using "bind-interfaces" *after* starting any libvirt
networks, the new dnsmasq would fail to start, because there was
already another process listening on port 53.

This patch changes the network driver to *always* add
"except-interface=lo" to dnsmasq conf files, regardless of whether we use
bind-dynamic or bind-interfaces. This way no libvirt dnsmasq instances
are listening on localhost (and the CVE is still fixed).

The actual code change is miniscule, but must be propogated through all
of the test files as well.

(This is *not* a cherry-pick of the upstream commit that fixes the bug
(commit d66eb78667), because subsequent
to the CVE fix, another patch changed the network driver to put
dnsmasq options in a conf file rather than directly on the dnsmasq
commandline preserving the same options), so a cherry-pick is just one
very large conflict.)
2012-12-13 12:29:53 -05:00
..
isolated-network.argv network: prevent dnsmasq from listening on localhost 2012-12-13 12:29:53 -05:00
isolated-network.xml Network: Add regression tests for the command-line arguments 2011-06-24 16:15:27 -04:00
nat-network-dns-hosts.argv network: prevent dnsmasq from listening on localhost 2012-12-13 12:29:53 -05:00
nat-network-dns-hosts.xml network: add domain to unqualified names defined with <host> 2011-06-28 12:57:14 -04:00
nat-network-dns-srv-record-minimal.argv network: prevent dnsmasq from listening on localhost 2012-12-13 12:29:53 -05:00
nat-network-dns-srv-record-minimal.xml network: use dnsmasq --bind-dynamic when available 2012-11-29 15:14:20 -05:00
nat-network-dns-srv-record.argv network: prevent dnsmasq from listening on localhost 2012-12-13 12:29:53 -05:00
nat-network-dns-srv-record.xml Implement DNS SRV record into the bridge driver 2012-01-02 23:05:55 +08:00
nat-network-dns-txt-record.argv network: prevent dnsmasq from listening on localhost 2012-12-13 12:29:53 -05:00
nat-network-dns-txt-record.xml Network: Add regression tests for the command-line arguments 2011-06-24 16:15:27 -04:00
nat-network.argv network: prevent dnsmasq from listening on localhost 2012-12-13 12:29:53 -05:00
nat-network.xml Network: Add regression tests for the command-line arguments 2011-06-24 16:15:27 -04:00
netboot-network.argv network: prevent dnsmasq from listening on localhost 2012-12-13 12:29:53 -05:00
netboot-network.xml Network: Add regression tests for the command-line arguments 2011-06-24 16:15:27 -04:00
netboot-proxy-network.argv network: prevent dnsmasq from listening on localhost 2012-12-13 12:29:53 -05:00
netboot-proxy-network.xml Network: Add regression tests for the command-line arguments 2011-06-24 16:15:27 -04:00
routed-network.argv network: prevent dnsmasq from listening on localhost 2012-12-13 12:29:53 -05:00
routed-network.xml Network: Add regression tests for the command-line arguments 2011-06-24 16:15:27 -04:00