Where
-Infinity
0
Severity
7.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

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.

First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203