Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2837832ybl; Sun, 1 Sep 2019 01:05:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYclSP/HrmtHriZXrnJxqq59O4CFPBNwntRJPBgABawaqoNOymGGBrFSSuR36xClCNmlPn X-Received: by 2002:a63:fa11:: with SMTP id y17mr20232715pgh.267.1567325101775; Sun, 01 Sep 2019 01:05:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567325101; cv=none; d=google.com; s=arc-20160816; b=CMBpBZahUi4U5GE6o/BsveU6ZCctsyFog3BPTeIPcYWjlUIC6uuaZNQ0Mx1OEzmq7C XDb9gMORGkwVQjoFvjWCIOyrvEsngG4MavAw9jq4mKajwbdFcqdfvVCPEjKiso4Cd07p lRdUbaaaUoxA1fyEaGV0QXslWZLgIH/PHPsyFarYE+dwEWfLHZ4Edm2qRA7wIhTJv5My RQ4voGokiwgHpBae3iqhLp2LxWXLUfxyTWW7Ga6an61t5VT69FgLYFSj5ndRIRt8yR4Q K1Iygbi0ChHh+aLK8+WGhMxyeZGMDuikC1gPudy6bEh3vFVwerYROylYD70fppmzpogW Ry0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:dmarc-filter :dkim-signature:dkim-signature; bh=KcaT87zNFCdzB+DxNhpJ1YN3YfayR7t24PMwb2P4Y/A=; b=rCWUbvcE3YUzHDCcxtfGwExj+4wbO61IXEk37ylZR8Y1mNxKxdaCp9jnQiyhSaOxvq Jj04grl88Gt4jnd3gySdHzGt+7FruCVspeo0q9HBwiGaPV/hG/MH5NTSJVd8WyQ/Kgss nEuFSH8VvAzDlwFVOEa+0uWjf0hZeSweG+3w/R0ekpCBpWKw1D96Bqph63gOGggUt5/d FF+f0jqbtg1Fx0zCmFQwqWActTkMN/gI5gVMYE0i8k7nBDm+HhMf+pcbSyr9qaTSdIon Jn5hkopMB71D+BMy4EdJXPJ0ZLDL4oUN2X78XYXlE1wCb34mG9iCExyavqbHBYIOyxz3 /9oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=mGwoiqIV; dkim=pass header.i=@codeaurora.org header.s=default header.b=FOVi+y8O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h8si2026951pls.314.2019.09.01.01.04.46; Sun, 01 Sep 2019 01:05:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=mGwoiqIV; dkim=pass header.i=@codeaurora.org header.s=default header.b=FOVi+y8O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728923AbfIAIDr (ORCPT + 99 others); Sun, 1 Sep 2019 04:03:47 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55420 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727083AbfIAIDo (ORCPT ); Sun, 1 Sep 2019 04:03:44 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 01DF16076C; Sun, 1 Sep 2019 08:03:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1567325023; bh=s3Qd8teK9Pse+c22d4E8V6jGZ+kuODY5cnFtVMtOy9k=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=mGwoiqIVDRXNPUlFGTey+0JcjgcZCeRCM/dv8B7xrPGhrXkYowXI8/x1FbcnJmeA+ Bj+J7gQIsULkHofJUzNmpp5aMH0qDqQk1EdWPKM3bnzYNwsqbckYESAgqVxywSaEf0 Zx7b7N6h7iZBIbejRaRGotcDF5MZGQ53ZlGC1ANk= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from potku.adurom.net (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 62DB960159; Sun, 1 Sep 2019 08:03:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1567325021; bh=s3Qd8teK9Pse+c22d4E8V6jGZ+kuODY5cnFtVMtOy9k=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=FOVi+y8Oq9cGml0+3ekpjfudzoAfQDldqv2osYPc3mzjB+S1xuk9v3HwmlQxGWl4l 5kPQzMp/XA6cIzTFFYtUkQtNSBpGOzyvXaJrvaYDQQ0wnOEtxOf216z3s4TwwTdLGE RuKDy6pEmFP0GKk4j103lrvlZkWaf/SxnKBEtYvM= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 62DB960159 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 From: Kalle Valo To: Guenter Roeck Cc: Hui Peng , security@kernel.org, Mathias Payer , "David S. Miller" , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Fix a double free bug in rsi_91x_deinit References: <20190819220230.10597-1-benquike@gmail.com> <20190831181852.GA22160@roeck-us.net> Date: Sun, 01 Sep 2019 11:03:36 +0300 In-Reply-To: <20190831181852.GA22160@roeck-us.net> (Guenter Roeck's message of "Sat, 31 Aug 2019 11:18:52 -0700") Message-ID: <87k1asqw87.fsf@kamboji.qca.qualcomm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Guenter Roeck writes: > On Mon, Aug 19, 2019 at 06:02:29PM -0400, Hui Peng wrote: >> `dev` (struct rsi_91x_usbdev *) field of adapter >> (struct rsi_91x_usbdev *) is allocated and initialized in >> `rsi_init_usb_interface`. If any error is detected in information >> read from the device side, `rsi_init_usb_interface` will be >> freed. However, in the higher level error handling code in >> `rsi_probe`, if error is detected, `rsi_91x_deinit` is called >> again, in which `dev` will be freed again, resulting double free. >> >> This patch fixes the double free by removing the free operation on >> `dev` in `rsi_init_usb_interface`, because `rsi_91x_deinit` is also >> used in `rsi_disconnect`, in that code path, the `dev` field is not >> (and thus needs to be) freed. >> >> This bug was found in v4.19, but is also present in the latest version >> of kernel. >> >> Reported-by: Hui Peng >> Reported-by: Mathias Payer >> Signed-off-by: Hui Peng > > FWIW: > > Reviewed-by: Guenter Roeck > > This patch is listed as fix for CVE-2019-15504, which has a CVSS 2.0 score > of 10.0 (high) and CVSS 3.0 score of 9.8 (critical). A double free in error path is considered as a critical CVE issue? I'm very curious, why is that? > Are there any plans to apply this patch to the upstream kernel anytime > soon ? I was on vacation last week and hence I have not been able to apply any wireless patches. I should be able to catch up next week. -- https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches