From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754574Ab0J3O04 (ORCPT ); Sat, 30 Oct 2010 10:26:56 -0400 Received: from mail-ey0-f174.google.com ([209.85.215.174]:51790 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754321Ab0J3O0v (ORCPT ); Sat, 30 Oct 2010 10:26:51 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=wBZrxtUOFJ+aoq1h7DtLSu9xOnvGSwR94Fo6YYf8495Qc52CRpSPZ50ch9o1tuYw9C oYDi5dR4KcPsjrrLV3mA/N/cJWXI44GSwzX11L0vZ5Qbr3j72POjQR6D+S7ommLdFjif dFjEs1coVfmqZI/2b3pGezY1LmsTGU4oKpnUg= From: Vasiliy Kulikov 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 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> X-Mailer: git-send-email 1.7.0.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: 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