Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3801824pxj; Mon, 7 Jun 2021 21:57:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJnbKuczu/5RAPUa7Y3J/OZlBw7Fpiwc0IfDCAC/C6lz9XMZ4rSQhYqS4AiDRuhHccIfiP X-Received: by 2002:a17:906:f117:: with SMTP id gv23mr21748583ejb.432.1623128235894; Mon, 07 Jun 2021 21:57:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623128235; cv=none; d=google.com; s=arc-20160816; b=mpAFTm0IbFP5CCEpruooExdqXy1snyAIrixSUJ5wuyfn1mSgxX/IfgjIjeKGuPQerK I8wETRmdZfBy13/ui3W0CeQyGei4zo0ubE1CeewP09f/RBcQ6veQOBza6eXL0wkFkRL/ HY6Ntc9ztpw+TsBm2J9ZeYy0sF4JLkyKSaBa6yeyj51Oyie4H2WhRwljqD0h8n388ZUf FBuklz0CXNfyJnP5YrMk0c+ZNbPABBiWRHidupzs1dDePlFGDsP5faqEzUWcVOEpoe9F 5fhyokFlDXvA8c15hurzLqYl8BIoVmb9yNQs1cmJa2Ck7IRtm7U74cCrrGyOkxRwQjDO 5Ojg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=HhTJvhXQRpXrK1DarhAlRYbBfua3nyn/yHyOslBWJcs=; b=mJj6aGyq3aHPqAAD5XTKwUzw9YSbAxBW0jdX3OHJgQ3Rytz4HU1EKkbVeEP+2mDP/W QUnyaEgMhtFUC++nQPMAeQkXA2Wu6aBdqQrvGUhtD0xW5VOOhyNOds0AGWkS1Di9u6UX R3LpICV+d0pX+ALg1jCDut52zYIqzqFh9Tz4iSIIT1jmtcCtpjJ1GFfPYrI3FpF6qEBW VgF2y97IB+hAqkkilP9ArI2pNUBxfDnvjVzBhwOlQB++uYOohNQQ8+EMhTrXPJ/97qis q4dFqVVHDUWXEg2WrQoKIoz4PTPYlZR/8T2CWU6Rxqj5vtW3AmNviZJmrjpx0pZEZEhn wyMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ioZ3BNAM; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bl4si17015210ejb.689.2021.06.07.21.56.30; Mon, 07 Jun 2021 21:57:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ioZ3BNAM; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229507AbhFHEz0 (ORCPT + 99 others); Tue, 8 Jun 2021 00:55:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbhFHEz0 (ORCPT ); Tue, 8 Jun 2021 00:55:26 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEBA5C061574; Mon, 7 Jun 2021 21:53:19 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id l1so30391317ejb.6; Mon, 07 Jun 2021 21:53:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=HhTJvhXQRpXrK1DarhAlRYbBfua3nyn/yHyOslBWJcs=; b=ioZ3BNAMIpb4kBehQ3jJ7ZUK3o7D5uE0qxuvePy6skLatGTSbTmt0EFQasHk2IC8UC qZgBez6I9509CoyWBVRNGfYAaXFf+VUfxuXflzzIbZZM+YaWTywQ3ZWBFlQmJCsYKBn5 +NPHQFVwQDP7zm2JmvfeIee5TT61w7AzVMWCr4SyKwKtral77QymPtCDom4YxaxBdwnd +JY3DL+QLD6eiqZqQUPwuYkxZrE4/fyCaANWEryi26ZKyzMEe21psLSBjNInbdlAZHlR NZhbCDylPspsaA5GjBgBWAz5qx6B/48lmflyY3T7lSWnYOmfhz/tu3/KD5b39MYu5prh ATKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=HhTJvhXQRpXrK1DarhAlRYbBfua3nyn/yHyOslBWJcs=; b=G/7F7j1I4AAGhglIGHww5jzGWKZk2iWOpwc1t5fEqziUJlJ030h1GxIivWIYyNFGq2 KRMCsTDhyWKLFzVVBK0BWrNx9km19s7VW/Pdei1/szgbIjWHe7s3LToMWnUkEOzIb2k5 zHxbAX+1LdUHfS9W29fdXcB+9Dzds4xCS8BKjHBcxZ173aV/QpCXGKwAfG7zK3I60FZ/ EX0ocggdnC3YNUgM9LTRA3N+2n8egp4JLW72k2iFcOtfKzJgCWXSAAs9bwP9M4Ap6ZKI b2v/eOMmDmF1v/EZ5Wxy+/r1FyiO/+CmuIn/i3wznLj6WsZS6jUQJLIQOw1H/ruVQyP0 tcxg== X-Gm-Message-State: AOAM532yF8+l48VJxxILaDXMHycHb8V8zel9RQexomcHH+dFwjFOW9cI TE9V4x9oq5H2ZE/H268JveyGHT7gMP/qqA== X-Received: by 2002:a17:906:2c1b:: with SMTP id e27mr21626901ejh.5.1623127998599; Mon, 07 Jun 2021 21:53:18 -0700 (PDT) Received: from eldamar (80-218-24-251.dclient.hispeed.ch. [80.218.24.251]) by smtp.gmail.com with ESMTPSA id d5sm8460426edt.49.2021.06.07.21.53.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Jun 2021 21:53:17 -0700 (PDT) Sender: Salvatore Bonaccorso Date: Tue, 8 Jun 2021 06:53:17 +0200 From: Salvatore Bonaccorso To: Marcel Holtmann Cc: Greg Kroah-Hartman , 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: linux-bluetooth@vger.kernel.org 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. Regards, Salvatore