From: Vasiliy Kulikov Date: Wed, 3 Nov 2010 07:44:12 +0000 (+0100) Subject: ipv4: netfilter: arp_tables: fix information leak to userland X-Git-Tag: v2.6.37-rc2~85^2~4^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1a8b7a67224eb0c9dbd883b9bfc4938278bad370;p=karo-tx-linux.git ipv4: netfilter: arp_tables: fix information leak to userland Structure arpt_getinfo is copied to userland with the field "name" that has the last elements unitialized. It leads to leaking of contents of kernel stack memory. Signed-off-by: Vasiliy Kulikov Signed-off-by: Patrick McHardy --- diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c index 3cad2591ace0..3fac340a28d5 100644 --- a/net/ipv4/netfilter/arp_tables.c +++ b/net/ipv4/netfilter/arp_tables.c @@ -927,6 +927,7 @@ static int get_info(struct net *net, void __user *user, private = &tmp; } #endif + memset(&info, 0, sizeof(info)); info.valid_hooks = t->valid_hooks; memcpy(info.hook_entry, private->hook_entry, sizeof(info.hook_entry));