CVE-2024-27050: libbpf: Use OPTS_SET() macro in bpf_xdp_query()
In the Linux kernel, the following vulnerability has been resolved:
libbpf: Use OPTSSET() macro in bpfxdpquery()
When the featureflags and xdpzcmaxsegs fields were added to the libbpf bpfxdpqueryopts, the code writing them did not use the OPTSSET() macro. This causes libbpf to write to those fields unconditionally, which means that programs compiled against an older version of libbpf (with a smaller size of the bpfxdpqueryopts struct) will have its stack corrupted by libbpf writing out of bounds.
The patch adding the featureflags field has an early bail out if the featureflags field is not part of the opts struct (via the OPTSHAS) macro, but the patch adding xdpzcmaxsegs does not. For consistency, this fix just changes the assignments to both fields to use the OPTSSET() macro.
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
Event History
Frequently Asked Questions
What is the severity of CVE-2024-27050?
CVE-2024-27050 has not been explicitly assigned a CVSS score but involves a flaw in the Linux kernel that could impact the functionality of bpf_xdp_query_opts.
How do I fix CVE-2024-27050?
To fix CVE-2024-27050, upgrade your Linux kernel to one of the patched versions, such as 5.10.223-1 or 6.12.11-1.
What systems are affected by CVE-2024-27050?
CVE-2024-27050 affects specific versions of the Linux kernel including 5.10.223-1, 5.10.226-1, 6.1.123-1, 6.1.119-1, 6.12.10-1, and 6.12.11-1.
What is the primary component affected by CVE-2024-27050?
The primary component affected by CVE-2024-27050 is the libbpf functionality within the Linux kernel.
Is there an active exploit for CVE-2024-27050?
As of now, there are no reported active exploits for CVE-2024-27050.