В ядре Linux устранена следующая уязвимость: Bluetooth: ISO: освобождение неиспользуемых CIS трюмов после присоединения канала hci_bind_cis() и hci_connect_cis() возвращает один трюм hci_conn для слоя ISO. Новая ассоциация каналов потребляет это удержание, которое в конечном итоге высвобождается iso_conn_free(). Есть два случая, когда iso_chan_add() не создает ассоциацию: он возвращает успех, когда сокет уже подключен к тому же iso_conn, и он возвращает -EBUSY, когда подключен другой сокет.
Транзакция, возвращаемая для текущего вызова, не используется в обоих случаях. Это происходит, когда отложенная установка снова вызывает iso_connect_cis() для своего существующего сокета или когда другой сокет пытается повторно использовать CIS. Обнаружьте идемпотентный случай, пока соединение заблокировано, и освободите неиспользованное удержание после iso_chan_add().
Также отпустите его на -EBUSY. Не выбрасывайте его из-за других ошибок: недавно выделенный iso_conn высвобождает переданное удержание, когда вставлена его последняя временная ссылка.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: Bluetooth: ISO: release unused CIS holds after channel attach hci_bind_cis() and hci_connect_cis() return one hci_conn hold for the ISO layer. A new channel association consumes that hold, which is eventually released by iso_conn_free(). There are two cases where iso_chan_add() does not create an association: it returns success when the socket is already attached to the same iso_conn, and it returns -EBUSY when another socket is attached. The hold returned for the current call is unused in both cases. This occurs when deferred setup calls iso_connect_cis() again for its existing socket, or when another socket attempts to reuse the CIS. Detect the idempotent case while the connection is locked and release the unused hold after iso_chan_add(). Also release it on -EBUSY. Do not drop it for other errors: a newly allocated iso_conn releases the transferred hold when its last temporary reference is put.