From patchwork Sat Oct 30 14:26:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kulikov Vasiliy X-Patchwork-Id: 69659 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 5CBBAB70D1 for ; Sun, 31 Oct 2010 01:27:50 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754536Ab0J3O04 (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 Received: by mail-ey0-f174.google.com with SMTP id 27so2633732eye.19 for ; Sat, 30 Oct 2010 07:26:50 -0700 (PDT) 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= 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= Received: by 10.14.124.201 with SMTP id x49mr10935011eeh.7.1288448810185; Sat, 30 Oct 2010 07:26:50 -0700 (PDT) Received: from localhost (ppp91-78-210-135.pppoe.mtu-net.ru [91.78.210.135]) by mx.google.com with ESMTPS id v51sm2616913eeh.4.2010.10.30.07.26.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 30 Oct 2010 07:26:49 -0700 (PDT) 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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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));