В ядре Linux устранена следующая уязвимость:
net: fec: обработать ошибку page_pool_dev_alloc_pages
Функция fec_enet_update_cbd вызывает page_pool_dev_alloc_pages, но
не обрабатывать случай, когда он вернул NULL. Произошло WARN_ON(!new_page)
но он все равно будет использовать NULL-указатель, а затем произойдет сбой. Этот случай кажется несколько редким, но когда система находится в нехватке памяти
давление, это может случиться.
Один случай, когда я могу продублировать это с некоторыми
частота — при записи через общий ресурс smbd на жесткий диск SATA, подключенный к
imx6q. Установка /proc/sys/vm/min_free_kbytes более высоких значений также, похоже, решает проблему.
проблема для моего тестового примера. Но все равно кажется неправильным, что драйвер fec
игнорирует ошибку распределения памяти и может привести к сбою.
Этот коммит обрабатывает ошибку выделения, удаляя текущий пакет.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: net: fec: handle page_pool_dev_alloc_pages error The fec_enet_update_cbd function calls page_pool_dev_alloc_pages but did not handle the case when it returned NULL. There was a WARN_ON(!new_page) but it would still proceed to use the NULL pointer and then crash. This case does seem somewhat rare but when the system is under memory pressure it can happen. One case where I can duplicate this with some frequency is when writing over a smbd share to a SATA HDD attached to an imx6q. Setting /proc/sys/vm/min_free_kbytes to higher values also seems to solve the problem for my test case. But it still seems wrong that the fec driver ignores the memory allocation error and can crash. This commit handles the allocation error by dropping the current packet.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 9
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.1
|
6.6.74
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.12.11
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.13:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.13:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.13:rc3:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.13:rc4:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.13:rc5:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.13:rc6:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.13:rc7:*:*:*:*:*:*
|
— | — |