CVE-2024-27050
libbpf: Use OPTS_SET() macro in bpf_xdp_query()
Reported by linux · Published May 1, 2024
In the Linux kernel, the following vulnerability has been resolved: libbpf: Use OPTS_SET() macro in bpf_xdp_query() When the feature_flags and xdp_zc_max_segs fields were added to the libbpf bpf_xdp_query_opts, the code writing them did not use the OPTS_SET() 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 bpf_xdp_query_opts struct) will have its stack corrupted by libbpf writing out of bounds. The patch adding the feature_flags field has an early bail out if the feature_flags field is not part of the opts struct (via the OPTS_HAS) macro, but the patch adding xdp_zc_max_segs does not. For consistency, this fix just changes the assignments to both fields to use the OPTS_SET() macro.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 13ce2daa259a3bfbc9a5aeeee8b9a87058703731, 13ce2daa259a3bfbc9a5aeeee8b9a87058703731, 13ce2daa259a3bfbc9a5aeeee8b9a87058703731 |
| Linux | Linux | 6.6, 0, 6.6.23 |
| linux | linux_kernel | 6.6, 6.6, 6.6 |
| linux | acrn | 6.8.2 |
| Linux | Linux | 13ce2daa259a3bfbc9a5aeeee8b9a87058703731, 6.9, 0 |
| linux | linux_kernel | 6.6.23, 6.7.11 |
Timeline
- May 1, 2024 CVE Published
- May 2, 2024 EPSS Score (30 in total, the first dated here)
- Oct 4, 2024 Coalition ESS Score (7 in total, the first dated here)
- Jan 15, 2026 Security Advisory (308 in total, the first dated here)
- Jan 15, 2026 CVE Updated
- May 28, 2026 Distribution Patch (270 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-27050
vulnetix vdb fixes CVE-2024-27050
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-27050/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart