CVE-2026-74511: Bluetooth: mgmt: fix pending command UAF in EIR updates

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026081542-CVE-2026-74511-6060@gregkh>
From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

Bluetooth: mgmt: fix pending command UAF in EIR updates

MGMT_OP_SET_LOCAL_NAME is handled asynchronously on powered controllers
and can run set_name_sync().  When the controller is BR/EDR capable,
set_name_sync() updates the local name and then rebuilds EIR data through
eir_create().  The EIR builder walks hdev->uuids, but the UUID list can
be changed and entries can be freed by MGMT_OP_ADD_UUID and
MGMT_OP_REMOVE_UUID.

pending_eir_or_class() is meant to serialize management commands that
can change EIR or the class of device, but it did not include
MGMT_OP_SET_LOCAL_NAME.  In addition, it walked hdev->mgmt_pending
without hdev->mgmt_pending_lock even though pending commands are added
and removed under that mutex.  A racing command completion can therefore
remove and free a pending command while pending_eir_or_class() is still
inspecting it, leading to a use-after-free in the pending-command list or
allowing a local name update to rebuild EIR while UUID entries are being
removed.

Take hdev->mgmt_pending_lock while scanning hdev->mgmt_pending and treat
MGMT_OP_SET_LOCAL_NAME as an EIR/class-affecting pending command on the
powered asynchronous path.  Check for a conflicting pending command before
copying the new short name so a rejected SET_LOCAL_NAME request does not
modify hdev->short_name.

The Linux kernel CVE team has assigned CVE-2026-74511 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 6.6.94 with commit bdd56875c6926d8009914f427df71797693e90d4 and fixed in 6.6.151 with commit a9e7c2609b0cb3fb4b4ba9f66dd8727d33205967
	Issue introduced in 6.12.34 with commit 4e83f2dbb2bf677e614109df24426c4dded472d4 and fixed in 6.12.103 with commit eacfcb6b735d0e16b4d2ecfde4b9141225ee934e
	Issue introduced in 6.16 with commit 6fe26f694c824b8a4dbf50c635bee1302e3f099c and fixed in 6.18.44 with commit 814f82f432dc6ee4d15f94756554ff94e6e3ef05
	Issue introduced in 6.16 with commit 6fe26f694c824b8a4dbf50c635bee1302e3f099c and fixed in 7.1.8 with commit 35464ff818165131464bd524c259db1ac8044ae3
	Issue introduced in 6.16 with commit 6fe26f694c824b8a4dbf50c635bee1302e3f099c and fixed in 7.2-rc6 with commit 8f2f62855a41d1730fb9e8122912bd2c8d6bed5d
	Issue introduced in 6.15.3 with commit d7882db79135c829a922daf3571f33ea1e056ae3

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-74511
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/a9e7c2609b0cb3fb4b4ba9f66dd8727d33205967
	https://git.kernel.org/stable/c/eacfcb6b735d0e16b4d2ecfde4b9141225ee934e
	https://git.kernel.org/stable/c/814f82f432dc6ee4d15f94756554ff94e6e3ef05
	https://git.kernel.org/stable/c/35464ff818165131464bd524c259db1ac8044ae3
	https://git.kernel.org/stable/c/8f2f62855a41d1730fb9e8122912bd2c8d6bed5d
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.