В ядре Linux была устранена следующая уязвимость: Bluetooth: MGMT: освободите команду отмены отправки сетки, когда она отменена mesh_send_cancel() очередь ожидающей команды с NULL уничтожить обратный вызов, так что он освобождается только если send_cancel() работает. Отмененная запись просочилась, так как _hci_cmd_sync_cancel_entry() не выпускает entry->data, когда нет уничтожающего обратного вызова, а hci_cmd_sync_clear() отменяет каждую ожидающую запись, когда контроллер незарегистрирован. mgmt_pending_new() не ставит команду на hdev->mgmt_pending. Утечка также фиксирует ссылку на сокет, взятую mgmt_pending_new (), поэтому сокет mgmt никогда не выпускается.
Освободите команду от обратного вызова.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: Bluetooth: MGMT: free the mesh send cancel command when it is cancelled mesh_send_cancel() queues the pending command with a NULL destroy callback, so it is only freed if send_cancel() runs. A cancelled entry is leaked, as _hci_cmd_sync_cancel_entry() does not release entry->data when there is no destroy callback, and hci_cmd_sync_clear() cancels every pending entry when the controller is unregistered. Nothing else reclaims it either: mgmt_pending_new() does not put the command on hdev->mgmt_pending. The leak also pins the socket reference taken by mgmt_pending_new(), so the mgmt socket is never released. Free the command from a destroy callback.