Linux kernel
cpe:2.3:a:linux:linux_kernel:*:*:*:*:*:*:*, +4 more
A vulnerability has been identified in the Linux kernel's mlx5 driver, specifically in the handling of XDP (eXpress Data Path) multi-buffer programs. This issue arises because these programs can alter the layout of the XDP buffer, particularly when they invoke the functions 'bpf_xdp_pull_data()' or 'bpf_xdp_adjust_tail()'. The mlx5 driver initially operated under the incorrect assumption that the XDP buffer layout would remain constant throughout program execution. While a recent fix addressed this misconception, it inadvertently created a new problem: the driver failed to properly account for dropped fragments, leading to errors in page fragment reference counting.
The vulnerability causes negative reference counting errors, which can disrupt the proper management of memory fragments, potentially leading to memory corruption or other undefined behaviors.
The vulnerability can be reproduced using the 'drivers/net/xdp.py' self-test, specifically the 'test_xdp_native_tx_mb' test. This test simulates a scenario where the mlx5 driver receives a packet with no payload. The XDP program processes the packet, pulls the header into the linear part of the buffer, and drops the tail fragment, which no longer contains data. As a result, the driver releases all fragments of the associated page, but the reference count is left one fragment short, creating a negative reference counting error.
The vulnerability has been addressed in the Linux kernel. Users can upgrade to the latest version of the stable Linux kernel to apply the fix.
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.