From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752603AbdASMpv (ORCPT ); Thu, 19 Jan 2017 07:45:51 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:53404 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752436AbdASMpi (ORCPT ); Thu, 19 Jan 2017 07:45:38 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8EADB6086D Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: libertas: fix improper return value From: Kalle Valo In-Reply-To: <1480760857-4549-1-git-send-email-bianpan2016@163.com> References: <1480760857-4549-1-git-send-email-bianpan2016@163.com> To: Pan Bian Cc: Andreas Kemnade , Johannes Berg , libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Pan Bian User-Agent: pwcli/0.0.0-git (https://github.com/kvalo/pwcli/) Python/2.7.12 Message-Id: <20170119123913.B75AE60911@smtp.codeaurora.org> Date: Thu, 19 Jan 2017 12:39:13 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Pan Bian wrote: > Function lbs_cmd_802_11_sleep_params() always return 0, even if the call > to lbs_cmd_with_response() fails. In this case, the parameter @sp will > keep uninitialized. Because the return value is 0, its caller (say > lbs_sleepparams_read()) will not detect the error, and will copy the > uninitialized stack memory to user sapce, resulting in stack information > leak. To avoid the bug, this patch returns variable ret (which takes > the return value of lbs_cmd_with_response()) instead of 0. > > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188451 > > Signed-off-by: Pan Bian Patch applied to wireless-drivers-next.git, thanks. 259010c509b6 libertas: fix improper return value -- https://patchwork.kernel.org/patch/9459597/ Documentation about submitting wireless patches and checking status from patchwork: https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches