PT-2024-11178 · Linux · Linux Kernel
Published
2021-06-03
·
Updated
2025-01-07
·
CVE-2021-47127
CVSS v3.1
5.5
Medium
| Vector | AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Name of the Vulnerable Software and Affected Versions
Linux kernel versions prior to 5.12.0-rc2+ #45
Description
A vulnerability in the Linux kernel has been resolved, which was introduced by a commit that removed the xsk buff pool from the VSI structure. This change broke the Tx side of AF XDP in copy mode, causing a kernel NULL pointer dereference when xdpsock is run in txonly or l2fwd scenarios. The issue occurs because the xsk pool on ice ring is set only based on the existence of the XDP prog on the VSI, which in turn picks the wrong napi poll routine. To fix this, a bitmap of queues that are zero-copy enabled is introduced, where each bit corresponds to a queue id that the xsk pool is being configured on. This bitmap is set and cleared within the ice xsk pool {en,dis}able functions and checked within the ice xsk pool() function.
Recommendations
To resolve this issue, update the Linux kernel to a version that includes the fix for this vulnerability. Specifically, update to a version later than 5.12.0-rc2+ #45. As a temporary workaround, consider disabling the use of AF XDP in copy mode until the update can be applied.
Fix
NULL Pointer Dereference
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Linux Kernel