漏洞标题
net: fec: 处理 page_pool_dev_alloc_pages 错误
漏洞描述信息
在Linux内核中,已解决以下漏洞:
net: fec: 处理page_pool_dev_alloc_pages错误
fec_enet_update_cbd函数调用了page_pool_dev_alloc_pages,但未处理其返回NULL的情况。虽然存在WARN_ON(!new_page),但仍会继续使用空指针并导致系统崩溃。
这种情况似乎较为罕见,但在系统处于内存压力状态时可能会发生。我可以在某些情况下频繁复制此问题,例如在连接到imx6q的SATA HDD上的smbd共享中写入数据时。
将/proc/sys/vm/min_free_kbytes设置为更高的值似乎可以解决我的测试案例中的问题,但仍然存在问题,即fec驱动程序忽略了内存分配错误并可能导致系统崩溃。
此提交通过丢弃当前数据包来处理分配错误。
CVSS信息
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
漏洞类别
空指针解引用
漏洞标题
net: fec: handle page_pool_dev_alloc_pages error
漏洞描述信息
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信息
N/A
漏洞类别
N/A