In the Linux kernel, the following vulnerability has been resolved: Bluetooth: hci_conn: fix CIS hold ownership on reuse Commit 69997d50ec57 ("Bluetooth: ISO: handle bound CIS cleanup via hci_conn") made hci_bind_cis() and hci_connect_cis() return a connection with one hold for the ISO layer. hci_bind_cis() currently takes that hold only after configuring a CIS, so its BT_CONNECTED and matching BT_BOUND paths return a bare lookup result. Его путь отказа конфигурации может также вызвать hci_conn_drop () перед захватом. Возьмите удержание перед любой зависящей от состояния ошибкой возврата или конфигурации, поэтому каждый успешный возврат следует за документированным договором собственности, и каждое падение ошибки сбалансировано. hci_connect_cis () также предполагает, что hci_conn_link () всегда берет новое удержание CIS, прежде чем отбрасывать одно, возвращенное hci_bind_cis ().
Тем не менее, помощник возвращает существующую ссылку, не удерживая другую. В этом случае сохраните удержание CIS для вызывающего абонента и откажитесь от избыточного удержания LE, потому что существующая ссылка уже владеет своим родительским удержанием. Раннее возвращение также позволяет избежать изменения существующего CIS обратно на BT_CONNECT.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: Bluetooth: hci_conn: fix CIS hold ownership on reuse Commit 69997d50ec57 ("Bluetooth: ISO: handle bound CIS cleanup via hci_conn") made hci_bind_cis() and hci_connect_cis() return a connection with one hold for the ISO layer. hci_bind_cis() currently takes that hold only after configuring a CIS, so its BT_CONNECTED and matching BT_BOUND paths return a bare lookup result. Its configuration failure path can likewise call hci_conn_drop() before taking a hold. Take the hold before any state-dependent return or configuration error so every successful return follows the documented ownership contract and every error drop is balanced. hci_connect_cis() also assumes hci_conn_link() always takes a new CIS hold before dropping the one returned by hci_bind_cis(). However, the helper returns an existing link without taking another hold. In that case, preserve the CIS hold for the caller and drop the redundant LE hold because the existing link already owns its parent hold. Returning early also avoids changing an existing CIS back to BT_CONNECT.