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 5781A37FF77 for ; Wed, 22 Apr 2026 13:57:22 +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=1776866242; cv=none; b=PK8ZPwc6TWtFykjBCURsilU/sXDbAGmkXYsVGS1ZzfaqIaa5hxNItFp2PQKToT4P7oTEwwWjBdlkqKpYVT0hU25zHqgFNEKt+WPz+2DdCxy2deC28iBrB35/Ro/dIWFlOcTsiW45LkEJehI03gonxuQw/cCMEB8ZRpJWYoY/ZEc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776866242; c=relaxed/simple; bh=f3zzCCNqkfr220jYUdlDNTbncZztN1jLbereZBlMxdc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=QX7d3w7vOuQWqZdHZ441EkA4zBbY3OgSiWBOFAU14i72xSYCgYuB/gqy1Uu0ArLzRTJebWASledntcypvHSseMq1bvFEajeKpviwbqizs95PsmAl1RoSCWMVfPqUrntufDIwM76CBMFcojhrII4mm5r8dtRSeoHgBFcyZWJnt9s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=d/8AAsOH; 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="d/8AAsOH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E25C8C19425; Wed, 22 Apr 2026 13:57:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1776866242; bh=f3zzCCNqkfr220jYUdlDNTbncZztN1jLbereZBlMxdc=; h=From:To:Cc:Subject:Date:Reply-To:From; b=d/8AAsOH+ni57bLGILLpKH9bgZQ6k5wtL8WDkkx3SaRER13RghTrGmW1+8goEzUuF Mi5fNHyk0YVWTfsCyP5i3t9goMJxZruMjAbnWw/i2BhAsQ/d38/Gq93Q+vCA2jGkum zivrgQF93FREEZhxxNUTintu3/x74egTXu7b3eMw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-31511: Bluetooth: MGMT: Fix dangling pointer on mgmt_add_adv_patterns_monitor_complete Date: Wed, 22 Apr 2026 15:54:57 +0200 Message-ID: <2026042208-CVE-2026-31511-b569@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2708; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=vTUeKgh8z6LEk3KGjBgznYhoJkx+MHhU7NaROlDQwmA=; b=kA0DAAIRMUfUDdst+ykByyZiAGno0wCiPSDqtseTNDh3DX16BL4J54TK7U+G84zO7q2KWoHcM IhdBAARAgAdFiEE9LYMxb94wiFKMT3LMUfUDdst+ykFAmno0wAACgkQMUfUDdst+ykf+wCgrvSY 8kQTUcby7AxVXoghQ5J/7AoAoI0nND8N1VQz4gFp9JYA3y9BHhp9 X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: Bluetooth: MGMT: Fix dangling pointer on mgmt_add_adv_patterns_monitor_complete This fixes the condition checking so mgmt_pending_valid is executed whenever status != -ECANCELED otherwise calling mgmt_pending_free(cmd) would kfree(cmd) without unlinking it from the list first, leaving a dangling pointer. Any subsequent list traversal (e.g., mgmt_pending_foreach during __mgmt_power_off, or another mgmt_pending_valid call) would dereference freed memory. The Linux kernel CVE team has assigned CVE-2026-31511 to this issue. Affected and fixed versions =========================== Issue introduced in 6.12.59 with commit d71b98f253b079cbadc83266383f26fe7e9e103b and fixed in 6.12.80 with commit 340666172cf747de58c283d2eef1f335f050538b Issue introduced in 6.17 with commit 302a1f674c00dd5581ab8e493ef44767c5101aab and fixed in 6.18.21 with commit bafec9325d4de26b6c49db75b5d5172de652aae0 Issue introduced in 6.17 with commit 302a1f674c00dd5581ab8e493ef44767c5101aab and fixed in 6.19.11 with commit 3a89c33deffb3cb7877a7ea2e50734cd12b064f2 Issue introduced in 6.17 with commit 302a1f674c00dd5581ab8e493ef44767c5101aab and fixed in 7.0 with commit 5f5fa4cd35f707344f65ce9e225b6528691dbbaa Issue introduced in 6.16.10 with commit 87a1f16f07c6c43771754075e08f45b41d237421 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-2026-31511 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/mgmt.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/340666172cf747de58c283d2eef1f335f050538b https://git.kernel.org/stable/c/bafec9325d4de26b6c49db75b5d5172de652aae0 https://git.kernel.org/stable/c/3a89c33deffb3cb7877a7ea2e50734cd12b064f2 https://git.kernel.org/stable/c/5f5fa4cd35f707344f65ce9e225b6528691dbbaa