CVE-2026-64539: Bluetooth: eir: Fix stack OOB write when prepending the Flags AD
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: eir: Fix stack OOB write when prepending the Flags AD
eircreateadvdata() builds the advertising data into a fixed-size buffer ("size", 31 for the legacy path). It may prepend a 3-byte "Flags" AD structure (LEADNOBREDR on an LE-only controller) and then copies the per-instance data without checking that it still fits:
memcpy(ptr, adv->advdata, adv->advdatalen);
tlvdatamaxlen() only reserves those 3 bytes when the user-supplied flags carry a managed-flags bit, so an instance added with flags == 0 is accepted with advdatalen up to the full buffer. At advertise time the flags are still prepended, and the memcpy() writes 3 + advdatalen bytes into the size-byte buffer:
BUG: KASAN: stack-out-of-bounds in eircreateadvdata (net/bluetooth/eir.c:301) Write of size 31 at addr ffff88800a547bdc by task kworker/u9:0/65 Workqueue: hci0 hcicmdsyncwork asanmemcpy (mm/kasan/shadow.c:106) eircreateadvdata (net/bluetooth/eir.c:301) hciupdateadvdatasync (net/bluetooth/hcisync.c:1310) hcischeduleadvinstancesync (net/bluetooth/hcisync.c:1817) hcicmdsyncwork (net/bluetooth/hcisync.c:332) This frame has 1 object: [32, 64) 'cp'
The "Flags" structure is added by the kernel, not requested by userspace, so only prepend it when it fits together with the instance advertising data; when there is no room for both, drop the flags rather than the user-provided data.
Reachable by a local user with CAPNETADMIN owning an LE-only controller on the legacy advertising path.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-64539?
CVE-2026-64539 has a severity rating of high, with a CVSS score of 7.8.
How do I fix CVE-2026-64539?
To fix CVE-2026-64539, update your Linux Kernel to the latest version that addresses this vulnerability.
What are the potential impacts of CVE-2026-64539?
CVE-2026-64539 can lead to a stack out-of-bounds write, potentially compromising the integrity and availability of the system.
Which software is affected by CVE-2026-64539?
CVE-2026-64539 specifically affects the Bluetooth EIR implementation in the Linux Kernel.
When was CVE-2026-64539 published?
CVE-2026-64539 was published on July 27, 2026.