Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp396519pxb; Tue, 29 Mar 2022 05:42:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+HBobqIkFBzfyjWWv1UBXjQ8BDKslu/hRNnR8q5L/GIoW1qJHzCVxDRYwzMCiG5+Hz7zj X-Received: by 2002:a05:6402:4305:b0:419:2aeb:2a9b with SMTP id m5-20020a056402430500b004192aeb2a9bmr4322583edc.346.1648557774299; Tue, 29 Mar 2022 05:42:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648557774; cv=none; d=google.com; s=arc-20160816; b=VcTPGKSRIRMwx1RPmO8NpPD6WXZqcYGtT8la2S1kTOZjBX5wECeR5uMN/O5m0OaB/b vQEM/yTXZX2FJXVAUF8bedUJwkEVVp6luCRkhOTQBvI2TR1+uIoktQaT6exVDlk5jUxP uAo/JWDiNfkFL5XWa3Nyl27whZD/ut+Anl5s9Z1yt+fc6itWIhXtQ+0xzpHh+n7aOwW2 B8hOg3x9sIY/9yZX93rNDQ1DQd18A0ol2nOZXL70o4knhMgcenNvPSRLlTNDwhpcz9zH QU6WLPXvqedAGBYZREvOfgKmGDe1jSIHpa10yzC4qdchIlX+VpeF5Np1R0V9UzNj6dTv XDcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:date:message-id :from:subject:content-transfer-encoding:mime-version:dkim-signature; bh=2NQoBdsdwssazTVrV11NgNg3vzpkr3IkxMhDFK1nLTE=; b=DnTiYmhwhXfpE9zy0vnDdizu4EJGAS7bo1VXrkweWgF7i0uRXTeyz+J3jCNq6+HUBq vExVvFUzSyeMxa4pQDSxE2IoszcTmNMye52Yse2OhYxP22HZUfrJFlEG66e3k9WpzshG HUWiCvOaCfO73onmN4s0DYjDE3Gw1JDxehIUTOv8i1/kTHZWZ9QVXpdhouE8/i4XTnz0 0t/u6iRfklJnksDJ4mddolDu/UX0S6x/zu0/uKlDW6vL2U7CCjW0GutAPygN50GkCaao umDvHsHRNW8upNrnS2Tt5H3+j00RofdTxnNv46wfWvpCJyu/17rz33JXTk90X8ECn1Lv u6Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZSTqfU9e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s15-20020a170906bc4f00b006dfe6119763si17407616ejv.325.2022.03.29.05.42.05; Tue, 29 Mar 2022 05:42:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZSTqfU9e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235974AbiC2Ll6 (ORCPT + 99 others); Tue, 29 Mar 2022 07:41:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235250AbiC2Ll4 (ORCPT ); Tue, 29 Mar 2022 07:41:56 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20C2A201B5; Tue, 29 Mar 2022 04:40:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B3C30B81739; Tue, 29 Mar 2022 11:40:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 6CD66C340F0; Tue, 29 Mar 2022 11:40:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648554011; bh=k0MUrQArqRvaVJ8NEHp+nxibDAS10ufLqavY82Lc0gQ=; h=Subject:From:Date:References:In-Reply-To:To:Cc:From; b=ZSTqfU9eYWBNmk7yzTCteLGBqaDfjyBiUQQloDsGXKNbguNJqmUgiE/0RvlEmG68N hjTxpIyvtvdqn+ly2RXLHAVTEP2rNplZWSDBPfzeWnYbth2LF7zU2aDbXXJI0k9HWh so/mDrek8Q5QiwE6kaC/20DvE97+yfdbJRsrZS97mwHX4Wp4Keuvzigf6w1DIM1LIF AcIrO32nyH+ASJhssI3YsGI9TP2bsLTmQ8n/B1gJMfvDFi90BHXJn7kfNATuJ4E2/7 GT7OQlDFzrRA8VogVsX5tu37Lr90aJ63eaOxbviCa2HslhXWjpqqOPRym4244wBpsz 3gxDU5AGJ3yMg== Received: from aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (localhost.localdomain [127.0.0.1]) by aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (Postfix) with ESMTP id 4E675EAC081; Tue, 29 Mar 2022 11:40:11 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH v2] Bluetooth: fix dangling sco_conn and use-after-free in sco_sock_timeout From: patchwork-bot+bluetooth@kernel.org Message-Id: <164855401131.3735.13754664491252004228.git-patchwork-notify@kernel.org> Date: Tue, 29 Mar 2022 11:40:11 +0000 References: <20220326070853.v2.1.I67f8ad854ac2f48701902bfb34d6e2070011b779@changeid> In-Reply-To: <20220326070853.v2.1.I67f8ad854ac2f48701902bfb34d6e2070011b779@changeid> To: Ying Hsu Cc: marcel@holtmann.org, chromeos-bluetooth-upstreaming@chromium.org, syzbot+2bef95d3ab4daa10155b@syzkaller.appspotmail.com, josephsih@chromium.org, davem@davemloft.net, desmondcheongzx@gmail.com, kuba@kernel.org, johan.hedberg@gmail.com, luiz.dentz@gmail.com, pabeni@redhat.com, linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello: This patch was applied to bluetooth/bluetooth-next.git (master) by Marcel Holtmann : On Sat, 26 Mar 2022 07:09:28 +0000 you wrote: > Connecting the same socket twice consecutively in sco_sock_connect() > could lead to a race condition where two sco_conn objects are created > but only one is associated with the socket. If the socket is closed > before the SCO connection is established, the timer associated with the > dangling sco_conn object won't be canceled. As the sock object is being > freed, the use-after-free problem happens when the timer callback > function sco_sock_timeout() accesses the socket. Here's the call trace: > > [...] Here is the summary with links: - [v2] Bluetooth: fix dangling sco_conn and use-after-free in sco_sock_timeout https://git.kernel.org/bluetooth/bluetooth-next/c/300cf0bfb43e You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html