From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vasiliy Kulikov Subject: [PATCH] ipv4: netfilter: arp_tables: fix information leak to userland Date: Sat, 30 Oct 2010 18:26:45 +0400 Message-ID: <1288448806-6470-1-git-send-email-segooon@gmail.com> Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=Ziu2zDgFkeUvZDHfE1siFy85jW1mEYAColLw7t6PDB8=; b=KXtaGWA4JH/G4DWITDz0scuW2x76t4hEQLCm5QzTYq0ntLupd7wqBowIzVhuj7rxwJ HrgVIKesPhgsUZqRILKTordY7YrrOpHjEy6p85P072cJpD54YtoVI1oAMDtd/bZhBs13 mgtV+4UUpamqJNOr1GVJXVwbECr8i0mDtu7dk= Sender: netfilter-owner@vger.kernel.org List-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kernel-janitors@vger.kernel.org Cc: Patrick McHardy , "David S. Miller" , Alexey Kuznetsov , "Pekka Savola (ipv6)" , James Morris , Hideaki YOSHIFUJI , netfilter-devel@vger.kernel.org, netfilter@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org 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 --- Compile tested. net/ipv4/netfilter/arp_tables.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c index 3cad259..3fac340 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)); -- 1.7.0.4