Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936036AbZLQBeT (ORCPT ); Wed, 16 Dec 2009 20:34:19 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1763585AbZLQBUk (ORCPT ); Wed, 16 Dec 2009 20:20:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:17006 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763603AbZLQBUb (ORCPT ); Wed, 16 Dec 2009 20:20:31 -0500 Subject: Re: [PATCH] Libertas: fix buffer overflow in lbs_get_essid() From: Dan Williams To: "John W. Linville" Cc: Daniel Mack , linux-kernel@vger.kernel.org, Holger Schurig , Stephen Hemminger , Maithili Hinge , Kiran Divekar , Michael Hirsch , netdev@vger.kernel.org, libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org, stable@kernel.org In-Reply-To: <20091217010114.GA2913@tuxdriver.com> References: <1260936778-2096-1-git-send-email-daniel@caiaq.de> <1260982667.2179.9.camel@localhost.localdomain> <20091216231508.GX28375@buzzloop.caiaq.de> <20091217010114.GA2913@tuxdriver.com> Content-Type: text/plain Date: Wed, 16 Dec 2009 17:19:12 -0800 Message-Id: <1261012752.17721.8.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1272 Lines: 32 On Wed, 2009-12-16 at 20:01 -0500, John W. Linville wrote: > On Thu, Dec 17, 2009 at 07:15:08AM +0800, Daniel Mack wrote: > > On Wed, Dec 16, 2009 at 08:57:47AM -0800, Dan Williams wrote: > > > On Wed, 2009-12-16 at 05:12 +0100, Daniel Mack wrote: > > > > The libertas driver copies the SSID buffer back to the wireless core and > > > > appends a trailing NULL character for termination. This is > > > > > > > > a) unnecessary because the buffer is allocated with kzalloc and is hence > > > > already NULLed when this function is called, and > > > > > > > > b) for priv->curbssparams.ssid_len == 32, it writes back one byte too > > > > much which causes memory corruptions. > > > > > > > > Fix this by removing the extra write. > > > > > > Acked-by: Dan Williams > > > > Thanks, everyone. Who will care to pick an queue this one? > > Is there some reason it wouldn't be me? No, it should be you. Please suck it into your 2.6.33 patchset and we'll cc to stable when it hits linus I guess. Dan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/