netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] ipvs: info leak in __ip_vs_get_dest_entries()
@ 2013-06-03  9:00 Dan Carpenter
  2013-06-03 20:00 ` Julian Anastasov
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Dan Carpenter @ 2013-06-03  9:00 UTC (permalink / raw)
  To: Wensong Zhang
  Cc: Simon Horman, Julian Anastasov, Pablo Neira Ayuso,
	Patrick McHardy, Jozsef Kadlecsik, David S. Miller, netdev,
	lvs-devel, netfilter-devel, netfilter, coreteam, kernel-janitors

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>

diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index df05c1c..e336535 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -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;

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-06-10 12:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-03  9:00 [patch] ipvs: info leak in __ip_vs_get_dest_entries() Dan Carpenter
2013-06-03 20:00 ` Julian Anastasov
2013-06-04  1:03 ` Simon Horman
2013-06-07  8:33   ` Dan Carpenter
2013-06-10  8:38 ` Simon Horman
2013-06-10 12:58   ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).