From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from charlotte.tuxdriver.com ([70.61.120.58]:41621 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762760AbZLQBGX (ORCPT ); Wed, 16 Dec 2009 20:06:23 -0500 Date: Wed, 16 Dec 2009 20:01:15 -0500 From: "John W. Linville" To: Daniel Mack Cc: Dan Williams , 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 Subject: Re: [PATCH] Libertas: fix buffer overflow in lbs_get_essid() Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 In-Reply-To: <20091216231508.GX28375@buzzloop.caiaq.de> Sender: linux-wireless-owner@vger.kernel.org List-ID: 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? John -- John W. Linville                Someday the world will need a hero, and you linville@tuxdriver.com                  might be all we have.  Be ready.