В ядре Linux была устранена следующая уязвимость: Bluetooth: L2CAP: безопасный доступ к chan->conn в get/setsockopt Since commit b66774b48dd9 ("Bluetooth: L2CAP: Fix UAF в канале тайм-аута путём удержания conn ref») l2cap_chan::conn удержал ссылку и остаётся не-NULL также после удаления соответствующего hci_conn. В этом состоянии доступ к различным полям, например, hci_conn::hdev является недействительным, что приводит к краху KASAN в l2cap_sock_setsockopt () доступ к conn->hcon->hdev. Проверка l2cap_chan::conn.hcon соответствует живому hci_conn, прежде чем пытаться использовать его в l2cap_sock.c.
Держите l2cap_chan_lock () в getsockopt / setsockopt, чтобы убедиться, что он остается живым, и избежать гонок данных в полях l2cap_chan.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: Bluetooth: L2CAP: access chan->conn safely in get/setsockopt Since commit b66774b48dd9 ("Bluetooth: L2CAP: Fix UAF in channel timeout by holding conn ref") l2cap_chan::conn has held reference and remains non-NULL also after the corresponding hci_conn is deleted. In this state accessing various fields eg. hci_conn::hdev is invalid, which leads to KASAN crash in l2cap_sock_setsockopt() access of conn->hcon->hdev. Check l2cap_chan::conn.hcon corresponds to an alive hci_conn before trying to use it in l2cap_sock.c. Hold l2cap_chan_lock() in getsockopt/setsockopt to ensure it stays alive, and to avoid data races in l2cap_chan fields.
Характеристики атаки
Последствия
Строка CVSS v3.1