# CVE-2024-27050: libbpf: Use OPTS\_SET() macro in bpf\_xdp\_query()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.33% (percentile 18, 2026-11-26)
- **CWE:** CWE-787
- **Published:** 2024-05-01T12:54:35.555Z
- **Modified:** 2026-08-05T11:29:13.148Z

## Who should check

- Anyone running Linux \>= 13ce2daa259a3bfbc9a5aeeee8b9a87058703731, \< fa5bef5e80c6a3321b2b1a7070436f3bc5daf07c; \>= 13ce2daa259a3bfbc9a5aeeee8b9a87058703731, \< 682ddd62abd4bdcee7584246903e7a2df005fe0d; \>= 13ce2daa259a3bfbc9a5aeeee8b9a87058703731, \< cd3be9843247edb8fc6fcd8d8237cbce2bc19f5e; \>= 13ce2daa259a3bfbc9a5aeeee8b9a87058703731, \< 92a871ab9fa59a74d013bc04f321026a057618e7
- Anyone running Linux 6.6

## Description

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.

## Affected and fixed versions

- Linux: \>= 13ce2daa259a3bfbc9a5aeeee8b9a87058703731, \< fa5bef5e80c6a3321b2b1a7070436f3bc5daf07c; \>= 13ce2daa259a3bfbc9a5aeeee8b9a87058703731, \< 682ddd62abd4bdcee7584246903e7a2df005fe0d; \>= 13ce2daa259a3bfbc9a5aeeee8b9a87058703731, \< cd3be9843247edb8fc6fcd8d8237cbce2bc19f5e; \>= 13ce2daa259a3bfbc9a5aeeee8b9a87058703731, \< 92a871ab9fa59a74d013bc04f321026a057618e7 (cvelist)
- Linux: 6.6 (cvelist)

## Mitigation

- Upgrade Linux to 92a871ab9fa59a74d013bc04f321026a057618e7 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-27050. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-27050.md
Affected: Linux >= 13ce2daa259a3bfbc9a5aeeee8b9a87058703731, < fa5bef5e80c6a3321b2b1a7070436f3bc5daf07c; >= 13ce2daa259a3bfbc9a5aeeee8b9a87058703731, < 682ddd62abd4bdcee7584246903e7a2df005fe0d; >= 13ce2daa259a3bfbc9a5aeeee8b9a87058703731, < cd3be9843247edb8fc6fcd8d8237cbce2bc19f5e; >= 13ce2daa259a3bfbc9a5aee…
Fixed in: Linux 682ddd62abd4bdcee7584246903e7a2df005fe0d, Linux 92a871ab9fa59a74d013bc04f321026a057618e7

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-27050 being exploited?

There is no confirmed exploitation: CVE-2024-27050 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.33% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-27050?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-27050?

Linux \>= 13ce2daa259a3bfbc9a5aeeee8b9a87058703731, \< fa5bef5e80c6a3321b2b1a7070436f3bc5daf07c; \>= 13ce2daa259a3bfbc9a5aeeee8b9a87058703731, \< 682ddd62abd4bdcee7584246903e7a2df005fe0d; \>= 13ce2daa259a3bfbc9a5aeeee8b9a87058703731, \< cd3be9843247edb8fc6fcd8d8237cbce2bc19f5e; \>= 13ce2daa259a3bfbc9a5aeeee8b9a87058703731, \< 92a871ab9fa59a74d013bc04f321026a057618e7; Linux 6.6.

### Is there a fix for CVE-2024-27050?

Yes. Fixed in Linux 682ddd62abd4bdcee7584246903e7a2df005fe0d, Linux 92a871ab9fa59a74d013bc04f321026a057618e7. Upgrade Linux to 92a871ab9fa59a74d013bc04f321026a057618e7 or later.

### How do I check if I'm affected by CVE-2024-27050?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/fa5bef5e80c6a3321b2b1a7070436f3bc5daf07c>
- patch: <https://git.kernel.org/stable/c/682ddd62abd4bdcee7584246903e7a2df005fe0d>
- patch: <https://git.kernel.org/stable/c/cd3be9843247edb8fc6fcd8d8237cbce2bc19f5e>
- patch: <https://git.kernel.org/stable/c/92a871ab9fa59a74d013bc04f321026a057618e7>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-27050>

HTML: <https://flawdb.com/CVE-2024-27050> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-27050>
