From patchwork Thu Aug 6 12:27:43 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 30842 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id B4902B6F1E for ; Thu, 6 Aug 2009 22:28:00 +1000 (EST) Received: by ozlabs.org (Postfix) id A5BF1DDD0B; Thu, 6 Aug 2009 22:28:00 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 00A15DDD0C for ; Thu, 6 Aug 2009 22:27:59 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755217AbZHFM1u (ORCPT ); Thu, 6 Aug 2009 08:27:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753412AbZHFM1u (ORCPT ); Thu, 6 Aug 2009 08:27:50 -0400 Received: from gw1.cosmosbay.com ([212.99.114.194]:35331 "EHLO gw1.cosmosbay.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753302AbZHFM1u (ORCPT ); Thu, 6 Aug 2009 08:27:50 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) by gw1.cosmosbay.com (8.13.7/8.13.7) with ESMTP id n76CRhP2000355; Thu, 6 Aug 2009 14:27:44 +0200 Message-ID: <4A7ACC3F.9070600@gmail.com> Date: Thu, 06 Aug 2009 14:27:43 +0200 From: Eric Dumazet User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: "David S. Miller" CC: Linux Netdev List Subject: [PATCH] appletalk: fix atalk_getname() leak X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.6 (gw1.cosmosbay.com [0.0.0.0]); Thu, 06 Aug 2009 14:27:44 +0200 (CEST) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org atalk_getname() can leak 8 bytes of kernel memory to user Signed-off-by: Eric Dumazet --- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 590b839..9ef6ff2 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c @@ -1237,6 +1237,7 @@ static int atalk_getname(struct socket *sock, struct sockaddr *uaddr, return -ENOBUFS; *uaddr_len = sizeof(struct sockaddr_at); + memset(&sat.sat_zero, 0, sizeof(sat.sat_zero)); if (peer) { if (sk->sk_state != TCP_ESTABLISHED)