CVE-2024-27431: cpumap: Zero-initialise xdp_rxq_info struct before running XDP program
In the Linux kernel, the following vulnerability has been resolved:
cpumap: Zero-initialise xdprxqinfo struct before running XDP program
The Linux kernel CVE team has assigned CVE-2024-27431 to this issue.
Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024051723-CVE-2024-27431-30ae@gregkh/T
Other sources
In the Linux kernel, the following vulnerability has been resolved:
cpumap: Zero-initialise xdprxqinfo struct before running XDP program
When running an XDP program that is attached to a cpumap entry, we don't initialise the xdprxqinfo data structure being used in the xdpbuff that backs the XDP program invocation. Tobias noticed that this leads to random values being returned as the xdpmd->rxqueueindex value for XDP programs running in a cpumap.
This means we're basically returning the contents of the uninitialised memory, which is bad. Fix this by zero-initialising the rxq data structure before running the XDP program.
— NVD
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 5.10.213 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 5.15.152 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.1.82 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.6.22 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.7.10 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.8 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch CVE-2024-27431 - Compensating control
For affected cpumap-attached XDP programs, ensure the xdp_rxq_info data structure in the xdp_buff backing the XDP invocation is zero-initialised before running the XDP program (as described: “Zero-initialise xdp_rxq_info struct before running XDP program”).
Event History
Frequently Asked Questions
What is the severity of CVE-2024-27431?
CVE-2024-27431 is categorized as a medium severity vulnerability in the Linux kernel.
How do I fix CVE-2024-27431?
To fix CVE-2024-27431, update the Linux kernel to the patched versions such as 5.10.213, 5.15.152, 6.1.82, 6.6.22, 6.7.10, or 6.8.
Which Linux kernel versions are affected by CVE-2024-27431?
CVE-2024-27431 affects multiple Linux kernel versions including those prior to 5.10.213, 5.15.152, 6.1.82, 6.6.22, 6.7.10, and 6.8.
What is the nature of the vulnerability CVE-2024-27431?
CVE-2024-27431 involves a failure to zero-initialize the xdp_rxq_info structure before executing an XDP program in the Linux kernel.
Is CVE-2024-27431 specific to any Linux distributions?
Yes, CVE-2024-27431 has been identified in the Red Hat and Debian versions of the Linux kernel.