CVE-2026-90254: Bluetooth: hci_sync: free the advertising instance on the failure and cancel paths
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: hcisync: free the advertising instance on the failure and cancel paths
advtimeoutexpire() hands a kmalloc()ed instance byte to hcicmdsyncqueue() with a NULL destroy callback, and only advtimeoutexpiresync() frees it. That leaks on two paths:
- the return value is not checked, and hcicmdsyncqueue() does not take ownership when it fails (-ENETDOWN, -ENODEV, -ENOMEM);
- a cancelled entry is not released, as hcicmdsynccancelentry() does not free entry->data when there is no destroy callback. hcicmdsyncclear() cancels every pending entry when the controller is unregistered.
Free the buffer from a destroy callback, and in the caller when the entry could not be queued at all.
Affected Software
Event History
Frequently Asked Questions
Under what conditions does the memory leak occur?
The leak occurs when advertising-timeout work allocates an instance byte and queuing the synchronous HCI command fails with -ENETDOWN, -ENODEV, or -ENOMEM. It also occurs when a queued entry is cancelled, including when pending entries are cleared during controller unregistration.
What operational situations may expose a system to this issue?
Systems using the affected Bluetooth advertising timeout path may leak memory when the Bluetooth controller is unavailable, removed, out of memory, or unregistered while relevant HCI command entries remain pending.
What does the fix change?
The fix supplies a destroy callback to free the allocated buffer when a queued entry is cancelled, and frees the buffer in the caller when the command entry cannot be queued at all.