В ядре Linux устранена следующая уязвимость:
Bluetooth: hci_conn: исправлен потенциальный UAF в create_big_sync. Добавьте проверку hci_conn_valid() в create_big_sync() для обнаружения устаревших данных.
соединения, прежде чем приступить к созданию БОЛЬШОГО. справиться с
в результате -ECANCELED в create_big_complete() и повторно проверьте
соединение под hci_dev_lock() перед разыменованием, соответствующее
шаблон, используемый create_le_conn_complete() и create_pa_complete(). Сохраняйте объект hci_conn живым за пределами асинхронной границы, принимая
ссылка через hci_conn_get() при постановке в очередь create_big_sync() и
отбрасывая его в обратный вызов завершения.
Рефсчет и блокировка
дополняют друг друга: счетчик ссылок сохраняет выделенный объект, а
hci_dev_lock() сериализует list_del_rcu() из hci_conn_hash_del() на
hdev->conn_hash, как того требует hci_conn_del().
hci_conn_put() вызывается вне hci_dev_unlock(), поэтому окончательный вариант put
(который разрешается в kfree() через bt_link_release) не работает под
hdev->lock, хотя путь освобождения в любом случае будет безопасным. Без этого функция create_big_complete() безоговорочно
разыменовывает указатель conn в случае ошибки, вызывая использование после освобождения
через hci_connect_cfm() и hci_conn_del().
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: Bluetooth: hci_conn: fix potential UAF in create_big_sync Add hci_conn_valid() check in create_big_sync() to detect stale connections before proceeding with BIG creation. Handle the resulting -ECANCELED in create_big_complete() and re-validate the connection under hci_dev_lock() before dereferencing, matching the pattern used by create_le_conn_complete() and create_pa_complete(). Keep the hci_conn object alive across the async boundary by taking a reference via hci_conn_get() when queueing create_big_sync(), and dropping it in the completion callback. The refcount and the lock are complementary: the refcount keeps the object allocated, while hci_dev_lock() serializes hci_conn_hash_del()'s list_del_rcu() on hdev->conn_hash, as required by hci_conn_del(). hci_conn_put() is called outside hci_dev_unlock() so the final put (which resolves to kfree() via bt_link_release) does not run under hdev->lock, though the release path would be safe either way. Without this, create_big_complete() would unconditionally dereference the conn pointer on error, causing a use-after-free via hci_connect_cfm() and hci_conn_del().
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 6
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.0
|
6.6.140
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.12.90
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.18.32
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
7.0.7
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:*
|
— | — |