В ядре Linux устранена следующая уязвимость:
Bluetooth: hci_conn: возвращает ERR_PTR вместо NULL, когда ссылка отсутствует.
hci_connect_sco в настоящее время возвращает NULL, когда ссылка отсутствует (т. е. когда
hci_conn_link() возвращает NULL).
sco_connect() ожидает ERR_PTR в случае любой ошибки (см. строку 266 в
sco.c). Таким образом, hcon, установленный как NULL, передается в sco_conn_add(), который
пытается получить hcon->hdev, что приводит к разыменованию NULL-указателя как
Об этом сообщает syzkaller. Та же проблема существует для iso_connect_cis(), вызывающего hci_connect_cis().
Таким образом, заставьте hci_connect_sco() и hci_connect_cis() возвращать ERR_PTR.
вместо НУЛЯ.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: Bluetooth: hci_conn: return ERR_PTR instead of NULL when there is no link hci_connect_sco currently returns NULL when there is no link (i.e. when hci_conn_link() returns NULL). sco_connect() expects an ERR_PTR in case of any error (see line 266 in sco.c). Thus, hcon set as NULL passes through to sco_conn_add(), which tries to get hcon->hdev, resulting in dereferencing a NULL pointer as reported by syzkaller. The same issue exists for iso_connect_cis() calling hci_connect_cis(). Thus, make hci_connect_sco() and hci_connect_cis() return ERR_PTR instead of NULL.