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 3BDC31FC7FB for ; Mon, 21 Oct 2024 19:40:47 +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=1729539648; cv=none; b=DZcZUdeTKxqtpIhByrlq6de/0pf2C5PDjPNdjFUdGAhpTtV7EnzsnNgDLh+veiaSWhVM51270MeRmmQjIGEQQQ44Wg9ks/UCrOrrRVVU0sX7CgCRv5ZyyVNYQy1MB5rg/UaBGZSFBcCRlB+TBC9m8I2O4Kwjh7NSujS9nBwRTzo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729539648; c=relaxed/simple; bh=SrEcvFYupTNnr85yCviGCPcnjEji0XRJfWUGVUSMx+c=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=iLUfjVInE0DStxp3vqoY0SGk/zdhKO8BVGgoWpo+o1eH8IP/qE0pkkWrjh2B1F4WKwi8ryM9m6XNLcwUGNeC6bGJBLPi/F6lzMMnXZW80OnXu2IhcvtcNMRK2FjQis3a+W1FgZc2BsIqTEWrH445XMxIVNc3WqSR400aboTj9os= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=LC9xU88f; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="LC9xU88f" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7097DC4CEC3; Mon, 21 Oct 2024 19:40:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729539647; bh=SrEcvFYupTNnr85yCviGCPcnjEji0XRJfWUGVUSMx+c=; h=From:To:Cc:Subject:Date:Reply-to:From; b=LC9xU88fqdTU2UXNHjvGFk7P+Olkg5APgzN26iI/K2RoMfqmenIqlLsnOlKG+2MIG P6ACdpRyKtIUybJ/eWXoBN8hS+QWdWtUvJsWOOGEVoUk7KLZf9D5/1dyyOvtNfoaPH wt7IpkNOiadPbNBThZqQb8NGaipiGrxJvPY46XzE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50044: Bluetooth: RFCOMM: FIX possible deadlock in rfcomm_sk_state_change Date: Mon, 21 Oct 2024 21:39:50 +0200 Message-ID: <2024102133-CVE-2024-50044-2ee1@gregkh> X-Mailer: git-send-email 2.47.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3214; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=SrEcvFYupTNnr85yCviGCPcnjEji0XRJfWUGVUSMx+c=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlia7/u9FndEKCnmNuV7r33M0/UJ0cR/8wT52+t8J0cu Ku9e69DRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEykOYJhwXq/mbMzg1j5ciKX 7olO4xN9sDGin2Gu7KrXj3Wifr4WM3v6Uy7smN1+tRA7AA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: Bluetooth: RFCOMM: FIX possible deadlock in rfcomm_sk_state_change rfcomm_sk_state_change attempts to use sock_lock so it must never be called with it locked but rfcomm_sock_ioctl always attempt to lock it causing the following trace: ====================================================== WARNING: possible circular locking dependency detected 6.8.0-syzkaller-08951-gfe46a7dd189e #0 Not tainted ------------------------------------------------------ syz-executor386/5093 is trying to acquire lock: ffff88807c396258 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1671 [inline] ffff88807c396258 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: rfcomm_sk_state_change+0x5b/0x310 net/bluetooth/rfcomm/sock.c:73 but task is already holding lock: ffff88807badfd28 (&d->lock){+.+.}-{3:3}, at: __rfcomm_dlc_close+0x226/0x6a0 net/bluetooth/rfcomm/core.c:491 The Linux kernel CVE team has assigned CVE-2024-50044 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.27 with commit 3241ad820dbb and fixed in 5.10.227 with commit ef44274dae9b Issue introduced in 2.6.27 with commit 3241ad820dbb and fixed in 5.15.168 with commit 496b2ab0fd10 Issue introduced in 2.6.27 with commit 3241ad820dbb and fixed in 6.1.113 with commit ced98072d351 Issue introduced in 2.6.27 with commit 3241ad820dbb and fixed in 6.6.57 with commit 38b2d5a57d12 Issue introduced in 2.6.27 with commit 3241ad820dbb and fixed in 6.11.4 with commit 4cb9807c9b53 Issue introduced in 2.6.27 with commit 3241ad820dbb and fixed in 6.12-rc3 with commit 08d1914293da Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2024-50044 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: net/bluetooth/rfcomm/sock.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/ef44274dae9b0a90d1a97ce8b242a3b8243a7745 https://git.kernel.org/stable/c/496b2ab0fd10f205e08909a125485fdc98843dbe https://git.kernel.org/stable/c/ced98072d3511b232ae1d3347945f35f30c0e303 https://git.kernel.org/stable/c/38b2d5a57d125e1c17661b8308c0240c4a43b534 https://git.kernel.org/stable/c/4cb9807c9b53bf1e5560420d26f319f528b50268 https://git.kernel.org/stable/c/08d1914293dae38350b8088980e59fbc699a72fe