В ядре Linux устранена следующая уязвимость: net: ti: icssg-prueth: fix use-after-free of CPPI descriptor in RX path cppi5_hdesc_get_psdata() возвращает указатель в дескриптор CPPI. Как в emac_rx_packet(), так и в emac_rx_packet_zc(), дескриптор освобождается через k3_cppi_desc_pool_free(), прежде чем указатель psdata будет использоваться emac_rx_timestamp(), который снимает ссылки на psdata[0] и psdata[1]. Это представляет собой use-after-free на каждый принятый пакет, который проходит через путь временной метки.
Отложите дескриптор до тех пор, пока все доступы через указатель psdata не будут завершены. Для emac_rx_packet() переместите свободный в метку requeue, чтобы как ранний выход, так и путь успеха освободили дескриптор после завершения всех доступов. Для emac_rx_packet_zc() переместите свободное в конец тела цикла после того, как emac_dispatch_skb_zc() (который вызывает emac_rx_timestamp()) вернулся.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: net: ti: icssg-prueth: fix use-after-free of CPPI descriptor in RX path cppi5_hdesc_get_psdata() returns a pointer into the CPPI descriptor. In both emac_rx_packet() and emac_rx_packet_zc(), the descriptor is freed via k3_cppi_desc_pool_free() before the psdata pointer is used by emac_rx_timestamp(), which dereferences psdata[0] and psdata[1]. This constitutes a use-after-free on every received packet that goes through the timestamp path. Defer the descriptor free until after all accesses through the psdata pointer are complete. For emac_rx_packet(), move the free into the requeue label so both early-exit and success paths free the descriptor after all accesses are done. For emac_rx_packet_zc(), move the free to the end of the loop body after emac_dispatch_skb_zc() (which calls emac_rx_timestamp()) has returned.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 9
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.15.1
|
6.19.11
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.15:-:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc7:*:*:*:*:*:*
|
— | — |