Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1953006lqg; Mon, 4 Mar 2024 08:31:00 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXM3bduZihHWz2tTwEo+iDVzvhUNE7cos2NSOotMga1W5RdvCopzgekQ12zNHFYyaZ4aLF8z/Aaq1Esh2B3I5eV/UZRWhaYuQCeHDds7Q== X-Google-Smtp-Source: AGHT+IGresxbOXX4BNm9qv2DVj35IhILIVx8q1/k1eoWybjTKEGQtKlWpJSWhkGODfizFCVr3qWt X-Received: by 2002:a0c:e985:0:b0:690:796f:7208 with SMTP id z5-20020a0ce985000000b00690796f7208mr2447179qvn.36.1709569860734; Mon, 04 Mar 2024 08:31:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709569860; cv=pass; d=google.com; s=arc-20160816; b=EU0d1trD1eP3oeUppAqnhDzNIjNz7Zn2Sp46QkC7mdZI8/KS8eQCCOT1/j2YxzLDYr MXKGIPZP7411lHI6lxZK6rWdxvOhNlGVCxHjKP1aXsOwAMTxx2GTd5afFhHf6dhtGcWU 4ke8BiCuz7voFu2xYqcIDBj7iOy8a98bm8xel6mMxl/5gjstJhZkXnhNQD0ntyktsPfT fCliiCyQFiJWlFYq9HTaUsXJto+d5ceif4G1+AEjhQA5NyK1xm37KzEA9WRb3smJa+cu eejA2vGymj2yZ84H6VSVz/NGxhDNdwViVonj8cABef++4oM2H6EJrh+gdyVIDvukjhVO kAYg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:date:message-id:from:subject :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=lhqnevCVEd+IIceEfuGoZEdaYE62IM7Wl1NgIoIgECc=; fh=v4Z3N2Htbr8NtGqMLkQjkIE/EbeUcf6lhEWEAm07n3g=; b=kvgGEVYc/AsDlv44HoTYfoCunwYZjVCLC6l/i5GiwZG4EG/nxkrma8cndkntfxNQ9P CwG83VLx1Zf+cL8Np8SqdQcVUMTCjte+D6gh+6/xt280HDrOg3KjObLWMb36AylgZBW6 j3IdBLNFgL7gNAR1400mAVTrMtXcw9aZfPz96NJXcpZYmSfSmOIfuhyniDfrl5bgrnxk Bwf2h3d/f8OVbuuOWtAWrGclLXO6MGAXcyo0gMJYQ5ioK0cDUqEupWxMI3QVcRpe/FZg b84zhjV0tct3+MSj/rFrJzCOTBKn+YO5HPr9IBAsQ020i2KUgvI31ZUPhEnoSr7sBFja DiSw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=M6s1SkAD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-bluetooth+bounces-2276-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2276-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id jr10-20020a0562142a8a00b0068fef1d5162si10024126qvb.81.2024.03.04.08.31.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 08:31:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-2276-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=M6s1SkAD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-bluetooth+bounces-2276-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2276-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 283221C220FB for ; Mon, 4 Mar 2024 16:30:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DD62B4D9FC; Mon, 4 Mar 2024 16:30:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="M6s1SkAD" X-Original-To: linux-bluetooth@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B87343AD5 for ; Mon, 4 Mar 2024 16:30:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709569829; cv=none; b=JbGOB+iRIRgNsuvgvh6J24DiIbSQ7l6FWt1gTu2qugtbMoV4lTm/LwG1StpYjqprsiNJCLRhGP/hrb95vQ70a8gVWjRr59oROA8r8GN+AOYgVFmCtqHOpRhG0rFHKgng83K+vr7r5DYAl2bdECOAo/AlNc/rVEh/HjAKxa+bM8Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709569829; c=relaxed/simple; bh=lHREuSZmFEcJgqNM/hJAPfZexX9jerU28oELH2ngdbc=; h=Content-Type:MIME-Version:Subject:From:Message-Id:Date:References: In-Reply-To:To:Cc; b=hocWd9/ZBMiaX460oEKvKAmlnZXCqgTp3/Rs8BRE2IQNkWunkX7u9v7oMWsnv/Ya+miJXsfETcYFXa3RzIZZwU0jhw4VvX6qvxNuhBnB3tcZvmjXFYV6Jh4SYX4d8V6Sz6V4Pudb8/sCCiHSRdyvEoDfLMnZMr2TuDI8jlD3zl4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=M6s1SkAD; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id ECF93C43394; Mon, 4 Mar 2024 16:30:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709569829; bh=lHREuSZmFEcJgqNM/hJAPfZexX9jerU28oELH2ngdbc=; h=Subject:From:Date:References:In-Reply-To:To:Cc:From; b=M6s1SkADMsulLZK5j4XIkZN4T1AkUVX2+p/RopcBz4yoUpLmW2WsJIzzLjo/t94M8 EAWp0bBwVKg1qCLBPQzwKK023lksDBtjvx0Zb1QDqMHXH693Sg6MVLhouupH3H7/TM hYqMb0xzIxTuMqyozRx1/sdtVoI4BMJcmvS/ckggGzOKp1E/z2IPh9JKNeb5Dmzcjl 29K3WrK/XHVnPVEeQk2aVByaEbOLhUbpqMHL0RWbij3zrEME21OheShPVXLtiQX5b7 Vu88XCiqTMtuRJiebSjl/QWwuopyvqVjUh7GkgIkoN50JLQFbsplVH0Jqh9iE49KbR VV+E95YaMpqyA== 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 D97E4D9A4BB; Mon, 4 Mar 2024 16:30:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH v1] Bluetooth: af_bluetooth: Fix deadlock From: patchwork-bot+bluetooth@kernel.org Message-Id: <170956982888.9053.11683995132686615918.git-patchwork-notify@kernel.org> Date: Mon, 04 Mar 2024 16:30:28 +0000 References: <20240301185034.2756103-1-luiz.dentz@gmail.com> In-Reply-To: <20240301185034.2756103-1-luiz.dentz@gmail.com> To: Luiz Augusto von Dentz Cc: linux-bluetooth@vger.kernel.org Hello: This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz : On Fri, 1 Mar 2024 13:50:34 -0500 you wrote: > From: Luiz Augusto von Dentz > > Attemting to do sock_lock on .recvmsg may cause a deadlock as shown > bellow, so instead of using sock_sock this uses sk_receive_queue.lock > on bt_sock_ioctl to avoid the UAF: > > INFO: task kworker/u9:1:121 blocked for more than 30 seconds. > Not tainted 6.7.6-lemon #183 > Workqueue: hci0 hci_rx_work > Call Trace: > > __schedule+0x37d/0xa00 > schedule+0x32/0xe0 > __lock_sock+0x68/0xa0 > ? __pfx_autoremove_wake_function+0x10/0x10 > lock_sock_nested+0x43/0x50 > l2cap_sock_recv_cb+0x21/0xa0 > l2cap_recv_frame+0x55b/0x30a0 > ? psi_task_switch+0xeb/0x270 > ? finish_task_switch.isra.0+0x93/0x2a0 > hci_rx_work+0x33a/0x3f0 > process_one_work+0x13a/0x2f0 > worker_thread+0x2f0/0x410 > ? __pfx_worker_thread+0x10/0x10 > kthread+0xe0/0x110 > ? __pfx_kthread+0x10/0x10 > ret_from_fork+0x2c/0x50 > ? __pfx_kthread+0x10/0x10 > ret_from_fork_asm+0x1b/0x30 > > > [...] Here is the summary with links: - [v1] Bluetooth: af_bluetooth: Fix deadlock https://git.kernel.org/bluetooth/bluetooth-next/c/40245851528a You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html