From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1679C4743F for ; Tue, 8 Jun 2021 08:32:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B86E361183 for ; Tue, 8 Jun 2021 08:32:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230475AbhFHId7 (ORCPT ); Tue, 8 Jun 2021 04:33:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:52794 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbhFHId5 (ORCPT ); Tue, 8 Jun 2021 04:33:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 299D06124B; Tue, 8 Jun 2021 08:32:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623141125; bh=bWFAmKd3DNZ+NkTU8ZsF5ftLYqiBVXsIWH5ZAF+xP4U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hFI58qU597v46ZY746x3xrEZgo6uu+TuqBXM9QpZ2/baCj6ZTtmHTrfO6RkDw4yfm Lnjwl1iQCvCdFRAScDBLAMqVYI1Fv88Jue3ktj71s3EobuX3WQBNRDxKxZLL9bva7L sUapmD98BOr6hBnhyvo0pponS2gGC1rSy6lwLlrs= Date: Tue, 8 Jun 2021 10:32:02 +0200 From: Greg Kroah-Hartman To: Salvatore Bonaccorso Cc: Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , linma , "David S. Miller" , Jakub Kicinski , linux-bluetooth , "open list:NETWORKING [GENERAL]" , open list , Hao Xiong , stable Subject: Re: [PATCH v2] Bluetooth: fix the erroneous flush_work() order Message-ID: References: <20210525123902.189012-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Jun 08, 2021 at 06:53:17AM +0200, Salvatore Bonaccorso wrote: > Hi Greg, > > On Thu, May 27, 2021 at 10:14:59PM +0200, Marcel Holtmann wrote: > > Hi Greg, > > > > > In the cleanup routine for failed initialization of HCI device, > > > the flush_work(&hdev->rx_work) need to be finished before the > > > flush_work(&hdev->cmd_work). Otherwise, the hci_rx_work() can > > > possibly invoke new cmd_work and cause a bug, like double free, > > > in late processings. > > > > > > This was assigned CVE-2021-3564. > > > > > > This patch reorder the flush_work() to fix this bug. > > > > > > Cc: Marcel Holtmann > > > Cc: Johan Hedberg > > > Cc: Luiz Augusto von Dentz > > > Cc: "David S. Miller" > > > Cc: Jakub Kicinski > > > Cc: linux-bluetooth@vger.kernel.org > > > Cc: netdev@vger.kernel.org > > > Cc: linux-kernel@vger.kernel.org > > > Signed-off-by: Lin Ma > > > Signed-off-by: Hao Xiong > > > Cc: stable > > > Signed-off-by: Greg Kroah-Hartman > > > --- > > > net/bluetooth/hci_core.c | 7 ++++++- > > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > > patch has been applied to bluetooth-stable tree. > > Can you queue this one as well for the stable series? It is > 6a137caec23aeb9e036cdfd8a46dd8a366460e5d commit upstream and in > 5.13-rc5. It's now queued up, thanks. greg k-h