В ядре Linux устранена следующая уязвимость:
xfrm: iptfs: исправлено использование после освобождения на first_skb в __input_process_payload
__input_process_payload() сохраняет first_skb в xtfs->ra_newskb под
drop_lock при запуске частичной переборки, потом разблокируется и выламывается
цикла обработки. Проверка после цикла читает xtfs->ra_newskb
без блокировки, чтобы решить, принадлежит ли first_skb:
if (first_skb && first_iplen && !defer && first_skb != xtfs->ra_newskb)
Между spin_unlock и этим чтением одновременно работающий процессор
iptfs_reassem_cont() (или hrtimer drop_timer) может завершить
повторной сборки, NULL xtfs->ra_newskb и освободите skb. Чек тогда
оценивает first_skb != NULL как true, а pskb_trim/ip_summed/consume_skb
работать с освобожденным skb — использование после освобождения в skbuff_head_cache.
Замените разблокированное чтение локальным логическим значением, которое записывает,
first_skb был передан в состояние повторной сборки в текущем вызове.
флаг устанавливается после существующего spin_unlock, перед разрывом, с использованием
равенство указателей, которое стабильно в этой точке (first_skb == skb iff
first_skb хранился в ra_newskb).
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: xfrm: iptfs: fix use-after-free on first_skb in __input_process_payload __input_process_payload() stores first_skb into xtfs->ra_newskb under drop_lock when starting partial reassembly, then unlocks and breaks out of the processing loop. The post-loop check reads xtfs->ra_newskb without the lock to decide whether first_skb is still owned: if (first_skb && first_iplen && !defer && first_skb != xtfs->ra_newskb) Between spin_unlock and this read, a concurrent CPU running iptfs_reassem_cont() (or the drop_timer hrtimer) can complete reassembly, NULL xtfs->ra_newskb, and free the skb. The check then evaluates first_skb != NULL as true, and pskb_trim/ip_summed/consume_skb operate on the freed skb — a use-after-free in skbuff_head_cache. Replace the unlocked read with a local bool that records whether first_skb was handed to the reassembly state in the current call. The flag is set after the existing spin_unlock, before the break, using the pointer equality that is stable at that point (first_skb == skb iff first_skb was stored in ra_newskb).
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 9
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.14
|
6.18.36
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
7.0.13
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc3:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc4:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc5:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc6:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc7:*:*:*:*:*:*
|
— | — |