ipvs: info leak in __ip_vs_get_dest_entries()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 3 Jun 2013 09:00:49 +0000 (12:00 +0300)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 10 Jun 2013 12:53:00 +0000 (14:53 +0200)
The entry struct has a 2 byte hole after ->port and another 4 byte
hole after ->stats.outpkts.  You must have CAP_NET_ADMIN in your
namespace to hit this information leak.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/ipvs/ip_vs_ctl.c

index 5b142fb164801bee9ab126d00fa3e485cdf96c60..9e6c2a075a4c9954c841556fb69f9e2523ddd894 100644 (file)
@@ -2542,6 +2542,7 @@ __ip_vs_get_dest_entries(struct net *net, const struct ip_vs_get_dests *get,
                struct ip_vs_dest *dest;
                struct ip_vs_dest_entry entry;
 
+               memset(&entry, 0, sizeof(entry));
                list_for_each_entry(dest, &svc->destinations, n_list) {
                        if (count >= get->num_dests)
                                break;