В ядре Linux устранена следующая уязвимость:
ipv6: исправлена ОШИБКА в rt6_get_pcpu_route() в PREEMPT_RT. В ядрах PREEMPT_RT после того, как rt6_get_pcpu_route() возвращает NULL,
текущая задача может быть вытеснена. Другая задача, выполняемая на том же процессоре
затем может выполнить rt6_make_pcpu_route() и успешно установить
запись pcpu_rt.
Когда первая задача возобновляет выполнение, ее cmpxchg()
в rt6_make_pcpu_route() завершится неудачно, поскольку rt6i_pcpu больше не существует.
NULL, вызывая BUG_ON(prev). Его легко воспроизвести, добавив
mdelay() после rt6_get_pcpu_route(). Использование preempt_disable/enable здесь не подходит, потому что
ip6_rt_pcpu_alloc() может спать.
Исправьте это, корректно обработав ошибку cmpxchg() в PREEMPT_RT:
освободите наше выделение и верните существующий pcpu_rt, установленный
еще одна задача. BUG_ON заменяется WARN_ON_ONCE для не PREEMPT_RT.
ядра, где такие гонки происходить не должны.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: ipv6: fix a BUG in rt6_get_pcpu_route() under PREEMPT_RT On PREEMPT_RT kernels, after rt6_get_pcpu_route() returns NULL, the current task can be preempted. Another task running on the same CPU may then execute rt6_make_pcpu_route() and successfully install a pcpu_rt entry. When the first task resumes execution, its cmpxchg() in rt6_make_pcpu_route() will fail because rt6i_pcpu is no longer NULL, triggering the BUG_ON(prev). It's easy to reproduce it by adding mdelay() after rt6_get_pcpu_route(). Using preempt_disable/enable is not appropriate here because ip6_rt_pcpu_alloc() may sleep. Fix this by handling the cmpxchg() failure gracefully on PREEMPT_RT: free our allocation and return the existing pcpu_rt installed by another task. The BUG_ON is replaced by WARN_ON_ONCE for non-PREEMPT_RT kernels where such races should not occur.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 11
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.12.1
|
6.12.64
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.18.4
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.12:-:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc3:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc4:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc5:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc6:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc7:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc8:*:*:*:*:*:*
|
— | — |