В ядре Linux устранена следующая уязвимость: can: raw: fix ro->uniq use-after-free in raw_rcv() raw_release() unregisters raw CAN receive filters via can_rx_unregister(), но удаление приёмника откладывается с помощью call_rcu(). Это оставляет окно, где raw_rcv() может по-прежнему работать в критической секции RCU после того, как raw_release() освобождает ro->uniq, что приводит к use-after-free хранилища percpu Uniq. Переместите free_percpu(ro->uniq) из raw_release() в RAW-специфический деструктор сокета. can_rx_unregister() берет дополнительную ссылку на сокет и только удаляет ее из обратного вызова RCU, поэтому освобождение Uniq от sk_destruct гарантирует, что область percpu не будет освобождена до тех пор, пока соответствующие обратные вызовы не будут удалены. [mkl: применяется вручную]
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: can: raw: fix ro->uniq use-after-free in raw_rcv() raw_release() unregisters raw CAN receive filters via can_rx_unregister(), but receiver deletion is deferred with call_rcu(). This leaves a window where raw_rcv() may still be running in an RCU read-side critical section after raw_release() frees ro->uniq, leading to a use-after-free of the percpu uniq storage. Move free_percpu(ro->uniq) out of raw_release() and into a raw-specific socket destructor. can_rx_unregister() takes an extra reference to the socket and only drops it from the RCU callback, so freeing uniq from sk_destruct ensures the percpu area is not released until the relevant callbacks have drained. [mkl: applied manually]
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 5
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.1
|
<= 6.6.136
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.12.83
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.18
|
6.18.24
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
6.19.14
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
7.0
|
7.0.1
|