From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754480AbcKIWVB (ORCPT ); Wed, 9 Nov 2016 17:21:01 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:35974 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754104AbcKIWU7 (ORCPT ); Wed, 9 Nov 2016 17:20:59 -0500 DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 987CF60290 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: Brian Norris Cc: Amitkumar Karwar , Nishant Sarmukadam , , linux-wireless@vger.kernel.org, Cathy Luo , security@kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] mwifiex: printk() overflow with 32-byte SSIDs References: <1478658504-31045-1-git-send-email-briannorris@chromium.org> Date: Thu, 10 Nov 2016 00:20:53 +0200 In-Reply-To: <1478658504-31045-1-git-send-email-briannorris@chromium.org> (Brian Norris's message of "Tue, 8 Nov 2016 18:28:24 -0800") Message-ID: <87h97guwfu.fsf@kamboji.qca.qualcomm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Brian Norris writes: > SSIDs aren't guaranteed to be 0-terminated. Let's cap the max length > when we print them out. > > This can be easily noticed by connecting to a network with a 32-octet > SSID: > > [ 3903.502925] mwifiex_pcie 0000:01:00.0: info: trying to associate to > '0123456789abcdef0123456789abcdef ' bssid > xx:xx:xx:xx:xx:xx > > Fixes: 5e6e3a92b9a4 ("wireless: mwifiex: initial commit for Marvell mwifiex driver") > Signed-off-by: Brian Norris > Cc: I'm planning to push this to 4.9 if no objections. -- Kalle Valo