В ядре Linux была устранена следующая уязвимость: net: psp: не унаследовать ассоциацию Rx на клоне sk->psp_assoc сидит после sk_dontcopy_end, поэтому sock_copy() копирует его в каждый сокет, принятый от слушателя без ссылки, в то время как inet_sock_destruct() ставит для каждого сокета inet. psp_twsk_init() делает refcount_inc() для сокета timewait, поэтому ребенок, закрывающий через TIME_WAIT, отменяет свой собственный сокет. Закрытие слушателя освобождает его, а таймеры ожидания затем помещают освобожденную память. Отклонить ассоциацию на прослушивающем сокете недостаточно: сокет может получить его, пока он установлен, а затем снова превратиться в слушателя, потому что tcp_disconnect () оставляет sk->psp_assoc на месте.
BUG: KASAN: slab-use-after-free в psp_twsk_assoc_free+0x6f/0xf0 Write размера 4 в addr ffff888110f9255c по задаче swapper/7/0 psp_twsk_assoc_free+0x6f/0xf0 inet_twsk_put+0xda/0x1b0 call_timer_fn+0x53/0x2e0 __run_timers+0x764/0xa80 Freed по задаче 99: ассоциация kfree+0x1a7/0x500 process_one_work+0x7ec/0x1100 An несёт SPI за соединение и ключ, поэтому ребёнок не должен наследовать родительский. Очистить его от клона.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: net: psp: do not inherit the Rx association on clone sk->psp_assoc sits past sk_dontcopy_end, so sock_copy() copies it into every socket accepted from a listener without taking a reference, while inet_sock_destruct() puts for every inet socket. psp_twsk_init() does refcount_inc() for the timewait socket, so a child closing through TIME_WAIT cancels its own put and leaves the association with one reference and N timewait sockets holding the same pointer. Closing the listener frees it, and the timewait timers then put freed memory. Rejecting the association on a listening socket is not sufficient: a socket can acquire one while established and then be turned back into a listener, because tcp_disconnect() leaves sk->psp_assoc in place. BUG: KASAN: slab-use-after-free in psp_twsk_assoc_free+0x6f/0xf0 Write of size 4 at addr ffff888110f9255c by task swapper/7/0 psp_twsk_assoc_free+0x6f/0xf0 inet_twsk_put+0xda/0x1b0 call_timer_fn+0x53/0x2e0 __run_timers+0x764/0xa80 Freed by task 99: kfree+0x1a7/0x500 process_one_work+0x7ec/0x1100 An association carries a per-connection SPI and key, so a child must not inherit the parent's. Clear it on clone.
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 3
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.18
|
6.18.59
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.18
|
7.2.13
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.18
|
7.3
|