В ядре Linux устранена следующая уязвимость:
Bluetooth: исправлен UAF в l2cap_sock_cleanup_listen() и l2cap_conn_del().
bt_accept_dequeue() отвязывает еще не принятый дочерний элемент от родительского
принять очередь и Release_sock() перед возвратом, поэтому возвращаемый
sk не имеет ссылки на вызывающего абонента и разблокирован.
l2cap_sock_cleanup_listen() пропускает этих дочерних элементов через сокет прослушивания
близко. Одновременное отключение HCI приводит к запуску hci_rx_work ->
l2cap_conn_del(), который запускает l2cap_chan_del() + l2cap_sock_kill() и
освобождает дочерний sk и его l2cap_chan; Cleanup_listen() затем использует оба:
ОШИБКА: KASAN: использование плиты после освобождения в l2cap_sock_kill.
l2cap_sock_kill / l2cap_sock_cleanup_listen / __x64_sys_close
Освободил: l2cap_conn_del -> l2cap_sock_close_cb -> l2cap_sock_kill
Это отличается от двух исправлений, уже имеющихся в этой области: commit
e83f5e24da741 («Bluetooth: сериализовать доступ Accept_q») сериализует
список/опрос Accept_q и принимает временные ссылки внутри bt_accept_dequeue(),
а CVE-2025-39860 сериализует гонку close()/accept() пользовательского пространства с помощью
вызов cleanup_listen() под lock_sock() в l2cap_sock_release(). Ни один из них не охватывает l2cap_conn_del(), запускаемый из hci_rx_work, поэтому этот UAF
все еще воспроизводится на текущем bluetooth/master.
Возьмите ссылку в источнике: bt_accept_dequeue() выполняет sock_hold().
пока sk все еще заблокирован, перед Release_sock(); вызывающие абоненты sock_put().
Cleanup_listen() закрепляет канал с помощью l2cap_chan_hold_unless_zero() под
короткая дочерняя блокировка sk (сериализация vs l2cap_sock_teardown_cb()), падает
это перед l2cap_chan_lock() и пропускает дубликат l2cap_sock_kill()
SOCK_DEAD. conn->lock здесь не используется: cleanup_listen() выполняется под
родительский замок sk, и это инвертирует
conn->lock -> chan->lock -> sk_lock (lockdep). KASAN/SMP: произведена непривилегированная гонка прослушивания/закрытия и HCI-отключения
12 отчетов об использовании после освобождения за каждый запуск до этого изменения; 0 и нет блокировки
отчет, после него было выполнено более 1600+ итераций по Bluetooth/Master.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: Bluetooth: fix UAF in l2cap_sock_cleanup_listen() vs l2cap_conn_del() bt_accept_dequeue() unlinks a not-yet-accepted child from the parent accept queue and release_sock()s it before returning, so the returned sk has no caller reference and is unlocked. l2cap_sock_cleanup_listen() walks these children on listening-socket close. A concurrent HCI disconnect drives hci_rx_work -> l2cap_conn_del() which runs l2cap_chan_del() + l2cap_sock_kill() and frees the child sk and its l2cap_chan; cleanup_listen() then uses both: BUG: KASAN: slab-use-after-free in l2cap_sock_kill l2cap_sock_kill / l2cap_sock_cleanup_listen / __x64_sys_close Freed by: l2cap_conn_del -> l2cap_sock_close_cb -> l2cap_sock_kill This is distinct from the two fixes already in this area: commit e83f5e24da741 ("Bluetooth: serialize accept_q access") serialises the accept_q list/poll and takes temporary refs inside bt_accept_dequeue(), and CVE-2025-39860 serialises the userspace close()/accept() race by calling cleanup_listen() under lock_sock() in l2cap_sock_release(). Neither covers l2cap_conn_del() running from hci_rx_work, so this UAF still reproduces on current bluetooth/master. Take the reference at the source: bt_accept_dequeue() does sock_hold() while sk is still locked, before release_sock(); callers sock_put(). cleanup_listen() pins the chan with l2cap_chan_hold_unless_zero() under a brief child sk lock (serialising vs l2cap_sock_teardown_cb()), drops it before l2cap_chan_lock(), and skips a duplicate l2cap_sock_kill() on SOCK_DEAD. conn->lock is not taken here: cleanup_listen() runs under the parent sk lock and that would invert conn->lock -> chan->lock -> sk_lock (lockdep). KASAN/SMP: an unprivileged listen/close vs HCI-disconnect race produced 12 use-after-free reports per run before this change; 0, and no lockdep report, over 1600+ raced iterations after it on bluetooth/master.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 11
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.7
|
5.10.259
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.11
|
5.15.210
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.16
|
6.1.175
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.2
|
6.6.142
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.12.92
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.18.34
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
7.0.11
|
|
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:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc3:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc4:*:*:*:*:*:*
|
— | — |